|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gumbo.graphic.math.Line3
A 3D spatial element representing a line of infinite extent, which is defined by a position point and a direction unit vector.
Constructor Summary | |
Line3()
Creates an instance with the position at the origin, and a default unit vector direction. |
|
Line3(Line3 target)
Creates an instance with the same geometry as the target. |
Method Summary | |
boolean |
equals(java.lang.Object obj)
|
UnitVector3 |
getDirection()
Gets an immutable view of this line's direction. |
java.lang.Object |
getGraphic()
Default implementation: Returns this (non-native implementation). |
SpaceNode |
getGraphicLocalSpace()
Default implementation: Returns null (absolute reference space). |
Line3 |
getLine3()
Gets a singleton immutable view of this object with the same identity (hashCode(), equals()) as this object. |
Point3 |
getPosition()
Gets an immutable view of this line's position. |
void |
set(Line3 line)
Sets this line to the value of another line. |
Line3 |
setDirection(Vector3 vector)
Sets this line's direction. |
Line3 |
setPosition(Point3 point)
Sets this line's position. |
java.lang.String |
toString()
|
void |
transformGraphic(Matrix4 matrix)
Default implementation: Uses setPosition() and setDirection() for subclass compatibility. |
void |
transformGraphic(SpaceNode from,
SpaceNode to)
Default implementation: Uses setPosition() and setDirection() for subclass compatibility. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Line3()
public Line3(Line3 target)
Method Detail |
public void set(Line3 line)
line
- Line to copy. Never null.public Line3 setPosition(Point3 point)
public Line3 setDirection(Vector3 vector)
public Point3 getPosition()
public UnitVector3 getDirection()
public Line3 getLine3()
public void transformGraphic(SpaceNode from, SpaceNode to)
transformGraphic
in interface TransformableGraphic
from
- The current reference space. Never null.to
- The new reference space. Never null.public void transformGraphic(Matrix4 matrix)
transformGraphic
in interface TransformableGraphic
matrix
- Value of the transform matrix. Never null.public SpaceNode getGraphicLocalSpace()
getGraphicLocalSpace
in interface GraphicGeometry
public java.lang.Object getGraphic()
getGraphic
in interface Graphic
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |