Documentation
¶
Index ¶
- Constants
- type Canvas
- type ColourRGB
- type Material
- type Plane
- type Ray
- type Sphere
- type Textures
- type Vec2
- type Vec3
- func (v1 Vec3) Add(v2 Vec3) Vec3
- func (v1 Vec3) Cross(v2 Vec3) (v3 Vec3)
- func (v1 Vec3) Div(v2 Vec3) Vec3
- func (v1 Vec3) DivScalar(s float64) Vec3
- func (v1 Vec3) Dot(v2 Vec3) float64
- func (v Vec3) Length() float64
- func (v1 Vec3) Mul(v2 Vec3) Vec3
- func (v1 Vec3) MulScalar(s float64) Vec3
- func (v Vec3) Normal() Vec3
- func (v Vec3) NormalWithLength() (normal Vec3, originalLength float64)
- func (v1 Vec3) Sub(v2 Vec3) Vec3
Constants ¶
View Source
const EPSILON = 0.0001
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Canvas ¶
func (*Canvas) SetPixelRGB ¶
type Material ¶
type Material struct { Name string Colour ColourRGB Reflection float64 Refraction float64 RefractiveIndex float64 Diffuse float64 Specular float64 }
func NewMaterial ¶
func NewMaterialBlank ¶
func NewMaterialBlank() *Material
type Ray ¶
func NewRayWithDepth ¶
type Textures ¶
func NewTextures ¶
func NewTextures() Textures
type Vec3 ¶
type Vec3 struct {
X, Y, Z float64
}
func NewVec3Zero ¶
func NewVec3Zero() Vec3
func (Vec3) NormalWithLength ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.