Class SoHeightFieldGeometry
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.inventor.misc.SoBase
-
- com.openinventor.inventor.fields.SoFieldContainer
-
- com.openinventor.inventor.nodes.SoNode
-
- com.openinventor.ldm.nodes.SoDataSet
-
- com.openinventor.volumeviz.nodes.SoVolumeData
-
- com.openinventor.volumeviz.nodes.SoHeightFieldGeometry
-
- All Implemented Interfaces:
SafeDisposable
public class SoHeightFieldGeometry extends SoVolumeData
Height field data node.SoHeightFieldGeometry
defines a uniform grid in the XY plane whose vertices are height (Z) values stored in 2D LDM format (any LDM data set with the Z dimension equal to 1). Storing only height values is a very efficient way to represent a surface and LDM supports 8 and 16 bit integer data in addition to float (and other types). Adding the combination of LDM data management with advanced GPU features provides a way to handle extremely large surfaces. Just as with volume data, LDM uses tiles of data and multiple levels of resolution to enable interactive frame rates even for data sets that cannot fit in system memory.SoHeightFieldGeometry
is derived fromSoVolumeData
and serves a similar purpose in the scene graph, providing a reference to an LDM data set which will be loaded as needed by rendering nodes, specificallySoHeightFieldRender
in this case. The geometry is given by the inherited fieldfileName
. The given file must be an LDM file built by the LDM converter (seeSoConverter
). For use withSoHeightFieldRender
the data set must have a depth (Z dimension) of exactly 1. The inherited fieldundefinedValue
allows to specify an "undefined" value which will be rendered as holes in the grid. This value can also be specified with the -u option of the converter.Data set values are converted to height values in 3D space in two ways depending on the data type:
- Integer values are normalized between [0,1] ([-1,1] for signed types) based on the range of values for the specific data type. For example, for UNSIGNED BYTE values the range 0..255 is mapped to 0..1.
- Floating point values are not normalized (are used "as is").
Extent in 3D space
A standard
SoVolumeData
node has no intrinsic "extent" in 3D. The extent of the volume is initially defined by the values returned from the volume reader (normally from the extent tag in the LDM file header). The extent field is initialized with these values from the reader and always contains the current extent values. The application can modify the extent of the volume by changing the values in the extent field. (Note that the actual bounding box of the volume in 3D is the volume extent modified by any transform nodes in the scene graph.)SoHeightFieldGeometry
only uses the X and Y parts of the extent field. The Z extent of the surface in 3D is completely defined by the values in the data set. So the X and Y values in the extent field are the actual extent, but the Z values are not meaningful and changing the Z values in the extent field has no effect. Note that you can always get the current bounding box (X, Y and Z) using anSoGetBoundingBoxAction
and you can still control the bounding box using anSoTransform
(or similar) node. To scale or offset the height values, put a transform node in the scene graph before theSoHeightFieldGeometry
node. For example, to scale the height values by a factor of 2, you could use anSoScale
node with the scaleFactor field set to (0,0,2).Warning If you implement your own volume reader, we strongly recommend implementing the method
File format/default:SoVolumeReader.getTileMinMax()
. The tile min/max is used to improve the tesselation (adjust the number of triangles depending on the difference between min and max). Because of the way the height field algorithm works, if tile min/max info is not available, VolumeViz must load all height field tiles before the first render. This can cause a long delay before the first rendering appears.HeightFieldGeometry {
allocateResourceOnRender false data NODATA 0 0 0 UBYTE 8 dataRGBA false dataSetId 1 dataTransform NULL extent -1 -1 -1 1 1 1 fileName "" texturePrecision 0 undefinedValue NaN useCompressedTexture true useExtendedData false usePalettedTexture true useSharedPalettedTexture true
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.openinventor.volumeviz.nodes.SoVolumeData
SoVolumeData.Axis, SoVolumeData.CoordinateTypes, SoVolumeData.OverMethods, SoVolumeData.StorageHints, SoVolumeData.SubMethods
-
Nested classes/interfaces inherited from class com.openinventor.ldm.nodes.SoDataSet
SoDataSet.DataTypes, SoDataSet.LDMDataModifier
-
Nested classes/interfaces inherited from class com.openinventor.inventor.nodes.SoNode
SoNode.RenderModes
-
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
-
Field Summary
-
Fields inherited from class com.openinventor.volumeviz.nodes.SoVolumeData
data, dataRGBA, useExtendedData, usePalettedTexture, useSharedPalettedTexture
-
Fields inherited from class com.openinventor.ldm.nodes.SoDataSet
allocateResourceOnRender, dataSetId, dataTransform, extent, fileName, ldmResourceParameters, texturePrecision, undefinedValue, useCompressedTexture
-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Constructor Summary
Constructors Constructor Description SoHeightFieldGeometry()
Constructor.
-
Method Summary
-
Methods inherited from class com.openinventor.volumeviz.nodes.SoVolumeData
doAction, editSolidShape, editSubVolume, editSubVolume, editSurfaceShape, editTile, editTile, finishEditing, getCoordinateType, getDoubleMinMax, getHistogram, getMinMax, getRectilinearCoordinates, getRenderUnitID, getTexMemorySize, GLRender, redoEditing, reSampling, reSampling, setRGBAData, setTexMemorySize, startEditing, subSetting, undoEditing, updateRegions, useFakeData
-
Methods inherited from class com.openinventor.ldm.nodes.SoDataSet
callback, dataSize, editBoxes, getBoundingBox, getDataSize, getDataType, getDatumSize, getDimension, getLdmDataAccess, getLDMReader, getLDMTopoOctree, getMaxNumDataSets, getOverlapping, getReader, getTileDimension, handleEvent, hasEditedTile, isDataFloat, isDataInMemory, isDataSigned, isInMemory, numSigBits, pick, readTile, resetReader, setLDMDataModifier, setLDMReader, setReader, setReader, voxelToXYZ, voxelToXYZ, write, writeTile, XYZToVoxel, XYZToVoxel
-
Methods inherited from class com.openinventor.inventor.nodes.SoNode
affectsState, copy, copy, distribute, getAlternateRep, getByName, getMatrix, getPrimitiveCount, getRenderEngineMode, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, isBoundingBoxIgnoring, isOverride, rayPick, search, setOverride, touch
-
Methods inherited from class com.openinventor.inventor.fields.SoFieldContainer
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
-
Methods inherited from class com.openinventor.inventor.misc.SoBase
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable
-
Methods inherited from class com.openinventor.inventor.Inventor
getNativeResourceHandle
-
-