com.sygem.jazz3d3.primitive
Class Line3d

java.lang.Object
  extended bycom.sygem.jazz3d3.Object3d
      extended bycom.sygem.jazz3d3.primitive.Line3d

public class Line3d
extends Object3d

Allows you to create a 3d line object.

Version:
3.0a
See Also:
Object3d

Field Summary
 
Fields inherited from class com.sygem.jazz3d3.Object3d
USE_ONE_RENDERER, WRAP_FRONT, WRAP_TOP
 
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, culled, getCenter, getChildObjects, getCollidable, getCulling, getFace, getFaceColour, getID, getName, getNumberOfFaces, getNumberOfSubFaces, getNumberOfSubVertices, getNumberOfVertices, getOrientationMatrix, getRenderer, getRotationMatrix, getShapeArray, getUseVertexUVCoords, getVertex, getVertexArray, getVisible, init, pick, pickClosest, pickFace, prepForDisplay, recreateVertexNormals, rotateLocal, rotateLocal, rotateWorld, rotateWorld, scaleObject, setAllTextures, setAmbientColour, setCollidable, setColour, setCulling, setFaceColour, setFaceColourQuick, setID, setName, setPosition, setRenderer, setShapeArray, setTexture, setTexture, setUseVertexUVCoords, setVertexArray, setVertexTexture, setVisible, toString, translateLocal, translateWorld, visible, wrapUV
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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 line
y1 - The y position of the first end of the line
z1 - The z position of the first end of the line
x2 - The x position of the second end of the line
y2 - The y position of the second end of the line
z2 - The z position of the second end of the line
Method Detail

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.

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 line
y - The y position of the first end of the line
z - 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 line
y - The y position of the second end of the line
z - The z position of the second end of the line


Copyright © 1999-2006 SyGem Software. All Rights Reserved.