espresso3d.engine.geometry
Class E3DLine

java.lang.Object
  extended byespresso3d.engine.base.E3DEngineItem
      extended byespresso3d.engine.renderer.base.E3DRenderable
          extended byespresso3d.engine.geometry.E3DLine

public class E3DLine
extends E3DRenderable

Author:
espresso3d A basic line class used in the engine

Constructor Summary
E3DLine(E3DEngine engine)
           
E3DLine(E3DEngine engine, E3DVector3F startPos, E3DVector3F endPos)
           
E3DLine(E3DEngine engine, E3DVector3F startPos, E3DVector3F endPos, E3DVector3F color)
           
E3DLine(E3DEngine engine, E3DVector3F startPos, E3DVector3F endPos, E3DVector3F startColor, E3DVector3F endColor)
           
 
Method Summary
 E3DVector3F getClosestPointToPoint(E3DVector3F point)
          Returns the closest point in this line segment to the given point
 double getDistanceFromPoint(E3DVector3F point)
          Return the distance the line is from a point
 E3DVector3F getEndColor()
           
 E3DVector3F getEndPos()
           
 float[] getFloatColorArray()
           
 float[] getFloatVertexArray()
           
 E3DVector3F getStartColor()
           
 E3DVector3F getStartPos()
           
 void renderAtPosition(E3DVector3F position)
          Put on the externalrenderable list to display the line
 void setEndColor(E3DVector3F endColor)
           
 void setEndPos(E3DVector3F endPos)
           
 void setStartColor(E3DVector3F startColor)
           
 void setStartPos(E3DVector3F startPos)
           
 java.lang.String toString()
           
 
Methods inherited from class espresso3d.engine.renderer.base.E3DRenderable
render
 
Methods inherited from class espresso3d.engine.base.E3DEngineItem
getEngine, setEngine
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

E3DLine

public E3DLine(E3DEngine engine)

E3DLine

public E3DLine(E3DEngine engine,
               E3DVector3F startPos,
               E3DVector3F endPos)

E3DLine

public E3DLine(E3DEngine engine,
               E3DVector3F startPos,
               E3DVector3F endPos,
               E3DVector3F color)

E3DLine

public E3DLine(E3DEngine engine,
               E3DVector3F startPos,
               E3DVector3F endPos,
               E3DVector3F startColor,
               E3DVector3F endColor)
Method Detail

getEndColor

public E3DVector3F getEndColor()
Returns:
Returns the endColor.

setEndColor

public void setEndColor(E3DVector3F endColor)
Parameters:
endColor - The endColor to set.

getStartColor

public E3DVector3F getStartColor()
Returns:
Returns the startColor.

setStartColor

public void setStartColor(E3DVector3F startColor)
Parameters:
startColor - The startColor to set.

getEndPos

public E3DVector3F getEndPos()
Returns:
Returns the endPos.

setEndPos

public void setEndPos(E3DVector3F endPos)
Parameters:
endPos - The endPos to set.

getStartPos

public E3DVector3F getStartPos()
Returns:
Returns the startPos.

setStartPos

public void setStartPos(E3DVector3F startPos)
Parameters:
startPos - The startPos to set.

getFloatVertexArray

public float[] getFloatVertexArray()

getFloatColorArray

public float[] getFloatColorArray()

toString

public java.lang.String toString()

getClosestPointToPoint

public E3DVector3F getClosestPointToPoint(E3DVector3F point)
Returns the closest point in this line segment to the given point

Parameters:
point -
Returns:

getDistanceFromPoint

public double getDistanceFromPoint(E3DVector3F point)
Return the distance the line is from a point

Parameters:
point -
Returns:

renderAtPosition

public void renderAtPosition(E3DVector3F position)
Put on the externalrenderable list to display the line

Specified by:
renderAtPosition in class E3DRenderable