Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Object ¶
type Object struct { ObjectInterface Ambient float64 Diffuse float64 Specular float64 }
Object represents an object in the scene
type ObjectInterface ¶
type ObjectInterface interface {
// contains filtered or unexported methods
}
ObjectInterface is the interface for objects in the scene
type Renderer ¶
type Renderer struct {
// contains filtered or unexported fields
}
Renderer renders the scene
func NewRenderer ¶
NewRenderer creates a renderer struct
type Scene ¶
type Scene struct { Objects []ObjectInterface Lights []Light }
Scene represents the world being rendered
type Vector ¶
type Vector struct {
X, Y, Z float64
}
Vector is a struct representing a floating point vector.
func (*Vector) DotProduct ¶
DotProduct computes the vector dot product of the two vectors
func (*Vector) Subtract ¶
Subtract takes the passed vector away from the current one and returns a pointer
func (*Vector) UnitVector ¶
Click to show internal directories.
Click to hide internal directories.