3-D cliping

I just but a new release of VisAD on the server, that
supports 3-D clipping. See visad/examples/Test35.java
for an example.

Applications can set up to six arbitrarily oriented clipping
planes using a new method of DisplayRendererJ3D:

  /** define a clipping plane in (XAxis, YAxis, ZAxis) space
      plane number must be in (0, ..., 5)
      clip plane defined by ax + by + cz + d <= 0
  */
  public void setClip(int plane, boolean enable, float a, float b, float c, 
float d)
         throws VisADException;

This only clips data depictions, not axis scales etc.
_From Test35.java, to clip to the usual box (i.e., x, y and
z values in the range -1.0 to +1.0), do:

  DisplayRendererJ3D dr = (DisplayRendererJ3D) display.getDisplayRenderer();
  dr.setClip(0, true,  1.0f,  0.0f,  0.0f, -1.0f);
  dr.setClip(1, true, -1.0f,  0.0f,  0.0f, -1.0f);
  dr.setClip(2, true,  0.0f,  1.0f,  0.0f, -1.0f);
  dr.setClip(3, true,  0.0f, -1.0f,  0.0f, -1.0f);
  dr.setClip(4, true,  0.0f,  0.0f,  1.0f, -1.0f);
  dr.setClip(5, true,  0.0f,  0.0f, -1.0f, -1.0f);

Cheers,
Bill
----------------------------------------------------------
Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI  53706
hibbard@xxxxxxxxxxxxxxxxx  608-263-4427  fax: 608-263-6738
http://www.ssec.wisc.edu/~billh/vis.html


  • 2001 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: