SoImage(3)

πŸ“¦ version 2.5.0, in fedora 43, fedora 44

πŸŽ€ NAME πŸŽ€

SoImage β€” bestie, this is the class that draws a 2D image on the viewport. That's it. That's the whole job. And it does it beautifully. πŸ’…βœ¨


πŸ¦‹ SYNOPSIS πŸ¦‹

Okay so first thing, you gotta pull it in like this:

#include <Inventor/nodes/SoImage.h>

And it inherits SoShape, so it's got all that shape lineage going on. Family tree said slay. πŸ‘‘

🌸 Public Types 🌸

Two little enums, both about where your image sits. Very "which corner of the selfie" energy:

enum VertAlignment { BOTTOM, HALF, TOP }
enum HorAlignment { LEFT, CENTER, RIGHT }

πŸ’œ Public Types inherited from SoShape

The shape ancestors handed down this one:

enum TriangleShape { TRIANGLE_STRIP, TRIANGLE_FAN, TRIANGLES, POLYGON,
    QUADS, QUAD_STRIP, POINTS, LINES, LINE_STRIP }

πŸ’œ Public Types inherited from SoNode

And the node ancestors brought this absolute unit of an enum, every single value, no skips:

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
    }

🫢 Public Member Functions 🫢

These are hers. Her own methods. Main character energy fr fr:

  • virtual SoType getTypeId (void) const β€” the "who am I" check, virtual because she's fancy.
  • SoImage (void) β€” the constructor, aka the birth certificate. 🍼
  • virtual void GLRender (SoGLRenderAction *action) β€” this is the one that actually puts the pixels on screen. The moment. ✨
  • virtual void rayPick (SoRayPickAction *action) β€” picking, but with rays. Yes bestie, rays.
  • virtual void getPrimitiveCount (SoGetPrimitiveCountAction *action) β€” counts the primitives, and honestly good for her.

🌈 Public Member Functions inherited from SoShape

Everything the shape parent is passing down. Not hers, but she's carrying it with grace:

  • virtual SbBool affectsState (void) const
  • virtual void getBoundingBox (SoGetBoundingBoxAction *action)
  • virtual void callback (SoCallbackAction *action)
  • const SoBoundingBoxCache * getBoundingBoxCache (void) const

🌈 Public Member Functions inherited from SoNode

The node side of the family. Long list, but we don't skip, we never skip πŸ’€:

  • void setOverride (const SbBool state)
  • SbBool isOverride (void) const
  • void setNodeType (const NodeType type)
  • NodeType getNodeType (void) const
  • virtual SoNode * copy (SbBool copyconnections=0) const
  • virtual 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 write (SoWriteAction *action)
  • virtual void audioRender (SoAudioRenderAction *action)
  • virtual void grabEventsSetup (void)
  • virtual void grabEventsCleanup (void)
  • virtual void startNotify (void)
  • uint32_t getNodeId (void) const
  • virtual SoChildList * getChildren (void) const
  • virtual void writeInstance (SoOutput *out)
  • virtual SoNode * addToCopyDict (void) const
  • virtual void copyContents (const SoFieldContainer *from, SbBool copyconnections)
  • virtual SoFieldContainer * copyThroughConnection (void) const

🌈 Public Member Functions inherited from SoFieldContainer

Field management. The admin work of the family, and it's giving organized. πŸ“‹

  • void setToDefaults (void)
  • SbBool hasDefaultValues (void) const
  • SbBool fieldsAreEqual (const SoFieldContainer *container) const
  • void copyFieldValues (const SoFieldContainer *container, SbBool copyconnections=0)
  • SbBool set (const char *const fielddata)
  • void get (SbString &fielddata)
  • virtual int getFields (SoFieldList &l) const
  • virtual int getAllFields (SoFieldList &l) const
  • virtual SoField * getField (const SbName &name) const
  • virtual SoField * getEventIn (const SbName &name) const
  • virtual SoField * getEventOut (const SbName &name) const
  • SbBool getFieldName (const SoField *const field, SbName &name) const
  • SbBool enableNotify (const SbBool flag)
  • SbBool isNotifyEnabled (void) const
  • SbBool set (const char *fielddata, SoInput *in)
  • void get (SbString &fielddata, SoOutput *out)
  • virtual SbBool validateNewFieldValue (SoField *field, void *newval)
  • virtual void addWriteReference (SoOutput *out, SbBool isfromfield=0)
  • SbBool getIsBuiltIn (void) const
  • void setUserData (void *userdata) const
  • void * getUserData (void) const

🌈 Public Member Functions inherited from SoBase

The root of the whole tree. The great-grandparent that started it all 🫢:

  • void ref (void) const
  • void unref (void) const
  • void unrefNoDelete (void) const
  • int32_t getRefCount (void) const
  • void touch (void)
  • SbBool isOfType (SoType type) const
  • virtual SbName getName (void) const
  • virtual 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) const
  • SbBool shouldWrite (void)
  • void assertAlive (void) const

⭐ Static Public Member Functions ⭐

Static besties β€” no instance needed, they just exist:

  • static SoType getClassTypeId (void)
  • static void initClass (void)

πŸ¦‹ Static Public Member Functions inherited from SoShape

  • static SoType getClassTypeId (void)
  • static void initClass (void)
  • 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)
  • static void initClasses (void)
  • static uint32_t 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)
  • static SoType getClassTypeId (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)
  • static SoType getClassTypeId (void)
  • 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 *in, SoBase *&base, SoType expectedtype)
  • static void setInstancePrefix (const SbString &c)
  • static void setTraceRefs (SbBool trace)
  • static SbBool getTraceRefs (void)
  • static SbBool connectRoute (SoInput *in, const SbName &fromnodename, const SbName &fromfieldname, const SbName &tonodename, const SbName &tofieldname)
  • static SbBool readRoute (SoInput *in)

🧚 Public Attributes 🧚

These are the fields you actually get to poke at. The controls. The levers. The ✨dashboard✨:

  • SoSFInt32 width
  • SoSFInt32 height
  • SoSFEnum vertAlignment
  • SoSFEnum horAlignment
  • SoSFImage image
  • SoSFString filename

πŸ™ˆ Protected Member Functions πŸ™ˆ

Protected = family only, bestie. You can't just call these from outside, that's not the vibe:

  • virtual const SoFieldData * getFieldData (void) const
  • virtual ~SoImage () β€” the destructor. She has to clean up after herself, iconic.
  • virtual void generatePrimitives (SoAction *action)
  • virtual void computeBBox (SoAction *action, SbBox3f &box, SbVec3f &center)
  • virtual SbBool readInstance (SoInput *in, unsigned short flags)
  • virtual void notify (SoNotList *list)
  • int getReadStatus (void)
  • void setReadStatus (SbBool flag)

πŸ“ Protected Member Functions inherited from SoShape

  • SoShape (void)
  • virtual ~SoShape ()
  • float getComplexityValue (SoAction *action)
  • virtual SbBool shouldGLRender (SoGLRenderAction *action)
  • void beginSolidShape (SoGLRenderAction *action)
  • void endSolidShape (SoGLRenderAction *action)
  • void GLRenderBoundingBox (SoGLRenderAction *action)
  • SbBool shouldPrimitiveCount (SoGetPrimitiveCountAction *action)
  • SbBool shouldRayPick (SoRayPickAction *const action)
  • void computeObjectSpaceRay (SoRayPickAction *const action)
  • void computeObjectSpaceRay (SoRayPickAction *const action, const SbMatrix &matrix)
  • virtual SoDetail * createTriangleDetail (SoRayPickAction *action, const SoPrimitiveVertex *v1, const SoPrimitiveVertex *v2, const SoPrimitiveVertex *v3, SoPickedPoint *pp)
  • virtual SoDetail * createLineSegmentDetail (SoRayPickAction *action, const SoPrimitiveVertex *v1, const SoPrimitiveVertex *v2, SoPickedPoint *pp)
  • virtual SoDetail * createPointDetail (SoRayPickAction *action, const SoPrimitiveVertex *v, SoPickedPoint *pp)
  • void invokeTriangleCallbacks (SoAction *const action, const SoPrimitiveVertex *const v1, const SoPrimitiveVertex *const v2, const SoPrimitiveVertex *const v3)
  • void invokeLineSegmentCallbacks (SoAction *const action, const SoPrimitiveVertex *const v1, const SoPrimitiveVertex *const v2)
  • void invokePointCallbacks (SoAction *const action, const SoPrimitiveVertex *const v)
  • void beginShape (SoAction *const action, const TriangleShape shapetype, SoDetail *const detail=NULL)
  • void shapeVertex (const SoPrimitiveVertex *const v)
  • void endShape (void)
  • void generateVertex (SoPrimitiveVertex *const pv, const SbVec3f &point, const SbBool useTexFunc, const SoTextureCoordinateElement *const tce, const float s, const float t, const SbVec3f &normal)
  • void generateVertex (SoPrimitiveVertex *const pv, const SbVec3f &point, const SbBool useTexFunc, const SoTextureCoordinateElement *const tce, const float s, const float t, const float r, const SbVec3f &normal)
  • SbBool startVertexArray (SoGLRenderAction *action, const SoCoordinateElement *coords, const SbVec3f *pervertexnormals, const SbBool texpervertex, const SbBool colorpervertex)
  • void finishVertexArray (SoGLRenderAction *action, const SbBool vbo, const SbBool normpervertex, const SbBool texpervertex, const SbBool colorpervertex)

πŸ“ Protected Member Functions inherited from SoNode

  • SoNode (void)
  • virtual ~SoNode ()

πŸ“ Protected Member Functions inherited from SoFieldContainer

  • SoFieldContainer (void)
  • ~SoFieldContainer ()

πŸ“ Protected Member Functions inherited from SoBase

  • SoBase (void)
  • virtual ~SoBase ()
  • virtual void destroy (void)
  • SbBool hasMultipleWriteRefs (void) const
  • SbBool writeHeader (SoOutput *out, SbBool isgroup, SbBool isengine) const
  • void writeFooter (SoOutput *out) const
  • virtual const char * getFileFormatName (void) const

πŸ’€ Static Protected Member Functions πŸ’€

Just the one, and she's lowkey mysterious:

  • static const SoFieldData ** getFieldDataPtr (void)

okay so that's the whole SYNOPSIS bestie and there is so much more coming, do not go anywhere πŸ‘€βœ¨

Static Protected Member Functions inherited from SoShape

  • static const SoFieldData ** getFieldDataPtr (void) β€” hands you the pointer-to-pointer to the class-wide field data. Yes bestie, same name as the one from SoNode πŸ’€

Static Protected Member Functions inherited from SoNode

  • static const SoFieldData ** getFieldDataPtr (void) β€” the SoNode version of the exact same thing.
  • static void setNextActionMethodIndex (int index) β€” sets the next action method index to index.
  • static int getNextActionMethodIndex (void) β€” tells you what that next action method index currently is.
  • static void incNextActionMethodIndex (void) β€” bumps that index up by one.
  • static void setCompatibilityTypes (const SoType &nodetype, const uint32_t bitmask) β€” registers compatibility types for nodetype using bitmask.

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 it again. πŸ”“

🌈 Additional Inherited Members 🌈

Protected Types inherited from SoBase

  • enum BaseFlags { IS_ENGINE = 0x01, IS_GROUP = 0x02 } β€” the little flag enum the base class keeps around.

Protected Attributes inherited from SoNode

  • uint32_t uniqueId β€” every node's very own id, no duplicates, periodt.

Protected Attributes inherited from SoFieldContainer

  • SbBool isBuiltIn β€” is it a built-in one or not, that's the question.

Static Protected Attributes inherited from SoNode

  • static uint32_t nextUniqueId = 0 β€” the counter that hands out all those unique ids.
  • static int nextActionMethodIndex = 0 β€” and the counter for the next action method index.

✨ Detailed Description ✨

The SoImage class draws a 2D image on the viewport. It's giving "picture, but make it 3D scene graph" πŸ–ΌοΈ

You can set up that image in one of two ways: either through the image field, or by handing over a filename. And if you specify width and/or height, the image gets resized to match those values before it's displayed. Slay.

The current modelview matrix is what's used to find the viewport position, and the image is rendered right there in that position β€” with z-buffer testing activated, no cap.

Here's a simple, stand-alone example on how to set up and show an SoImage:

#include <stdlib.h>
#include <Inventor/Qt/SoQt.h>
#include <Inventor/Qt/viewers/SoQtExaminerViewer.h>
#include <Inventor/nodes/SoSeparator.h>
#include <Inventor/nodes/SoCamera.h>
#include <Inventor/nodes/SoCube.h>
#include <Inventor/nodes/SoImage.h>

static void
mandel(double sr, double si, double width, double height,
       int bwidth, int bheight, int mult, unsigned char * bmp, int n)
{
  double zr, zr_old, zi, cr, ci;
  int w;

  for (int y=0; y<bheight; y++)
    for (int x=0; x<bwidth; x++) {
      cr = ((double)(x)/(double)(bwidth))*width+sr;
      ci = ((double)(y)/(double)(bheight))*height+si;
      zr = zi = 0.0;
      for (w = 0; (w < n) && (zr*zr + zi*zi)<n; w++) {
        zr_old = zr;
        zr = zr*zr - zi*zi + cr;
        zi = 2*zr_old*zi + ci;
      }
      bmp[y*bwidth+x] = w*mult;
    }
}

int
main(int argc, char ** argv)
{
  QWidget * mainwin = SoQt::init(argv[0]);

  SoSeparator * root = new SoSeparator;
  root->ref();

  const int IMGWIDTH = 256;
  const int IMGHEIGHT = 256;
  unsigned char * img = new unsigned char[IMGWIDTH * IMGHEIGHT];
  mandel(-0.5, 0.6, 0.025, 0.025, IMGWIDTH, IMGHEIGHT, 1, img, 256);

  SoImage * nimage = new SoImage;
  nimage->vertAlignment = SoImage::HALF;
  nimage->horAlignment = SoImage::CENTER;
  nimage->image.setValue(SbVec2s(IMGWIDTH, IMGHEIGHT), 1, img);

  SoCube * cube = new SoCube;

  root->addChild(cube);
  root->addChild(nimage);

  SoQtExaminerViewer * viewer = new SoQtExaminerViewer(mainwin);
  viewer->setSceneGraph(root);
  viewer->setTitle("SoImage use");
  viewer->show();

  SoCamera * cam = viewer->getCamera();
  cam->position = SbVec3f(0, 0, 50);
  cam->focalDistance = 50;

  SoQt::show(mainwin);
  SoQt::mainLoop();

  delete viewer;
  root->unref();
  delete img;
  return 0;
}

Heads up bestie, this one actually matters: an SoImage node sitting in the scene graph will have its positioning / rendering influenced by the current viewport and camera. That has important implications for how you lay out your scene graph if you want the best possible rendering performance. The note about this whole issue lives in the SoText2 class documentation β€” go read it, fr fr. πŸ“–

And listen: SoScale nodes can not be used to influence the dimensions of the rendering output of SoImage nodes. Not the vibe, it just won't work. πŸ™…β€β™€οΈ

FILE FORMAT/DEFAULTS:

Image {
    width -1
    height -1
    vertAlignment BOTTOM
    horAlignment LEFT
    image 0 0 0

    filename ""
}

Since

  • TGS Inventor 2.5
  • Coin 1.0

πŸŽ€ Member Enumeration Documentation πŸŽ€

enum SoImage::VertAlignment

Vertical alignment for image. Straight up and down vibes. ⬆️⬇️

Enumerator

  • BOTTOM β€” Vertical alignment at bottom of image.
  • HALF β€” Vertical alignment at center of image.
  • TOP β€” Vertical alignment at top of image.

enum SoImage::HorAlignment

Horizontal alignment for image. Left-to-right energy. β¬…οΈβž‘οΈ

Enumerator

  • LEFT β€” Horizontal alignment at left border.
  • CENTER β€” Horizontal alignment at center of image.
  • RIGHT β€” Horizontal alignment ar right border.

πŸ’… Constructor & Destructor Documentation πŸ’…

SoImage::SoImage (void )

Constructor. She's born. πŸ‘‘

References: BOTTOM, CENTER, filename, HALF, height, horAlignment, image, LEFT, RIGHT, SoImage(), TOP, vertAlignment, and width.

Referenced by: getFieldData(), and SoImage().

SoImage::~SoImage () β€” [protected], [virtual]

Destructor. She's gone, but her legacy lives on. 😭


πŸ”₯ Member Function Documentation πŸ”₯

SoType SoImage::getTypeId (void ) const β€” [virtual]

Returns the type identification of an object derived from a class inheriting SoBase. This is what powers run-time type checking and "downward" casting. iykyk.

Usage example:

void foo(SoNode * node)
{
  if (node->getTypeId() == SoFile::getClassTypeId()) {
    SoFile * filenode = (SoFile *)node;  // safe downward cast, knows the type
  }
  else if (node->getTypeId().isOfType(SoGroup::getClassTypeId())) {
    SoGroup * group = (SoGroup *)node;  // safe downward cast, knows the type
  }
}

For application programmers wanting to extend the library with new nodes, engines, nodekits, draggers or others: this method needs to be overridden in all subclasses. No skipping it, bestie. This is typically done as part of setting up the full type system for extension classes, which is usually accomplished by using the pre-defined macros available through for instance Inventor/nodes/SoSubNode.h (SO_NODE_INIT_CLASS and SO_NODE_CONSTRUCTOR for node classes), Inventor/engines/SoSubEngine.h (for engine classes) and so on.

For more information on writing Coin extensions, see the class documentation of the toplevel superclasses for the various class groups.

Reimplemented from SoShape.

const SoFieldData * SoImage::getFieldData (void ) const β€” [protected], [virtual]

Returns a pointer to the class-wide field data storage object for this instance. If no fields are present, it returns NULL. That's it, that's the whole job. ✨

Reimplemented from SoShape.

References: SoImage().

void SoImage::GLRender (SoGLRenderAction * action) β€” [virtual]

Action method for the SoGLRenderAction.

This gets called during rendering traversals. Nodes influencing the rendering state in any way β€” or nodes who just want to throw geometry primitives at OpenGL β€” override this method.

Reimplemented from SoShape.

References: BOTTOM, CENTER, SoAction::getState(), SbViewportRegion::getViewportSizePixels(), HALF, SoGLRenderAction::handleTransparency(), horAlignment, image, LEFT, SoDebugError::post(), RIGHT, SoShape::shouldGLRender(), TOP, and vertAlignment.

void SoImage::rayPick (SoRayPickAction * action) β€” [virtual]

Calculates picked point based on primitives generated by subclasses. 🎯

Reimplemented from SoShape.

References: SoRayPickAction::addIntersection(), SoShape::computeObjectSpaceRay(), SoAction::getState(), SoRayPickAction::intersect(), SoRayPickAction::isBetweenPlanes(), and SoShape::shouldRayPick().

void SoImage::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. Counting is her moment. πŸ”’

Nodes influencing how geometry nodes calculates their primitive count also overrides this method to change the relevant state variables.

Reimplemented from SoShape.

References: SoGetPrimitiveCountAction::incNumImage(), and SoShape::shouldPrimitiveCount().

void SoImage::generatePrimitives (SoAction * action) β€” [protected], [virtual]

Will generate a textured quad, representing the image in 3D. Quad goes brrr. πŸŸͺ

Implements SoShape.

References: SoShape::beginShape(), SoShape::endShape(), SoAction::getState(), SbVec3f::normalize(), SoState::pop(), SoState::push(), SoPrimitiveVertex::setNormal(), SoPrimitiveVertex::setPoint(), SoPrimitiveVertex::setTextureCoords(), and SoShape::shapeVertex().

void SoImage::computeBBox (SoAction * action, SbBox3f & box, SbVec3f & center) β€” [protected], [virtual]

Implemented by SoShape subclasses to let the SoShape superclass know the exact size and weighted center point of the shape's bounding box.

The bounding box and center point should be calculated and returned in the local coordinate system. Local, bestie, don't get it twisted.

The method implements action behavior for shape nodes for SoGetBoundingBoxAction. It is invoked from SoShape::getBoundingBox(). (Subclasses should not override SoNode::getBoundingBox() β€” that's not the move. πŸ™ˆ)

The box parameter sent in is guaranteed to be an empty box, while center is undefined upon function entry. So don't trust center until you fill it in, ngl.

Implements SoShape.

References: SbBox3f::extendBy(), SbBox3f::getCenter(), SoAction::getState(), and SbBox3f::makeEmpty().

SbBool SoImage::readInstance (SoInput * in, unsigned short flags) β€” [protected], [virtual]

This method is mainly intended for internal use during file import operations.

It reads a definition of an instance from the input stream in. The input stream state points to the start of a serialized / persistant representation of an instance of this class type.

TRUE or FALSE is returned, depending on if the instantiation and configuration of the new object of this class type went ok or not. The import process should be robust and handle corrupted input streams by returning FALSE. Stay resilient. πŸ’ͺ

flags is used internally during binary import when reading user extension nodes, group nodes or engines.

Reimplemented from SoNode.

References: filename, SoReadError::post(), SoFieldContainer::readInstance(), and setReadStatus().

void SoImage::notify (SoNotList * l) β€” [protected], [virtual]

Notifies all auditors for this instance when changes are made. πŸ“£

Reimplemented from SoShape.

References: filename, SoNotList::getLastField(), height, image, SoShape::notify(), and width.

int SoImage::getReadStatus (void ) β€” [protected]

Returns TRUE if node was read ok. Simple as that. βœ…

void SoImage::setReadStatus (SbBool flag) β€” [protected]

Set read status for this node. You're the one deciding now. 🫡

Referenced by: readInstance().

πŸ’– Member Data Documentation πŸ’–

okay bestie, this is the part where we meet the actual data members β€” the little sliders and settings that live inside every SoImage node. each one is a field (SoSF = "single field"), and each one has a default you should absolutely know about before you start tweaking. let's go πŸ¦‹


✨ SoSFInt32 SoImage::width ✨

so this is your width knob, and it's giving "optional but powerful". if it's bigger than 0, the image gets resized to this width before rendering. and if you just leave it alone? the default is -1, which literally means "don't resize" β€” no touchy, no stretchy. πŸ’…

  • Referenced by notify(), and SoImage().

✨ SoSFInt32 SoImage::height ✨

the matching height knob, and yes it works the exact same way. bigger than 0 means the image gets resized to this height before rendering, and the default is -1, aka "don't resize", aka we're leaving it exactly as it is, periodt. πŸ‘‘

  • Referenced by notify(), and SoImage().

✨ SoSFEnum SoImage::vertAlignment ✨

vertical alignment, bestie β€” where your image sits up-and-down. the default value is SoImage::BOTTOM, so if you don't say anything, it's chilling at the bottom. πŸ’œ

  • Referenced by GLRender(), and SoImage().

✨ SoSFEnum SoImage::horAlignment ✨

and the horizontal counterpart, because alignment needs both axes, obviously. the default value is SoImage::LEFT. 🌸

  • Referenced by GLRender(), and SoImage().

✨ SoSFImage SoImage::image ✨

here's the actual inline image data β€” the pixels themselves, living right there in the node. default is empty, so it's starting out as a lil blank canvas until you feed it something. πŸ™ˆ

  • Referenced by GLRender(), notify(), and SoImage().

✨ SoSFString SoImage::filename ✨

and if you'd rather point at a file instead of inlining the pixels, this is your girl: the image filename. default is empty too. πŸŽ€

  • Referenced by notify(), readInstance(), and SoImage().

🌈 Author 🌈

this whole thing was generated automatically by Doxygen for Coin from the source code β€” so like, no single human is out here claiming authorship of the prose, it's the tool doing its thing. iconic behaviour honestly. 🫢


and that's a wrap on SoImage(3), bestie!! this page came to you from Coin, Version 2.5.0, and yeah it's the SoImage(3) manual page β€” go forth and render your images with correct alignment and immaculate vibes. slay, ily, bye πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from