Documentation
¶
Overview ¶
Package bound provides a bounding box type, along with various manipulation operations.
Index ¶
- type Bound
- func (b Bound) Center() vec64.Vector
- func (b Bound) Cross(from, ray vec64.Vector, dist float64) (lmin, lmax float64, crosses bool)
- func (b Bound) Grow(d float64) Bound
- func (b Bound) HalfSize() [3]float64
- func (b Bound) Include(p vec64.Vector) Bound
- func (b Bound) Includes(p vec64.Vector) bool
- func (b Bound) IsZero() bool
- func (b Bound) LargestAxis() vecutil.Axis
- func (b Bound) Size() [3]float64
- func (b Bound) String() string
- func (b Bound) Volume() float64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bound ¶
Bound is a simple bounding box.
func (Bound) Cross ¶
Cross checks whether a given ray crosses the bound. from specifies a point where the ray starts. ray specifies the direction the ray is in. dist is the maximum distance that this method will check. Pass in math.Inf(1) to remove the check.
func (Bound) Grow ¶
Grow increases the size of the bounding box by d on all sides. The center will remain the same.
func (Bound) IsZero ¶
IsZero returns whether the bound is the zero bound. This is not the same as being empty.
func (Bound) LargestAxis ¶
Click to show internal directories.
Click to hide internal directories.