Documentation ¶
Index ¶
- func Transform(a, b *Triangle) (d2.T, error)
- type CouldNotResolveErr
- type Triangle
- func (t *Triangle) Area() float64
- func (t *Triangle) BoundingBox() (d2.Pt, d2.Pt)
- func (t *Triangle) Centroid() d2.Pt
- func (t *Triangle) CircumCenter() d2.Pt
- func (t *Triangle) Contains(pt d2.Pt) bool
- func (t *Triangle) ConvexHull() []d2.Pt
- func (t *Triangle) L(ts, c int) d2.Limit
- func (t *Triangle) LineIntersections(l line.Line, buf []float64) []float64
- func (t *Triangle) Perimeter() float64
- func (t *Triangle) Pt1(t0 float64) d2.Pt
- func (t *Triangle) Pt1c0() d2.Pt1
- func (t *Triangle) Pt2(t0, t1 float64) d2.Pt
- func (t *Triangle) Pt2c1(t0 float64) d2.Pt1
- func (t *Triangle) SignedArea() float64
- func (t *Triangle) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CouldNotResolveErr ¶
type CouldNotResolveErr string
CouldNotResolveErr is returned if a TriangleTransform cannot resolve one of the axis.
func (CouldNotResolveErr) Error ¶
func (c CouldNotResolveErr) Error() string
Error fulfils the error interface
type Triangle ¶
Triangle is a 2D triangle
func (*Triangle) BoundingBox ¶
BoundingBox returns a bounding box that contains the triangle
func (*Triangle) CircumCenter ¶
CircumCenter find the point where the bisectors of the sides intersect.
func (*Triangle) ConvexHull ¶
ConvexHull fulfills shape.ConvexHuller. It returns the triangle as a slice.
func (*Triangle) LineIntersections ¶
LineIntersections find the intersections of the given line with the triangle relative to the line
func (*Triangle) Pt2 ¶
Pt2 finds a point inside the triange if t0 and t1 are both between 0 and 1 inclusive. Conforms to shape filling rules.
Click to show internal directories.
Click to hide internal directories.