Documentation ¶
Index ¶
- Variables
- type BoundingBox
- type Camera
- type Glass
- type Hit
- type Hitable
- type Lambertian
- type Material
- type Metal
- type Ray
- type Sphere
- type Triangle
- type Vector
- func (v Vector) Add(o Vector) Vector
- func (v Vector) AddScalar(t float64) Vector
- func (v Vector) Cross(o Vector) Vector
- func (v Vector) DivideScalar(t float64) Vector
- func (v Vector) Dot(o Vector) float64
- func (v Vector) Length() float64
- func (v Vector) Multiply(o Vector) Vector
- func (v Vector) MultiplyScalar(t float64) Vector
- func (v Vector) Normalize() Vector
- func (v Vector) Reflect(n Vector) Vector
- func (v Vector) Refract(o Vector, n float64) (bool, Vector)
- func (v Vector) SquaredLength() float64
- func (v Vector) Subtract(o Vector) Vector
- type World
Constants ¶
This section is empty.
Variables ¶
View Source
var (
UnitVector = Vector{1, 1, 1}
)
Functions ¶
This section is empty.
Types ¶
type BoundingBox ¶
type BoundingBox struct {
MinV, MaxV Vector
}
type Lambertian ¶
type Lambertian struct {
C Vector
}
func (Lambertian) Color ¶
func (l Lambertian) Color() Vector
type Vector ¶
type Vector struct {
X, Y, Z float64
}
func VectorInUnitSphere ¶
func VectorInUnitSphere() Vector
func (Vector) DivideScalar ¶
func (Vector) MultiplyScalar ¶
func (Vector) SquaredLength ¶
Click to show internal directories.
Click to hide internal directories.