gnu.gleem
Class ManipPartTriBased

java.lang.Object
  |
  +--gnu.gleem.ManipPart
        |
        +--gnu.gleem.ManipPartTriBased
Direct Known Subclasses:
ManipPartCube, ManipPartSquare, ManipPartTwoWayArrow

public class ManipPartTriBased
extends ManipPart

Triangle-based manipulator part. This is the base class for most of the ManipParts that GLEEM uses internally. You can feel free to subclass this if you want to replace geometry in the manipulators, or re-derive from ManipPart. See ManipPartLineSeg for an example.


Constructor Summary
ManipPartTriBased()
           
 
Method Summary
 void clearHighlight()
          Unhighlight this part
 Vec3f getColor()
           
 Vec3f getHighlightColor()
           
protected  int[] getNormalIndices()
           
protected  Vec3f[] getNormals()
           
 boolean getPickable()
           
protected  int[] getVertexIndices()
           
protected  Vec3f[] getVertices()
           
 boolean getVisible()
           
 void highlight()
          Highlight this part
 void intersectRay(Vec3f rayStart, Vec3f rayDirection, java.util.List results, Manip caller)
          Intersect a ray with this part, returning all intersected points as HitPoints in the result list.
 void render(gl4java.GLFunc gl)
          Render this ManipPart now using the given OpenGL routines and assuming an OpenGL context is current.
 void setColor(Vec3f color)
          Default color is (0.8, 0.8, 0.8)
 void setHighlightColor(Vec3f highlightColor)
          Default highlight color is (0.8, 0.8, 0)
protected  void setNormalIndices(int[] normalIndices)
           
protected  void setNormals(Vec3f[] normals)
           
 void setPickable(boolean pickable)
          Default is pickable
 void setTransform(Mat4f xform)
          Sets the transform of this part.
protected  void setVertexIndices(int[] vertexIndices)
           
protected  void setVertices(Vec3f[] vertices)
           
 void setVisible(boolean visible)
          Default is visible
 
Methods inherited from class gnu.gleem.ManipPart
getParent, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ManipPartTriBased

public ManipPartTriBased()
Method Detail

setColor

public void setColor(Vec3f color)
Default color is (0.8, 0.8, 0.8)


getColor

public Vec3f getColor()

setHighlightColor

public void setHighlightColor(Vec3f highlightColor)
Default highlight color is (0.8, 0.8, 0)


getHighlightColor

public Vec3f getHighlightColor()

intersectRay

public void intersectRay(Vec3f rayStart,
                         Vec3f rayDirection,
                         java.util.List results,
                         Manip caller)
Description copied from class: ManipPart
Intersect a ray with this part, returning all intersected points as HitPoints in the result list. The same rules as Manip.intersectRay() apply.

Specified by:
intersectRay in class ManipPart

setTransform

public void setTransform(Mat4f xform)
Description copied from class: ManipPart
Sets the transform of this part.

Specified by:
setTransform in class ManipPart

highlight

public void highlight()
Description copied from class: ManipPart
Highlight this part

Specified by:
highlight in class ManipPart

clearHighlight

public void clearHighlight()
Description copied from class: ManipPart
Unhighlight this part

Specified by:
clearHighlight in class ManipPart

setPickable

public void setPickable(boolean pickable)
Default is pickable

Specified by:
setPickable in class ManipPart

getPickable

public boolean getPickable()
Specified by:
getPickable in class ManipPart

setVisible

public void setVisible(boolean visible)
Default is visible

Specified by:
setVisible in class ManipPart

getVisible

public boolean getVisible()
Specified by:
getVisible in class ManipPart

render

public void render(gl4java.GLFunc gl)
Description copied from class: ManipPart
Render this ManipPart now using the given OpenGL routines and assuming an OpenGL context is current.

Specified by:
render in class ManipPart

setVertices

protected void setVertices(Vec3f[] vertices)

getVertices

protected Vec3f[] getVertices()

setNormals

protected void setNormals(Vec3f[] normals)

getNormals

protected Vec3f[] getNormals()

setVertexIndices

protected void setVertexIndices(int[] vertexIndices)

getVertexIndices

protected int[] getVertexIndices()

setNormalIndices

protected void setNormalIndices(int[] normalIndices)

getNormalIndices

protected int[] getNormalIndices()