|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gumbo.graphic.math.Line3 | +--gumbo.graphic.math.Ray3 | +--gumbo.graphic.math.Segment3
A 3D spatial element representing a line of finite extent (line segment), which is defined by a position point, a direction vector, and a length, and by a head point and a tail point. The position and tail points are identical.
Constructor Summary | |
Segment3()
Creates an instance with head, tail, and position at the origin, zero length, and a default unit vector direction. |
|
Segment3(Segment3 target)
Creates an instance with the same geometry as the target. |
Method Summary | |
boolean |
equals(java.lang.Object obj)
|
Point3 |
getHeadPoint()
Gets an immutable view of this segment's head point. |
double |
getLength()
Gets the length of this segment. |
Segment3 |
getSegment3()
Gets a singleton immutable view of this object with the same identity (hashCode(), equals()) as this object. |
Point3 |
getTailPoint()
Gets an immutable view of this segment's tail (position) point. |
Line3 |
setDirection(Vector3 vector)
Sets the direction of this segment. |
Segment3 |
setHeadPoint(Point3 point)
Sets the head point of this segment. |
Segment3 |
setLength(double length)
Sets the length of this segment. |
Line3 |
setPosition(Point3 point)
Sets the position (tail) point of this segment. |
Segment3 |
setTailPoint(Point3 point)
Sets the tail (position) point of this segment. |
java.lang.String |
toString()
|
Methods inherited from class gumbo.graphic.math.Ray3 |
getRay3 |
Methods inherited from class gumbo.graphic.math.Line3 |
getDirection, getGraphic, getGraphicLocalSpace, getLine3, getPosition, set, transformGraphic, transformGraphic |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Segment3()
public Segment3(Segment3 target)
Method Detail |
public Segment3 setLength(double length)
public Segment3 setHeadPoint(Point3 point)
public Segment3 setTailPoint(Point3 point)
public double getLength()
public Point3 getHeadPoint()
public Point3 getTailPoint()
public Segment3 getSegment3()
public Line3 setPosition(Point3 point)
setPosition
in class Line3
public Line3 setDirection(Vector3 vector)
setDirection
in class Line3
public java.lang.String toString()
toString
in class Line3
public boolean equals(java.lang.Object obj)
equals
in class Ray3
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |