Documentation ¶
Overview ¶
Package geom defines common primiteves for creating objects in the 3D space.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Intersectable ¶
type Intersectable interface { // Intersect returns true when `ray` intersects this object. Intersect(ray Ray) bool }
Intersectable represents an object in the 3D space which can be tested for intersections with rays.
type Vector ¶
type Vector struct {
// X, Y and Z are the coordinates of a point in each of the three
// dimensions or alternatively the direction defined by a vector
// with origin (0,0,0) and end at X, Y and Z.
X, Y, Z float64
}
Vector represents a point or a direction vector in a 3D cartesian coordinate system.
Click to show internal directories.
Click to hide internal directories.