Class SoHeightFieldDetail
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.inventor.details.SoDetail
-
- com.openinventor.volumeviz.details.SoHeightFieldDetail
-
public class SoHeightFieldDetail extends SoDetail
Stores detail information about a picked cell in a heightfield. A successful pick operation returns anSoPickedPoint
object. If the picked geometry is anSoHeightFieldRender
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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SoHeightFieldDetail.PropertyInfo
-
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
-
Field Summary
-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Constructor Summary
Constructors Constructor Description SoHeightFieldDetail()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SoDetail
copy()
Returns an instance that is a copy of this instance.SbVec4i32
getColor()
Returns the color of the picked cell.float
getHeight()
Get the height value of the nearest elevation point.SbVec3i32
getIjkPos()
Returns the position in data space (cell coordinates) of the picked cell.long
getNumProperties()
Returns the number of active properties.SoHeightFieldDetail.PropertyInfo
getProperty(long propertyNumber)
Returns the specified property and its id.double
getValue(long propertyNumber)
Returns the value of the picked cell in the specified property (SoHeightFieldProperty
node).-
Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
-
-
-
Method Detail
-
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 thegetNumProperties
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.
-
getHeight
public float getHeight()
Get the height value of the nearest elevation point.
-
-