com.sygem.jazz3d3.primitive
Class Line3d
java.lang.Object
|
+--com.sygem.jazz3d3.Object3d
|
+--com.sygem.jazz3d3.primitive.Line3d
- public class Line3d
- extends Object3d
Allows you to create a 3d line object.
- Version:
- 3.0a
- Author:
- SyGem Software
- See Also:
Object3d
Constructor Summary |
Line3d(double x1,
double y1,
double z1,
double x2,
double y2,
double z2)
Default constructor. |
Method Summary |
Vertex |
getWorldVertex(int vertid)
Get a particular vertex from this object, the coordinates of
which will be in world-space. |
void |
setVertex1(double x,
double y,
double z)
Set the position of the first end of the line. |
void |
setVertex2(double x,
double y,
double z)
Set the position of the first end of the line. |
Methods inherited from class com.sygem.jazz3d3.Object3d |
addChild, addQuad, addTriangle, addVertex, applyFaceChanges, cleanUp, getCenter, getChildObjects, getCollidable, getCulling, getFace, getFaceColour, getID, getName, getNumberOfFaces, getNumberOfSubFaces, getNumberOfSubVertices, getNumberOfVertices, getRenderer, getShapeArray, getUseVertexUVCoords, getVertex, getVertexArray, getVisible, pick, pickClosest, pickFace, prepForDisplay, recreateVertexNormals, rotateLocal, rotateLocal, rotateWorld, rotateWorld, scaleObject, setAllTextures, setAmbientColour, setCollidable, setColour, setCulling, setFaceColour, setFaceColourQuick, setName, setPosition, setRenderer, setShapeArray, setTexture, setTexture, setUseVertexUVCoords, setVertexArray, setVertexTexture, setVisible, translateLocal, translateWorld |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Line3d
public Line3d(double x1,
double y1,
double z1,
double x2,
double y2,
double z2)
- Default constructor. Note that the center of the
line is halfway between the 2 end points.
- Parameters:
x1
- The x position of the first end of the liney1
- The y position of the first end of the linez1
- The z position of the first end of the linex2
- The x position of the second end of the liney2
- The y position of the second end of the linez2
- The z position of the second end of the line
setVertex1
public final void setVertex1(double x,
double y,
double z)
- Set the position of the first end of the line.
- Parameters:
x
- The x position of the first end of the liney
- The y position of the first end of the linez
- The z position of the first end of the line
setVertex2
public final void setVertex2(double x,
double y,
double z)
- Set the position of the first end of the line.
- Parameters:
x
- The x position of the second end of the liney
- The y position of the second end of the linez
- The z position of the second end of the line
getWorldVertex
public Vertex getWorldVertex(int vertid)
- Get a particular vertex from this object, the coordinates of
which will be in world-space.
- Overrides:
getWorldVertex
in class Object3d
- Parameters:
vertid
- The id of the vertex you want - starts from zero.- Returns:
- The Vertex, or null if vertid is out of range.