- All Implemented Interfaces:
public class SoMarker extends SoNodeDefines a custom bitmap for
SoIndexedMarkerSet. This class defines a Marker. A marker is an image defined by a bitmap and optional color values. If no color values are given then image pixels corresponding to "1" bits are drawn using the current material color (see
SoMaterial) and pixels corresponding to "0" bits are not drawn (whatever is behind the marker shows through). If color values are given then each pixel in the image can be assigned an RGBA value.
size is the dimensions of the marker image in pixels. bitmap is the marker bitmap. The bitmap is arranged row by row, from left to right and up to down (or down to up according to the parameter isUpToDown ). Each byte specifies eight pixels. If isLSBFirst is true, bits are ordered within a byte from Least Significant to Most Significant; otherwise the first bit in each byte is the most significant one. If isUpToDown is true, the marker bitmap is described from down to up (first byte is the bottom left corner of the bitmap), otherwise from up to down (first byte is the top left corner). orderedRGBA is an optional color mask to apply to the marker. The color mask is arranged the same as bitmap, but each value (unsigned integer) specifies the color of one pixel. Each color is an ordered RGBA value. A value of 0xFF for Alpha makes the color mask be ignored for this pixel, and the color is inherited from the state depending on the bitmap value (as if no color values were given).
- If only orderedRGBA values are set, the bitmap is assumed to be a fully defined set of "1" bits.
- Marker size must be greater than 1x1.
SoMarkernode can be added to the scene graph, but it is not a geometry node or an attribute node (does not render anything and does not affect the traversal state list). However
SoMarkernodes are written out to an Inventor file if an
SoWriteActionis applied to the scene graph. So adding
SoMarkernodes to the scene graph allows custom marker definitions to be saved and restored. For example:
// Add markers to scene graph in order to export them in IV file. root.addChild( SoMarkerSet.getMarker(90) ); root.addChild( SoMarkerSet.getMarker(91) ); root.addChild( SoMarkerSet.getMarker(92) );
bitmap 0 orderedRGBA 0 upToDown true LSBFirst true size (0, 0) index -1
Nested Class Summary
Nested Classes Modifier and Type Class Description
Nested classes/interfaces inherited from class com.openinventor.inventor.nodes.SoNode
Fields Modifier and Type Field Description
bitmapDefines the current marker data buffer.
indexDefines the marker index.
isLSBFirstif true, bits are ordered within a byte from Least Significant to most significant; otherwise the first bit in each byte is the most significant one.
orderedRGBADefines the marker coloration mask.
sizeDefines the size (in pixels) of the marker.
upToDownif true, marker bitmap is described from down to up (that is bytes is the left bottom corner of the bitmap), otherwise from up to down (that is bytes is the top left corner).
Constructors Constructor Description
Methods inherited from class com.openinventor.inventor.nodes.SoNode
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderEngineMode, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, write
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
public final SoMFUByte bitmapDefines the current marker data buffer.
public final SoMFUInt32 orderedRGBADefines the marker coloration mask.
public final SoSFBool upToDownif true, marker bitmap is described from down to up (that is bytes is the left bottom corner of the bitmap), otherwise from up to down (that is bytes is the top left corner).
public final SoSFBool isLSBFirstif true, bits are ordered within a byte from Least Significant to most significant; otherwise the first bit in each byte is the most significant one.
public final SoSFVec2s sizeDefines the size (in pixels) of the marker. Must be greater than 1x1
public final SoSFInt32 indexDefines the marker index.