|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--bool.Line
Representation of a 3d line or a ray (represented by a direction and a point).
See:
D. H. Laidlaw, W. B. Trumbore, and J. F. Hughes.
"Constructive Solid Geometry for Polyhedral Objects"
SIGGRAPH Proceedings, 1986, p.161.
| Constructor Summary | |
Line(bool.Face face1,
bool.Face face2)
Constructor for a line. |
|
Line(javax.vecmath.Vector3d direction,
javax.vecmath.Point3d point)
Constructor for a ray |
|
| Method Summary | |
java.lang.Object |
clone()
Clones the Line object |
javax.vecmath.Point3d |
computeLineIntersection(bool.Line otherLine)
Computes the point resulting from the intersection with another line |
javax.vecmath.Point3d |
computePlaneIntersection(javax.vecmath.Vector3d normal,
javax.vecmath.Point3d planePoint)
Compute the point resulting from the intersection with a plane |
double |
computePointToPointDistance(javax.vecmath.Point3d otherPoint)
Computes the distance from the line point to another point |
javax.vecmath.Vector3d |
getDirection()
Gets the line direction |
javax.vecmath.Point3d |
getPoint()
Gets the point used to represent the line |
void |
perturbDirection()
Changes slightly the line direction |
void |
setDirection(javax.vecmath.Vector3d direction)
Sets a new direction |
void |
setPoint(javax.vecmath.Point3d point)
Sets a new point |
java.lang.String |
toString()
Makes a string definition for the Line object |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Line(bool.Face face1,
bool.Face face2)
face1 - face representing one of the planesface2 - face representing one of the planes
public Line(javax.vecmath.Vector3d direction,
javax.vecmath.Point3d point)
direction - direction raypoint - beginning of the ray| Method Detail |
public java.lang.Object clone()
clone in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic javax.vecmath.Point3d getPoint()
public javax.vecmath.Vector3d getDirection()
public void setPoint(javax.vecmath.Point3d point)
point - new pointpublic void setDirection(javax.vecmath.Vector3d direction)
direction - new directionpublic double computePointToPointDistance(javax.vecmath.Point3d otherPoint)
otherPoint - the point to compute the distance from the line point. The point
is supposed to be on the same line.
public javax.vecmath.Point3d computeLineIntersection(bool.Line otherLine)
otherLine - the other line to apply the intersection. The lines are supposed
to intersect
public javax.vecmath.Point3d computePlaneIntersection(javax.vecmath.Vector3d normal,
javax.vecmath.Point3d planePoint)
normal - the plane normalplanePoint - a plane point.
public void perturbDirection()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||