public class Triangle extends Plane3D
Constructor and Description |
---|
Triangle(PointND a,
PointND b,
PointND c)
Creates a new Triangle from the Points a, b, and c
|
Modifier and Type | Method and Description |
---|---|
void |
applyTransform(Transform t)
Applies the Transform t to the object.
|
PointND |
getA()
Returns point a
|
PointND |
getB()
Returns point b
|
PointND |
getC()
Returns point c
|
java.util.ArrayList<PointND> |
getHitsOnBoundingBox(AbstractCurve other) |
PointND[] |
getRasterPoints(int number)
Rasters the shape with a given number of points or less.
|
java.util.ArrayList<PointND> |
intersect(AbstractCurve other)
Returns the intersection points between the curve and the shape.
|
PointND |
intersect(StraightLine other) |
boolean |
isBounded()
Returns true if the shape is of limited space
|
boolean |
isInTriangle(PointND p)
Computes whether the given point is inside of the triangle.
|
java.lang.String |
toString() |
computeDistance, computeDistance, evaluate, flipNormal, getDimension, getNormal, getPoint, orientNormal, tessellate
evaluate, getInternalDimension
getHitsOnBoundingBox_slow, getMax, getMin, getName, setName
public java.util.ArrayList<PointND> getHitsOnBoundingBox(AbstractCurve other)
getHitsOnBoundingBox
in class AbstractShape
public PointND getA()
public PointND getB()
public PointND getC()
public PointND intersect(StraightLine other)
public java.util.ArrayList<PointND> intersect(AbstractCurve other)
AbstractShape
public boolean isInTriangle(PointND p)
p
- the pointpublic PointND[] getRasterPoints(int number)
AbstractShape
getRasterPoints
in class Plane3D
number
- the number of pointspublic boolean isBounded()
AbstractShape
public void applyTransform(Transform t)
Transformable
applyTransform
in interface Transformable
applyTransform
in class Plane3D
t
- the transform to apply to the object.public java.lang.String toString()
toString
in class java.lang.Object