Package mgui.geometry
Class LineSegment3D
java.lang.Object
mgui.geometry.Shape3D
mgui.geometry.LineSegment3D
public class LineSegment3D extends Shape3D
Represents a line segment in R3.
- 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.Point3fpt1protected org.jogamp.vecmath.Point3fpt2Fields inherited from class mgui.geometry.Shape3D
xml_count, xml_current_block, xml_encoding, xml_itr, xml_vertices -
Constructor Summary
Constructors Constructor Description LineSegment3D()LineSegment3D(org.jogamp.vecmath.Point3f thisPt1, org.jogamp.vecmath.Point3f thisPt2) -
Method Summary
Modifier and Type Method Description float[]getCoords()org.jogamp.vecmath.Point3fgetVertex(int index)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.voidsetCoords(float[] f)voidsetVertices(java.util.ArrayList<org.jogamp.vecmath.Point3f> nodes)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, writeXMLMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
pt1
protected org.jogamp.vecmath.Point3f pt1 -
pt2
protected org.jogamp.vecmath.Point3f pt2
-
-
Constructor Details
-
LineSegment3D
public LineSegment3D() -
LineSegment3D
public LineSegment3D(org.jogamp.vecmath.Point3f thisPt1, org.jogamp.vecmath.Point3f thisPt2)
-
-
Method Details
-
getCoords
public float[] getCoords() -
getVertex
public org.jogamp.vecmath.Point3f getVertex(int index)Description copied from class:Shape3DReturns 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.
-
getVertices
public java.util.ArrayList<org.jogamp.vecmath.Point3f> getVertices()Description copied from class:Shape3DReturns 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:
getVerticesin classShape3D- Returns:
-
setCoords
public void setCoords(float[] f) -
setVertices
public void setVertices(java.util.ArrayList<org.jogamp.vecmath.Point3f> nodes)- Specified by:
setVerticesin classShape3D
-