|
||||||||||
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
public class Plane3D
There are 3 representations for a plane:
Constructor Summary | |
---|---|
Plane3D(PointND... points)
Initializes the plane to the one with minimum sum of squared distances from all given points. |
|
Plane3D(PointND point,
SimpleVector normal)
Creates a plane from a given point in the plane and a vector normal to the plane so that ![]() |
|
Plane3D(PointND p1,
SimpleVector dirU,
SimpleVector dirV)
Creates a plane from the given parametric representation ![]() |
|
Plane3D(SimpleVector normal,
double offset)
Creates a plane from the given normal form ![]() |
Method Summary | |
---|---|
void |
applyTransform(Transform t)
Applies the Transform t to the object. |
double |
computeDistance(PointND givenPoint)
Computes the distance of a point to this plane. |
double |
computeDistance(PointND givenPoint,
PointND closestPoint)
Computes the distance of a point to this plane and returns the closest point to the given point on the plane. |
PointND |
evaluate(double u,
double v)
Returns a point on the surface at position (u, v). |
void |
flipNormal()
flip the normal of the plane |
int |
getDimension()
Returns the external dimension of the shape. |
SimpleVector |
getNormal()
|
PointND |
getPoint()
|
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 l)
|
boolean |
isBounded()
Returns true if the shape is of limited space |
void |
orientNormal(boolean fromOriginToPlane)
Orient the normal either from the origin to the plane or in the opposite direction. |
Methods inherited from class edu.stanford.rsl.konrad.geometry.AbstractSurface |
---|
evaluate, getInternalDimension |
Methods inherited from class edu.stanford.rsl.konrad.geometry.AbstractShape |
---|
getHitsOnBoundingBox_slow, getHitsOnBoundingBox, getMax, getMin |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Plane3D(PointND p1, SimpleVector dirU, SimpleVector dirV)
p1
- An arbitrary point in the plane.dirU
- A first direction vector in the plane.dirV
- A second direction vector in the plane which is not colinear with the first vector.public Plane3D(SimpleVector normal, double offset)
normal
- A vector that is normal to the plane.offset
- The offset from the coordinate system's origin to this plane in the normal direction.
This offset value is negative if the normal does not point from the origin to the plane but in the opposite direction.public Plane3D(PointND point, SimpleVector normal)
point
- Any point in the plane.normal
- A vector normal to the plane.public Plane3D(PointND... points)
points
- The array or comma-separated list of points this plane should be fitted to.Method Detail |
---|
public int getDimension()
AbstractShape
getDimension
in class AbstractShape
public PointND evaluate(double u, double v)
AbstractSurface
evaluate
in class AbstractSurface
u
- the internal position in u dimensionv
- the internal position in v dimension
public java.util.ArrayList<PointND> intersect(AbstractCurve other)
AbstractShape
intersect
in class AbstractShape
public PointND intersect(StraightLine l)
public boolean isBounded()
AbstractShape
isBounded
in class AbstractShape
public void orientNormal(boolean fromOriginToPlane)
fromOriginToPlane
- specifies the direction in which to orient the plane.public double computeDistance(PointND givenPoint)
givenPoint
- The point whose distance is to be computed and whose closest neighbor on the plane is to be determined.
public double computeDistance(PointND givenPoint, PointND closestPoint)
givenPoint
- The point whose distance is to be computed and whose closest neighbor on the plane is to be determined.closestPoint
- The closest point to the given one on this plane is returned here.
public void flipNormal()
public void applyTransform(Transform t)
Transformable
applyTransform
in interface Transformable
applyTransform
in class AbstractShape
t
- the transform to apply to the object.public PointND[] getRasterPoints(int number)
AbstractShape
getRasterPoints
in class AbstractShape
number
- the number of points
public SimpleVector getNormal()
public PointND getPoint()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |