Package mgui.geometry
Class Rect3D
java.lang.Object
mgui.geometry.Shape3D
mgui.geometry.Rect3D
public class Rect3D extends Shape3D
Represents a 3D rectangle shape, defined by four 3D nodes representing BL, BR, TR, TL corners, respectively.
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Andrew Reid
-
Nested Class Summary
Nested classes/interfaces inherited from interface mgui.interfaces.xml.XMLObject
XMLObject.XMLEncoding, XMLObject.XMLType
-
Field Summary
Fields Modifier and Type Field Description protected org.jogamp.vecmath.Point3f[]
nodes
Fields inherited from class mgui.geometry.Shape3D
xml_count, xml_current_block, xml_encoding, xml_itr, xml_vertices
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description float[]
getCoords()
float
getHeight()
org.jogamp.vecmath.Point3f
getOrigin()
org.jogamp.vecmath.Point3f
getVertex(int i)
Returns the vertex at the specified index as aPoint3f
.java.util.ArrayList<org.jogamp.vecmath.Point3f>
getVertices()
Returns a list of this shape's nodes asPoint3f
's.float
getWidth()
protected void
resetNodes()
void
setCoords(float[] coords)
void
setVertices(java.util.ArrayList<org.jogamp.vecmath.Point3f> n)
Methods inherited from class mgui.geometry.Shape3D
clone, contains, getBoundBox, getCenter, getDTD, getLocalName, getProximity, getProximityPoint, getShortXML, getSize, getXML, getXML, getXMLSchema, handleXMLElementEnd, handleXMLElementStart, handleXMLString, loadAsciiCoords, loadBinaryCoords, loadCoords, loadXMLCoord, setVertices, transform, transform, writeAsciiCoords, writeBinaryCoords, writeCoords, writeXML, writeXML, writeXML
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
nodes
protected org.jogamp.vecmath.Point3f[] nodes
-
-
Constructor Details
-
Rect3D
public Rect3D() -
Rect3D
-
Rect3D
public Rect3D(org.jogamp.vecmath.Point3f[] corners) -
Rect3D
public Rect3D(java.util.ArrayList<org.jogamp.vecmath.Point3f> corners)
-
-
Method Details
-
resetNodes
protected void resetNodes() -
getVertices
public java.util.ArrayList<org.jogamp.vecmath.Point3f> getVertices()Description copied from class:Shape3D
Returns a list of this shape's nodes asPoint3f
's. This list is a copy, so operations performed on these nodes will not affect this shape.- Specified by:
getVertices
in classShape3D
- Returns:
-
setVertices
public void setVertices(java.util.ArrayList<org.jogamp.vecmath.Point3f> n)- Specified by:
setVertices
in classShape3D
-
getWidth
public float getWidth() -
getHeight
public float getHeight() -
getOrigin
public org.jogamp.vecmath.Point3f getOrigin() -
getCoords
public float[] getCoords() -
getVertex
public org.jogamp.vecmath.Point3f getVertex(int i)Description copied from class:Shape3D
Returns the vertex at the specified index as aPoint3f
. This vertex is a copy, so operations performed on it will not affect this shape.Note: subclasses may want to provide a more efficient implementation of this method.
-
setCoords
public void setCoords(float[] coords)
-