public class SoMarker extends SoNode
SoMarkerSet
and 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).
Note:
Marker definitions are used by the SoMarkerSet
and SoIndexedMarkerSet
nodes. To make a custom marker available to these nodes, use one of the addMarker methods defined in those classes.
An SoMarker
node 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 SoMarker
nodes are written out to an Inventor file if an SoWriteAction
is applied to the scene graph. So adding SoMarker
nodes 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) );
File format/default:
Marker {
bitmap | 0 |
orderedRGBA | 0 |
upToDown | true |
LSBFirst | true |
size | (0, 0) |
index | -1 |
See also:
Modifier and Type | Class and Description |
---|---|
static class |
SoMarker.MarkerTypes
Marker type.
|
SoNode.RenderModes
Inventor.ConstructorCommand
Modifier and Type | Field and Description |
---|---|
SoMFUByte |
bitmap
Defines the current marker data buffer.
|
SoSFInt32 |
index
Defines the marker index.
|
SoSFBool |
isLSBFirst
if 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.
|
SoMFUInt32 |
orderedRGBA
Defines the marker coloration mask.
|
SoSFVec2s |
size
Defines the size (in pixels) of the marker.
|
SoSFBool |
upToDown
if true, marker bitmap is described from down to up (that is bytes[0] is the left bottom corner of the bitmap), otherwise from up to down (that is bytes[0] is the top left corner).
|
VERBOSE_LEVEL, ZeroHandle
Constructor and Description |
---|
SoMarker()
Marker constructor.
|
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
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable
getNativeResourceHandle
public final SoMFUByte bitmap
public final SoMFUInt32 orderedRGBA
public final SoSFBool upToDown
public final SoSFBool isLSBFirst
public final SoSFVec2s size
public final SoSFInt32 index
Generated on July 31, 2019, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com