maspack.apps
Class NagataDistanceTest

java.lang.Object
  extended by maspack.apps.NagataDistanceTest
All Implemented Interfaces:
GLRenderable, HasRenderProps

public class NagataDistanceTest
extends java.lang.Object
implements GLRenderable, HasRenderProps


Field Summary
 
Fields inherited from interface maspack.render.GLRenderable
TRANSLUCENT, TWO_DIMENSIONAL
 
Constructor Summary
NagataDistanceTest()
           
 
Method Summary
 void computeNearestPoint(Point3d near, Vector3d normal, Point3d pos)
           
 RenderProps createRenderProps()
          Factory method to create render properties appropriate to this object.
 void createTetMesh()
           
 void createTriangleMesh()
           
 int getRenderHints()
          Returns a bit code giving rendering hints about this renderable.
 RenderProps getRenderProps()
          Returns the render properities for this object.
static void main(java.lang.String[] args)
           
 void prerender(RenderList list)
          Prepare for rendering, and potentially add itself to a list to be drawn by a GLRenderer.
 void render(GLRenderer renderer, int flags)
          Render this object using Open GL via the JOGL.
 void setRenderProps(RenderProps props)
          Assigns a new set of render properties to this object.
 void updateBounds(Point3d pmin, Point3d pmax)
          Update the minimum and maximum points for this object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NagataDistanceTest

public NagataDistanceTest()
Method Detail

computeNearestPoint

public void computeNearestPoint(Point3d near,
                                Vector3d normal,
                                Point3d pos)

createTriangleMesh

public void createTriangleMesh()

createTetMesh

public void createTetMesh()

setRenderProps

public void setRenderProps(RenderProps props)
Description copied from interface: HasRenderProps
Assigns a new set of render properties to this object. An argument of null will remove render properties from this object.

Specified by:
setRenderProps in interface HasRenderProps
Parameters:
props - new render properties for this object

getRenderProps

public RenderProps getRenderProps()
Description copied from interface: HasRenderProps
Returns the render properities for this object. If no render properties are assigned, this routines returns null.

Specified by:
getRenderProps in interface HasRenderProps
Returns:
current render properties for this object

createRenderProps

public RenderProps createRenderProps()
Description copied from interface: HasRenderProps
Factory method to create render properties appropriate to this object.

Specified by:
createRenderProps in interface HasRenderProps
Returns:
new render properties for this object

prerender

public void prerender(RenderList list)
Description copied from interface: GLRenderable
Prepare for rendering, and potentially add itself to a list to be drawn by a GLRenderer.

Specified by:
prerender in interface GLRenderable

render

public void render(GLRenderer renderer,
                   int flags)
Description copied from interface: GLRenderable
Render this object using Open GL via the JOGL.

Specified by:
render in interface GLRenderable
Parameters:
renderer - renderer object which is used to perform the rendering. Provides pointers to GL and GLU, along with helper functions.
flags - supplies flags that may be used to control different aspects of the rendering. Flags are defined in GLRenderer and currently include GLRenderer.SELECTED, GLRenderer.VERTEX_COLORING, GLRenderer.HSV_COLOR_INTERPOLATION, GLRenderer.SORT_FACES, and GLRenderer.CLEAR_MESH_DISPLAY_LISTS.

updateBounds

public void updateBounds(Point3d pmin,
                         Point3d pmax)
Description copied from interface: GLRenderable
Update the minimum and maximum points for this object. In an x-y-z coordinate system with x directed to the right and y directed upwards, the minimum and maximum points can be thought of as defining the left-lower-far and right-upper-near corners of a bounding cube. This method should only reduce the elements of the minimum point and increase the elements of the maximum point, since it may be used as part of an iteration to determine the bounding cube for several different objects.

Specified by:
updateBounds in interface GLRenderable
Parameters:
pmin - minimum point
pmax - maximum point

getRenderHints

public int getRenderHints()
Description copied from interface: GLRenderable
Returns a bit code giving rendering hints about this renderable. Current bit codes include TRANSLUCENT.

Specified by:
getRenderHints in interface GLRenderable
Returns:
bit code of rendering hints.

main

public static void main(java.lang.String[] args)