com.jme.scene
Class Line
java.lang.Object
com.jme.scene.Spatial
com.jme.scene.Geometry
com.jme.scene.Line
- All Implemented Interfaces:
- java.io.Serializable
- public class Line
- extends Geometry
Line subclasses geometry and defines a collection of lines.
For each two points, a line is created. The last point of the previous line
is the first point of the next line. Therefore, for N points there are N-1
lines.
- Version:
- $Id: Line.java,v 1.14 2004/10/14 01:23:09 mojomonkey Exp $
- Author:
- Mark Powell
- See Also:
- Serialized Form
| Fields inherited from class com.jme.scene.Spatial |
currentStates, defaultStateList, forceCull, forceView, frustrumIntersects, geometricalControllers, lightCombineMode, localRotation, localScale, localTranslation, name, parent, queueDistance, renderQueueMode, renderStateList, textureCombineMode, worldBound, worldRotation, worldScale, worldTranslation, zOrder |
|
Constructor Summary |
Line(java.lang.String name)
Constructs a new line with the given name. |
Line(java.lang.String name,
Vector3f[] vertex,
Vector3f[] normal,
ColorRGBA[] color,
Vector2f[] texture)
Constructor instantiates a new Line object with a given
set of data. |
|
Method Summary |
void |
draw(Renderer r)
draw calls super to set the render state then calls the
renderer to display the collection of lines. |
void |
drawBounds(Renderer r)
drawBounds calls super to set the render state then passes
itself to the renderer. |
void |
findCollisions(Spatial scene,
CollisionResults results)
checks this spatial against a second spatial, any collisions are stored
in the results object. |
boolean |
hasCollision(Spatial scene,
boolean checkTriangles)
|
| Methods inherited from class com.jme.scene.Geometry |
applyRenderState, applyStates, clearBuffers, copyTextureCoords, findPick, getAllTextures, getCloneID, getColorAsFloatBuffer, getColors, getModelBound, getNormalAsFloatBuffer, getNormals, getNumberOfUnits, getTextureAsFloatBuffer, getTextureAsFloatBuffer, getTextures, getTextures, getVBOColorID, getVBONormalID, getVBOTextureID, getVBOVertexID, getVerticeAsFloatBuffer, getVertices, getVertQuantity, isVBOColorEnabled, isVBONormalEnabled, isVBOTextureEnabled, isVBOVertexEnabled, putClone, randomVertice, reconstruct, setAllTextures, setColor, setColors, setFloatBuffer, setForceView, setModelBound, setNormal, setNormalBuffer, setNormals, setRandomColors, setSolidColor, setTexture, setTexture, setTextureBuffer, setTextureCoord, setTextures, setTextures, setVBOColorEnabled, setVBOColorID, setVBONormalEnabled, setVBONormalID, setVBOTextureEnabled, setVBOTextureID, setVBOVertexEnabled, setVBOVertexID, setVertex, setVertexBuffer, setVertices, updateColorBuffer, updateColorBuffer, updateModelBound, updateNormalBuffer, updateNormalBuffer, updateTextureBuffer, updateTextureBuffer, updateTextureBuffer, updateVertexBuffer, updateVertexBuffer, updateWorldBound |
| Methods inherited from class com.jme.scene.Spatial |
addController, applyDefaultStates, calculateCollisions, calculatePick, clearCurrentState, clearCurrentStates, clearRenderState, getController, getControllers, getCurrentState, getLastFrustumIntersection, getLightCombineMode, getLocalRotation, getLocalScale, getLocalTranslation, getName, getParent, getRenderQueueMode, getRenderStateList, getTextureCombineMode, getWorldBound, getWorldRotation, getWorldScale, getWorldTranslation, getZOrder, isForceCulled, isForceView, onDraw, onDrawBounds, propagateBoundToRoot, propagateStatesFromRoot, removeController, removeFromParent, setForceCull, setLightCombineMode, setLocalRotation, setLocalRotation, setLocalScale, setLocalScale, setLocalTranslation, setName, setParent, setRenderQueueMode, setRenderState, setTextureCombineMode, setWorldBound, setZOrder, toString, updateCollisionTree, updateGeometricState, updateRenderState, updateRenderState, updateWorldData |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Line
public Line(java.lang.String name)
- Constructs a new line with the given name. By default, the line has no
information.
- Parameters:
name - The name of the line.
Line
public Line(java.lang.String name,
Vector3f[] vertex,
Vector3f[] normal,
ColorRGBA[] color,
Vector2f[] texture)
- Constructor instantiates a new
Line object with a given
set of data. Any data can be null except for the vertex list. If vertices
are null an exception will be thrown.
- Parameters:
name - the name of the scene element. This is required for
identification and comparision purposes.vertex - the vertices that make up the lines.normal - the normals of the lines.color - the color of each point of the lines.texture - the texture coordinates of the lines.
draw
public void draw(Renderer r)
draw calls super to set the render state then calls the
renderer to display the collection of lines.
- Overrides:
draw in class Geometry
- Parameters:
r - the renderer used to display the lines.- See Also:
Spatial.draw(com.jme.renderer.Renderer)
drawBounds
public void drawBounds(Renderer r)
drawBounds calls super to set the render state then passes
itself to the renderer.
- Overrides:
drawBounds in class Geometry
- Parameters:
r - the renderer to display
findCollisions
public void findCollisions(Spatial scene,
CollisionResults results)
- Description copied from class:
Spatial
- checks this spatial against a second spatial, any collisions are stored
in the results object.
- Specified by:
findCollisions in class Spatial
- Parameters:
scene - the scene to test against.results - the results of the collisions.
hasCollision
public boolean hasCollision(Spatial scene,
boolean checkTriangles)
- Specified by:
hasCollision in class Spatial