|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.nexttext.CoordinateSystem
public class CoordinateSystem
A CoordinateSystem describe a set of three Axes positioned at some arbitrary origin in space.
(origin)_ _ _ _ x |\ | \ | \z y
Constructor Summary | |
---|---|
CoordinateSystem()
Creates a "default" CoordinateSystem where the origin is (0,0,0) and each axes is a unit vector. |
|
CoordinateSystem(processing.core.PVector origin,
float rotation)
Creates a CoordinateSystem with the specified origin and rotation |
|
CoordinateSystem(processing.core.PVector origin,
float rotation,
CoordinateSystem parentSystem)
Creates a CoordinateSystem with the specified origin and rotation, then transforms it by the specified parent system. |
Method Summary | |
---|---|
processing.core.PVector |
getOrigin()
Returns a copy of the origin vector. |
java.lang.String |
toString()
|
java.awt.Polygon |
transform(java.awt.Polygon inPoly)
Transforms a polygon out of this coordinate system. |
processing.core.PVector |
transform(processing.core.PVector inV)
Takes a vector local to this coordinate system and returns an equivalent vector transformed "out of" this system such that the vector is now relative to the parent system. |
processing.core.PVector |
transformInto(processing.core.PVector inV)
Transforms a vector from the parent system such that it is now relative to this system. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CoordinateSystem()
public CoordinateSystem(processing.core.PVector origin, float rotation)
public CoordinateSystem(processing.core.PVector origin, float rotation, CoordinateSystem parentSystem)
Method Detail |
---|
public processing.core.PVector getOrigin()
public processing.core.PVector transform(processing.core.PVector inV)
Transforms a vector local to this coordinate system by aligning it with this system's axes and translating by this system's origin.
inV
- the input vector; the vector will remain unchanged.
public java.awt.Polygon transform(java.awt.Polygon inPoly)
Polygons are 2D, so the transformation is done with the assumption that all Z values are 0.
public processing.core.PVector transformInto(processing.core.PVector inV)
inV
- the input vector; the vector will remain unchanged.
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |