SoMarkerSet(3)
π NAME π
SoMarkerSet β bestie, this is the Coin class that displays a set of 2D bitmap markers in 3D. That's it. That's the whole job. Little 2D sprites, vibing in a 3D scene. π
(Manual page: SoMarkerSet(3), Coin manual, SoMarkerSet(3) β yes it says its own name three times, it's an icon like that. π
)
β¨ SYNOPSIS β¨
#include <Inventor/nodes/SoMarkerSet.h>
Inherits SoPointSet. So likeβ¦ it IS a point set, but make it fashion. π¦
πΈ Public Types πΈ
enum MarkerType
Every marker shape you could ever want, in three sizes (5Γ5, 7Γ7, 9Γ9), line and filled versions, no cap:
enum MarkerType { NONE = -1, CROSS_5_5, PLUS_5_5, MINUS_5_5, SLASH_5_5,
BACKSLASH_5_5, BAR_5_5, STAR_5_5, Y_5_5, LIGHTNING_5_5, WELL_5_5,
CIRCLE_LINE_5_5, SQUARE_LINE_5_5, DIAMOND_LINE_5_5,
TRIANGLE_LINE_5_5, RHOMBUS_LINE_5_5, HOURGLASS_LINE_5_5,
SATELLITE_LINE_5_5, PINE_TREE_LINE_5_5, CAUTION_LINE_5_5,
SHIP_LINE_5_5, CIRCLE_FILLED_5_5, SQUARE_FILLED_5_5,
DIAMOND_FILLED_5_5, TRIANGLE_FILLED_5_5, RHOMBUS_FILLED_5_5,
HOURGLASS_FILLED_5_5, SATELLITE_FILLED_5_5, PINE_TREE_FILLED_5_5,
CAUTION_FILLED_5_5, SHIP_FILLED_5_5, CROSS_7_7, PLUS_7_7, MINUS_7_7,
SLASH_7_7, BACKSLASH_7_7, BAR_7_7, STAR_7_7, Y_7_7, LIGHTNING_7_7,
WELL_7_7, CIRCLE_LINE_7_7, SQUARE_LINE_7_7, DIAMOND_LINE_7_7,
TRIANGLE_LINE_7_7, RHOMBUS_LINE_7_7, HOURGLASS_LINE_7_7,
SATELLITE_LINE_7_7, PINE_TREE_LINE_7_7, CAUTION_LINE_7_7,
SHIP_LINE_7_7, CIRCLE_FILLED_7_7, SQUARE_FILLED_7_7,
DIAMOND_FILLED_7_7, TRIANGLE_FILLED_7_7, RHOMBUS_FILLED_7_7,
HOURGLASS_FILLED_7_7, SATELLITE_FILLED_7_7, PINE_TREE_FILLED_7_7,
CAUTION_FILLED_7_7, SHIP_FILLED_7_7, CROSS_9_9, PLUS_9_9, MINUS_9_9,
SLASH_9_9, BACKSLASH_9_9, BAR_9_9, STAR_9_9, Y_9_9, LIGHTNING_9_9,
WELL_9_9, CIRCLE_LINE_9_9, SQUARE_LINE_9_9, DIAMOND_LINE_9_9,
TRIANGLE_LINE_9_9, RHOMBUS_LINE_9_9, HOURGLASS_LINE_9_9,
SATELLITE_LINE_9_9, PINE_TREE_LINE_9_9, CAUTION_LINE_9_9,
SHIP_LINE_9_9, CIRCLE_FILLED_9_9, SQUARE_FILLED_9_9,
DIAMOND_FILLED_9_9, TRIANGLE_FILLED_9_9, RHOMBUS_FILLED_9_9,
HOURGLASS_FILLED_9_9, SATELLITE_FILLED_9_9, PINE_TREE_FILLED_9_9,
CAUTION_FILLED_9_9, SHIP_FILLED_9_9, NUM_MARKERS }
NONE = -1 is the "no thoughts, head empty" option, and NUM_MARKERS is the lil sentinel at the end counting them all. β¨
π Public Types inherited from SoShape π
enum TriangleShape
enum TriangleShape { TRIANGLE_STRIP, TRIANGLE_FAN, TRIANGLES, POLYGON,
QUADS, QUAD_STRIP, POINTS, LINES, LINE_STRIP }
π Public Types inherited from SoNode π
enum NodeType
All the flavors of node-ness, with their hex values, no edits, no cuts:
enum NodeType { INVENTOR = 0x0000, VRML1 = 0x0001, VRML2 = 0x0002,
INVENTOR_1 = 0x0004, INVENTOR_2_0 = 0x0008, INVENTOR_2_1 = 0x0010,
INVENTOR_2_5 = 0x0020, INVENTOR_2_6 = 0x0040, COIN_1_0 = 0x0080,
COIN_2_0 = 0x0100, EXTENSION = 0x0200, COIN_2_2 = 0x0400, COIN_2_3 =
0x0800, COIN_2_4 = 0x1000, INVENTOR_5_0 = 0x2000, COIN_2_5 = 0x4000,
COIN_3_0 = 0x8000, INVENTOR_6_0 = 0x10000, COIN_4_0 = 0x20000 }
π«Ά Public Member Functions π«Ά
virtual SoType getTypeId (void) constβ the whole "who am I, type-wise" situation.SoMarkerSet (void)β constructor, the classic. Makes a new one.virtual void GLRender (SoGLRenderAction *action)β does the actual drawing when it's time to render, and it's handing the action over to do it.virtual void getPrimitiveCount (SoGetPrimitiveCountAction *action)β reports how many primitives are in here, for the counting girlies.
π«Ά Public Member Functions inherited from SoPointSet π«Ά
SoPointSet (void)virtual void getBoundingBox (SoGetBoundingBoxAction *action)
π«Ά Public Member Functions inherited from SoVertexShape π«Ά
virtual void notify (SoNotList *nl)virtual void write (SoWriteAction *action)
π«Ά Public Member Functions inherited from SoShape π«Ά
virtual SbBool affectsState (void) constvirtual void rayPick (SoRayPickAction *action)virtual void callback (SoCallbackAction *action)const SoBoundingBoxCache * getBoundingBoxCache (void) const
π«Ά Public Member Functions inherited from SoNode π«Ά
void setOverride (const SbBool state)SbBool isOverride (void) constvoid setNodeType (const NodeType type)NodeType getNodeType (void) constvirtual SoNode * copy (SbBool copyconnections=FALSE) constvirtual void doAction (SoAction *action)virtual void GLRenderBelowPath (SoGLRenderAction *action)virtual void GLRenderInPath (SoGLRenderAction *action)virtual void GLRenderOffPath (SoGLRenderAction *action)virtual void getMatrix (SoGetMatrixAction *action)virtual void handleEvent (SoHandleEventAction *action)virtual void pick (SoPickAction *action)virtual void search (SoSearchAction *action)virtual void audioRender (SoAudioRenderAction *action)virtual void grabEventsSetup (void)virtual void grabEventsCleanup (void)virtual void startNotify (void)SbUniqueId getNodeId (void) constvirtual SoChildList * getChildren (void) constvirtual void writeInstance (SoOutput *out)virtual SoNode * addToCopyDict (void) constvirtual void copyContents (const SoFieldContainer *from, SbBool copyconnections)virtual SoFieldContainer * copyThroughConnection (void) const
π«Ά Public Member Functions inherited from SoFieldContainer π«Ά
void setToDefaults (void)SbBool hasDefaultValues (void) constSbBool fieldsAreEqual (const SoFieldContainer *container) constvoid copyFieldValues (const SoFieldContainer *container, SbBool copyconnections=FALSE)SbBool set (const char *const fielddata)void get (SbString &fielddata)virtual int getFields (SoFieldList &l) constvirtual int getAllFields (SoFieldList &l) constvirtual SoField * getField (const SbName &name) constvirtual SoField * getEventIn (const SbName &name) constvirtual SoField * getEventOut (const SbName &name) constSbBool getFieldName (const SoField *const field, SbName &name) constSbBool enableNotify (const SbBool flag)SbBool isNotifyEnabled (void) constSbBool set (const char *fielddata, SoInput *input)void get (SbString &fielddata, SoOutput *out)virtual SbBool validateNewFieldValue (SoField *field, void *newval)virtual void addWriteReference (SoOutput *out, SbBool isfromfield=FALSE)SbBool getIsBuiltIn (void) constvirtual void getFieldsMemorySize (size_t &managed, size_t &unmanaged) constvoid setUserData (void *userdata) constvoid * getUserData (void) const
π«Ά Public Member Functions inherited from SoBase π«Ά
void ref (void) constvoid unref (void) constvoid unrefNoDelete (void) constint32_t getRefCount (void) constvoid touch (void)SbBool isOfType (SoType type) constβ ReturnsTRUEif the type of this object is either of the same type or inherited from type. (Translation: is this thing type, or does it descend from type? Yes?TRUE. π )virtual SbName getName (void) constvirtual void setName (const SbName &newname)void addAuditor (void *const auditor, const SoNotRec::Type type)void removeAuditor (void *const auditor, const SoNotRec::Type type)const SoAuditorList & getAuditors (void) constSbBool shouldWrite (void)void assertAlive (void) const
β Static Public Member Functions β
static SoType getClassTypeId (void)static void initClass (void)static int getNumDefinedMarkers (void)β how many markers exist rn.static void addMarker (int idx, const SbVec2s &size, const unsigned char *bytes, SbBool isLSBFirst=TRUE, SbBool isUpToDown=TRUE)β slide a new marker into slot idx. Note the two defaults, bothTRUE.static SbBool getMarker (int idx, SbVec2s &size, const unsigned char *&bytes, SbBool &isLSBFirst)β pull the marker at idx back out.static SbBool removeMarker (int idx)β yeet the marker at idx.static SbBool isMarkerBitSet (int idx, int bitNumber)β is that one specific bit set in that marker? π
β Static Public Member Functions inherited from SoPointSet β
static SoType getClassTypeId (void)static void initClass (void)
β Static Public Member Functions inherited from SoNonIndexedShape β
static SoType getClassTypeId (void)static void initClass (void)
β Static Public Member Functions inherited from SoVertexShape β
static SoType getClassTypeId (void)static void initClass (void)
β Static Public Member Functions inherited from SoShape β
static SoType getClassTypeId (void)static void initClass (void)β Sets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system. (It's giving "getting everyone on the same page" energy. π«Ά)static void getScreenSize (SoState *const state, const SbBox3f &boundingbox, SbVec2s &rectsize)static float getDecimatedComplexity (SoState *state, float complexity)
β Static Public Member Functions inherited from SoNode β
static uint32_t getCompatibilityTypes (const SoType &nodetype)static SoType getClassTypeId (void)static SoNode * getByName (const SbName &name)static int getByName (const SbName &name, SoNodeList &l)static void initClass (void)β Sets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system. β¨static void initClasses (void)static SbUniqueId getNextNodeId (void)static int getActionMethodIndex (const SoType type)static void getBoundingBoxS (SoAction *action, SoNode *node)static void GLRenderS (SoAction *action, SoNode *node)static void callbackS (SoAction *action, SoNode *node)static void getMatrixS (SoAction *action, SoNode *node)static void handleEventS (SoAction *action, SoNode *node)static void pickS (SoAction *action, SoNode *node)static void rayPickS (SoAction *action, SoNode *node)static void searchS (SoAction *action, SoNode *node)static void writeS (SoAction *action, SoNode *node)static void audioRenderS (SoAction *action, SoNode *node)static void getPrimitiveCountS (SoAction *action, SoNode *node)
β Static Public Member Functions inherited from SoFieldContainer β
static void initClass (void)β Sets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system. πstatic SoType getClassTypeId (void)β This static method returns theSoTypeobject associated with objects of this class.static void cleanupClass (void)static void initCopyDict (void)static void addCopy (const SoFieldContainer *orig, const SoFieldContainer *copy)static SoFieldContainer * checkCopy (const SoFieldContainer *orig)static SoFieldContainer * findCopy (const SoFieldContainer *orig, const SbBool copyconnections)static void copyDone (void)
β Static Public Member Functions inherited from SoBase β
static void initClass (void)β Sets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system. πstatic SoType getClassTypeId (void)β This static method returns theSoTypeobject associated with objects of this class.static void addName (SoBase *const base, const char *const name)static void removeName (SoBase *const base, const char *const name)static void incrementCurrentWriteCounter (void)static void decrementCurrentWriteCounter (void)static SoBase * getNamedBase (const SbName &name, SoType type)static int getNamedBases (const SbName &name, SoBaseList &baselist, SoType type)static SbBool read (SoInput *input, SoBase *&base, SoType expectedtype)static void setInstancePrefix (const SbString &c)static void setTraceRefs (SbBool trace)static SbBool getTraceRefs (void)static SbBool connectRoute (SoInput *input, const SbName &fromnodename, const SbName &fromfieldname, const SbName &tonodename, const SbName &tofieldname)static SbBool readRoute (SoInput *input)
π Public Attributes π
SoMFInt32 markerIndexβ the field where you tell it which markers to draw. Main character field fr fr. π
β¨ Public Attributes inherited from SoPointSet β¨
bestie these are the fields you inherit just by being a SoPointSet-adjacent queen π
SoSFInt32 numPointsβ the field that holds how many points are in your set. iconic.
πΈ Public Attributes inherited from SoNonIndexedShape πΈ
SoSFInt32 startIndexβ the field that says where in the coordinate list to start. lowkey important.
π¦ Public Attributes inherited from SoVertexShape π¦
SoSFNode vertexPropertyβ the field that can hold a node supplying your vertex data. main character energy.
π PROTECTED MEMBER FUNCTIONS π
these are the ones you get to poke at if you're subclassing, no cap π
virtual const SoFieldData * getFieldData (void) constβ hands you the field data table. it's giving "here's the receipts".virtual ~SoMarkerSet ()β the destructor. protected, so only the family gets to call it. π
π₯ Protected Member Functions inherited from SoPointSet π₯
virtual ~SoPointSet ()β destructor, protected vibes.virtual void generatePrimitives (SoAction *action)β makes the primitives for rendering/picking.virtual void computeBBox (SoAction *action, SbBox3f &box, SbVec3f ¢er)β works out the bounding box and its center.virtual SbBool generateDefaultNormals (SoState *, SoNormalCache *nc)β generates default normals, caching them.virtual SbBool generateDefaultNormals (SoState *state, SoNormalBundle *bundle)β same energy, but with a normal bundle.
π§ Protected Member Functions inherited from SoNonIndexedShape π§
SoNonIndexedShape (void)β constructor, protected.virtual ~SoNonIndexedShape ()β destructor, protected.void computeCoordBBox (SoAction *action, int numVertices, SbBox3f &box, SbVec3f ¢er)β computes the bounding box from a bunch of coordinates.void fixNumVerticesPointers (SoState *state, const int32_t *&start, const int32_t *&end, int32_t *dummyarray) constβ fixes up the vertex pointers so nothing goes feral. π
β Protected Member Functions inherited from SoVertexShape β
SoVertexShape (void)β constructor.virtual ~SoVertexShape ()β destructor.virtual SbBool shouldGLRender (SoGLRenderAction *action)β decides whether this shape should actually get GL-rendered.void setNormalCache (SoState *const state, const int num, const SbVec3f *normals)β stashes normals in the cache.SoNormalCache * getNormalCache (void) constβ retrieves the normal cache.SoNormalCache * generateAndReadLockNormalCache (SoState *const state)β generates and read-locks the normal cache.void getVertexData (SoState *state, const SoCoordinateElement *&coords, const SbVec3f *&normals, const SbBool neednormals)β pulls out the vertex data you need.void readLockNormalCache (void)β locks the normal cache for reading.void readUnlockNormalCache (void)β unlocks it again. balanced, as all things should be. π«Ά
π Protected Member Functions inherited from SoShape π
SoShape (void)β constructor.virtual ~SoShape ()β destructor.float getComplexityValue (SoAction *action)β returns the complexity value for the action.void beginSolidShape (SoGLRenderAction *action)β starts a solid shape render.void endSolidShape (SoGLRenderAction *action)β ends it.void GLRenderBoundingBox (SoGLRenderAction *action)β GL-renders the bounding box.SbBool shouldPrimitiveCount (SoGetPrimitiveCountAction *action)β should we count primitives? yes/no.SbBool shouldRayPick (SoRayPickAction *const action)β should we bother ray picking? yes/no.void computeObjectSpaceRay (SoRayPickAction *const action)β computes the ray in object space.void computeObjectSpaceRay (SoRayPickAction *const action, const SbMatrix &matrix)β same, but you hand it the matrix.virtual SoDetail * createTriangleDetail (SoRayPickAction *action, const SoPrimitiveVertex *v1, const SoPrimitiveVertex *v2, const SoPrimitiveVertex *v3, SoPickedPoint *pp)β builds a detail object for a picked triangle.virtual SoDetail * createLineSegmentDetail (SoRayPickAction *action, const SoPrimitiveVertex *v1, const SoPrimitiveVertex *v2, SoPickedPoint *pp)β detail for a picked line segment.virtual SoDetail * createPointDetail (SoRayPickAction *action, const SoPrimitiveVertex *v, SoPickedPoint *pp)β detail for a picked point.void invokeTriangleCallbacks (SoAction *const action, const SoPrimitiveVertex *const v1, const SoPrimitiveVertex *const v2, const SoPrimitiveVertex *const v3)β fires the triangle callbacks.void invokeLineSegmentCallbacks (SoAction *const action, const SoPrimitiveVertex *const v1, const SoPrimitiveVertex *const v2)β fires the line-segment callbacks.void invokePointCallbacks (SoAction *const action, const SoPrimitiveVertex *const v)β fires the point callbacks.void beginShape (SoAction *const action, const TriangleShape shapetype, SoDetail *const detail=NULL)β kicks off a shape.void shapeVertex (const SoPrimitiveVertex *const v)β feeds a vertex into the shape.void endShape (void)β wraps the shape up.void generateVertex (SoPrimitiveVertex *const pv, const SbVec3f &point, const SbBool useTexFunc, const SoMultiTextureCoordinateElement *const tce, const float s, const float t, const SbVec3f &normal)β builds a vertex from a point plus ans/ttexture coord and a normal.void generateVertex (SoPrimitiveVertex *const pv, const SbVec3f &point, const SbBool useTexFunc, const SoMultiTextureCoordinateElement *const tce, const float s, const float t, const float r, const SbVec3f &normal)β same but with the extrartexture coord. 3D texture girlies know. πSbBool startVertexArray (SoGLRenderAction *action, const SoCoordinateElement *coords, const SbVec3f *pervertexnormals, const SbBool texpervertex, const SbBool colorpervertex)β sets up the vertex array for GL rendering.void finishVertexArray (SoGLRenderAction *action, const SbBool vbo, const SbBool normpervertex, const SbBool texpervertex, const SbBool colorpervertex)β tears it down when you're done.
π Protected Member Functions inherited from SoNode π
SoNode (void)β constructor.virtual ~SoNode ()β destructor.virtual SbBool readInstance (SoInput *in, unsigned short flags)β reads the node instance from input.
π Protected Member Functions inherited from SoFieldContainer π
SoFieldContainer (void)β constructor.virtual ~SoFieldContainer ()β destructor.
π Protected Member Functions inherited from SoBase π
SoBase (void)β constructor.virtual ~SoBase ()β destructor.virtual void destroy (void)β nukes the object.SbBool hasMultipleWriteRefs (void) constβ checks whether there are multiple write references.SbBool writeHeader (SoOutput *out, SbBool isgroup, SbBool isengine) constβ writes the output header.void writeFooter (SoOutput *out) constβ writes the footer.virtual const char * getFileFormatName (void) constβ returns the file format name.virtual SoNotRec createNotRec (void)β creates a notification record.
π STATIC PROTECTED MEMBER FUNCTIONS π
static const SoFieldData ** getFieldDataPtr (void)β gives you a pointer to the field data pointer. very meta of it. β¨
π Static Protected Member Functions inherited from SoPointSet π
static const SoFieldData ** getFieldDataPtr (void)
π Static Protected Member Functions inherited from SoNonIndexedShape π
static const SoFieldData ** getFieldDataPtr (void)
π Static Protected Member Functions inherited from SoVertexShape π
static const SoFieldData ** getFieldDataPtr (void)
π Static Protected Member Functions inherited from SoShape π
static const SoFieldData ** getFieldDataPtr (void)
π Static Protected Member Functions inherited from SoNode π
static const SoFieldData ** getFieldDataPtr (void)static void setNextActionMethodIndex (int index)β sets the next action method index.static int getNextActionMethodIndex (void)β reads it back.static void incNextActionMethodIndex (void)β bumps it by one.static void setCompatibilityTypes (const SoType &nodetype, const uint32_t bitmask)β sets compatibility types for a node type.
π Static Protected Member Functions inherited from SoBase π
static uint32_t getCurrentWriteCounter (void)β returns the current write counter.static void staticDataLock (void)β locks the static data.static void staticDataUnlock (void)β unlocks the static data.
π ADDITIONAL INHERITED MEMBERS π
π«§ Protected Types inherited from SoBase π«§
enum BaseFlags { IS_ENGINE = 0x01, IS_GROUP = 0x02 }
π«§ Protected Attributes inherited from SoNode π«§
SbUniqueId uniqueIdβ this node's unique id.
π«§ Protected Attributes inherited from SoFieldContainer π«§
SbBool isBuiltInβ whether the field container is built-in.
π«§ Static Protected Attributes inherited from SoNode π«§
static SbUniqueId nextUniqueId = 1β the counter for the next unique id, starting at1.static int nextActionMethodIndex = 0β the next action method index, starting at0.
π DETAILED DESCRIPTION π
okay so listen bestie, the SoMarkerSet class displays a set of 2D bitmap markers in 3D. yes literally, flat little markers, floating in your 3D scene. π
This node uses the coordinates currently on the state (or in the vertexProperty field) in order. The numPoints field specifies the number of points in the set.
In addition to supplying the user with a set of standard markers to choose from, it is also possible to specify one's own bitmaps for markers. custom marker girlies, this is your moment. π¨
This node class is an extension versus the original SGI Inventor v2.1 API. In addition to being a Coin extension, it is also present in TGS' Inventor implementation. (Note that TGS's implementation doesn't support the NONE markerIndex value.) β οΈ so heads up, that one specific value is a Coin-only treat.
FILE FORMAT/DEFAULTS:
MarkerSet {
vertexProperty NULL
startIndex 0
numPoints -1
markerIndex 0
}
Since
- TGS Inventor 2.5
- Coin 1.0
π MEMBER ENUMERATION DOCUMENTATION π
enum SoMarkerSet::MarkerType
Defines the different standard markers. that's the whole vibe of this enum, she's here to name your markers. π
π¬ CONSTRUCTOR & DESTRUCTOR DOCUMENTATION π¬
SoMarkerSet::SoMarkerSet (void )
Constructor. she's born. πΈ
SoMarkerSet::~SoMarkerSet () [protected], [virtual]
Destructor. protected + virtual, so she goes out with dignity. π
β¨ Member Function Documentation β¨
Okay bestie, this is the part where we meet the actual functions β the little worker bees of SoMarkerSet. Every single one, no skipping, because we don't gatekeep here. π
πΈ SoType SoMarkerSet::getClassTypeId (void ) [static]
This static method returns the SoType object associated with objects of this class. That's it, that's the whole gig β it hands you the class-wide type token. π
π¦ SoType SoMarkerSet::getTypeId (void ) const [virtual]
Returns the type identification of an object derived from a class inheriting SoBase. This is what powers runtime type checking and "downward" casting β iykyk, it's how you figure out what you're actually holding at runtime before you cast down to it. π
- Reimplemented from
SoPointSet.
π
const SoFieldData ** SoMarkerSet::getFieldDataPtr (void ) [static], [protected]
This API member is considered internal to the library, as it is not likely to be of interest to the application programmer. So likeβ¦ it's giving backstage pass, not front row. π
Returns the SoFieldData class which holds information about fields in this node.
π§ const SoFieldData * SoMarkerSet::getFieldData (void ) const [protected], [virtual]
Returns a pointer to the class-wide field data storage object for this instance. If no fields are present, returns NULL.
- Reimplemented from
SoPointSet.
β void SoMarkerSet::initClass (void ) [static]
The docs give this one zero description β literally nothing. So we are not making anything up, bestie: it's a static void function taking void, and that's all the page tells us. Periodt. π
π₯ void SoMarkerSet::GLRender (SoGLRenderAction * action) [virtual]
Action method for the SoGLRenderAction.
This is called during rendering traversals. Nodes influencing the rendering state in any way, or that want to throw geometry primitives at OpenGL, override this method. Main character energy for the render pipeline. π
- Reimplemented from
SoPointSet.
π void SoMarkerSet::getPrimitiveCount (SoGetPrimitiveCountAction * action) [virtual]
Action method for the SoGetPrimitiveCountAction.
Calculates the number of triangle, line segment and point primitives for the node and adds these to the counters of the action.
Nodes influencing how geometry nodes calculate their primitive count also override this method to change the relevant state variables.
- Reimplemented from
SoPointSet.
π int SoMarkerSet::getNumDefinedMarkers (void ) [static]
Returns the number of defined markers. Cute, simple, does exactly what it says on the tin. β¨
π void SoMarkerSet::addMarker (int idx, const SbVec2s & size, const unsigned char * bytes, SbBool isLSBFirst = TRUE, SbBool isUpToDown = TRUE) [static]
Replace the bitmap for the marker at idx with the representation given by size dimensions with the bitmap data at bytes. isLSBFirst and isUpToDown indicates how the bitmap data is ordered. Does nothing if markerIndex is NONE.
Here's a complete usage example which demonstrates how to set up a user specified marker from a character map. Note that the "multi colored" pixmap data is converted to a monochrome bitmap before being passed to addMarker() because addMarker() supports only bitmaps.
const int WIDTH = 18;
const int HEIGHT = 19;
const int BYTEWIDTH = (WIDTH + 7) / 2;
const char coin_marker[WIDTH * HEIGHT + 1] = {
".+ "
"+@.+ "
" .@#.+ "
" +$@##.+ "
" .%@&##.+ "
" +$@&&*##.+ "
" .%@&&*=##.+ "
" +$@&&&&=-##.+ "
" .%@&&&&&-;#&+ "
" +$@&&&&&&=#. "
" .%@&&&&*#. "
" +$@&&&&#. "
" .%@&@%@#. "
" +$%@%.$@#. "
" .%%. .$@#. "
" +$. .$>#."
" + .$. "
" . "
" " };
int byteidx = 0;
unsigned char bitmapbytes[BYTEWIDTH * HEIGHT];
for (int h = 0; h < HEIGHT; h++) {
unsigned char bits = 0;
for (int w = 0; w < WIDTH; w++) {
if (coin_marker[(h * WIDTH) + w] != ' ') { bits |= (0x80 >> (w % 8)); }
if ((((w + 1) % 8) == 0) || (w == WIDTH - 1)) {
bitmapbytes[byteidx++] = bits;
bits = 0;
}
}
}
int MYAPP_ARROW_IDX = SoMarkerSet::getNumDefinedMarkers(); // add at end
SoMarkerSet::addMarker(MYAPP_ARROW_IDX, SbVec2s(WIDTH, HEIGHT),
bitmapbytes, FALSE, TRUE);
This will provide you with an index given by MYAPP_ARROW_IDX which can be used in SoMarkerSet::markerIndex to display the new marker. Obsessed with a custom marker era, honestly. π
π«Ά SbBool SoMarkerSet::getMarker (int idx, SbVec2s & size, const unsigned char *& bytes, SbBool & isLSBFirst) [static]
Returns data for marker at idx in the size, bytes and isLSBFirst parameters.
If no marker is defined for given idx, or SoMarkerSet::markerIndex is NONE (not removable), FALSE is returned. If everything is OK, TRUE is returned.
π SbBool SoMarkerSet::removeMarker (int idx) [static]
Removes marker at idx.
If no marker is defined for given idx, or SoMarkerSet::markerIndex is NONE (not removable), FALSE is returned. If everything is OK, TRUE is returned.
π SbBool SoMarkerSet::isMarkerBitSet (int idx, int bitNumber) [static]
Not supported in Coin. Should probably not have been part of the public Open Inventor API. Yeahβ¦ it's giving legacy baggage, bestie. Not our problem, just don't rely on it. π©
π Member Data Documentation π
π SoMFInt32 SoMarkerSet::markerIndex
Contains the set of index markers to display, defaults to 0 (CROSS_5_5). The special value NONE renders nothing for that marker.
Lowkey the most important field on this whole node β it's literally the list of which markers you're showing. Default0=CROSS_5_5, andNONE= vibes only, nothing rendered. β¨
π Author π
Generated automatically by Doxygen for Coin from the source code. (Yes, a robot wrote it. We just gave it a glow-up. π )
And that's a wrap on SoMarkerSet(3), bestie! This page came to you from Coin version 4.0.10, dated Thu Jun 25 2026 00:00:00, and if you ever need to find it again it lives under SoMarkerSet(3). Go render something iconic with it. π¦ππ
π¦ where this page comes from
- fedora 43: Coin4-devel 4.0.10-1.fc43 Β· BSD-3-Clause AND GPL-3.0-or-later
- fedora 43: Coin4-devel 4.0.10-1.fc43 Β· BSD-3-Clause AND GPL-3.0-or-later
- fedora 44: Coin4-devel 4.0.10-1.fc44 Β· BSD-3-Clause AND GPL-3.0-or-later
- fedora 44: Coin4-devel 4.0.10-1.fc44 Β· BSD-3-Clause AND GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms