box

package
v0.0.0-...-9c88ebf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2022 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package box provids a 3D bounding box.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Box

type Box [2]d3.Pt

Box is defined by 2 points, a min and a max.

func New

func New(pts ...d3.Pt) *Box

New creates a Box by finding the relative Min and Max across all the coordinates given.

func (*Box) Add

func (b *Box) Add(pts ...d3.Pt)

Add points to expand the bounds if necessary.

func (*Box) AssertEqual

func (b *Box) AssertEqual(to interface{}, t cmpr.Tolerance) error

AssertEqual fulfills geomtest.AssertEqualizer. It will check if two boxes are equal.

func (*Box) LineIntersection

func (b *Box) LineIntersection(l line.Line) (float64, bool)

LineIntersection returns the lowest point on the line greater than 0 that intersects the cube. If there is no intersection it will return -1 and false.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL