Documentation ¶
Index ¶
- Variables
- type Camera
- type Dielectric
- type HitRecord
- type Hitable
- type Lambertian
- type Material
- type Metal
- type Ray
- type Sphere
- type Vector
- func (u Vector) Add(v Vector) Vector
- func (u Vector) AddScalar(a float64) Vector
- func (u Vector) DivideScalar(a float64) Vector
- func (u Vector) DotProduct(v Vector) float64
- func (u Vector) Length() float64
- func (u Vector) Multiply(v Vector) Vector
- func (u Vector) MultiplyScalar(a float64) Vector
- func (u Vector) Normalise() Vector
- func (u Vector) RGBA() (r, g, b, a uint32)
- func (u Vector) Reflect(n Vector) Vector
- func (u Vector) Refract(normal Vector, ni_over_nt float64) (bool, Vector)
- func (u Vector) Subtract(v 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 Dielectric ¶
func (Dielectric) Color ¶
func (d Dielectric) Color() 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 (Vector) DivideScalar ¶
func (Vector) DotProduct ¶
func (Vector) MultiplyScalar ¶
Click to show internal directories.
Click to hide internal directories.