|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.rsl.konrad.geometry.AbstractShape
edu.stanford.rsl.konrad.geometry.AbstractSurface
edu.stanford.rsl.konrad.geometry.shapes.simple.Plane3D
edu.stanford.rsl.konrad.geometry.shapes.simple.Triangle
public class Triangle
Class to describe a triangle in 3D.
Constructor Summary | |
---|---|
Triangle(PointND a,
PointND b,
PointND c)
Creates a new Triangle from the Points a, b, and c |
Method Summary | |
---|---|
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()
|
Methods inherited from class edu.stanford.rsl.konrad.geometry.shapes.simple.Plane3D |
---|
computeDistance, computeDistance, evaluate, flipNormal, getDimension, getNormal, getPoint, orientNormal |
Methods inherited from class edu.stanford.rsl.konrad.geometry.AbstractSurface |
---|
evaluate, getInternalDimension |
Methods inherited from class edu.stanford.rsl.konrad.geometry.AbstractShape |
---|
getHitsOnBoundingBox_slow, getMax, getMin |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Triangle(PointND a, PointND b, PointND c)
a
- b
- c
- Method Detail |
---|
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)
intersect
in class Plane3D
public java.util.ArrayList<PointND> intersect(AbstractCurve other)
AbstractShape
intersect
in class Plane3D
public boolean isInTriangle(PointND p)
p
- the point
public PointND[] getRasterPoints(int number)
AbstractShape
getRasterPoints
in class Plane3D
number
- the number of points
public boolean isBounded()
AbstractShape
isBounded
in class Plane3D
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |