Class SoHeightFieldDetail


public class SoHeightFieldDetail extends SoDetail
Stores detail information about a picked cell in a heightfield. A successful pick operation returns an SoPickedPoint object. If the picked geometry is an SoHeightFieldRender node, use the getDetail method and cast the result to this class to get extra information about the the pick.

SoHeightFieldDetail returns

  • The i,j,k position of the picked cell (position in data space).
  • The value of the picked cell retrieved from the current SoHeightFieldProperty
  • or the values of the picked cell when multiple SoHeightFieldProperty nodes are inherited.
  • The data set of the picked heightfield, i.e., the current SoHeightFieldProperty node.
  • or the data sets of the picked heightfield, when multiple SoHeightFieldProperty nodes are inherited.

See Also:
  • Constructor Details

    • SoHeightFieldDetail

      public SoHeightFieldDetail()
      Constructor.
  • Method Details

    • getNumProperties

      public long getNumProperties()
      Returns the number of active properties.
    • getProperty

      public SoHeightFieldDetail.PropertyInfo getProperty(long propertyNumber)
      Returns the specified property and its id.

      Parameters:
      propertyNumber - is the number of the property to query. Use the getNumProperties method to get the number of properties.

      property - is filled with a pointer to the queried property. NULL if propertyNumber is invalid.

      id - is filled with the id of the property. -1 if propertyNumber is invalid.
    • getValue

      public double getValue(long propertyNumber)
      Returns the value of the picked cell in the specified property (SoHeightFieldProperty node).

      Parameters:
      propertyNumber - is the number of the property to query.

      Returns:
      value. Returns NaN if propertyNumber is not valid. Use the getNumProperties method to get the number of properties.

    • getIjkPos

      public SbVec3i32 getIjkPos()
      Returns the position in data space (cell coordinates) of the picked cell.
    • getColor

      public SbVec4i32 getColor()
      Returns the color of the picked cell.
    • copy

      public SoDetail copy()
      Returns an instance that is a copy of this instance. The caller is responsible for deleting the copy when it is no longer needed.
      Overrides:
      copy in class SoDetail
    • getHeight

      public float getHeight()
      Get the height value of the nearest elevation point.