|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--unbboolean.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(Face face1,
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(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(Face face1, Face face2)
face1
- face representing one of the planesface2
- face representing one of the planespublic Line(javax.vecmath.Vector3d direction, javax.vecmath.Point3d point)
direction
- direction raypoint
- beginning of the rayMethod Detail |
public java.lang.Object clone()
clone
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public 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(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 |