SOGLVIEWINGMATRIXELEMENT(3coin3)

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

πŸ’… NAME πŸ’…

okay bestie, meet SoGLViewingMatrixElement β€” the class that's literally just here to store the current viewing matrix ✨ (it's a 3coin3 manpage situation, iykyk πŸŽ€)


🌸 SYNOPSIS 🌸

#include <Inventor/elements/SoGLViewingMatrixElement.h>

Inherits SoViewingMatrixElement. Yes queen, it's giving legacy dynasty energy πŸ‘‘

🫢 Public Member Functions

  • virtual void init(SoState *state) β€” FIXME: write doc. (not me calling out the docs like this 😭)
  • virtual void push(SoState *state)
  • virtual void pop(SoState *state, const SoElement *prevTopElement)

πŸ’– Public Member Functions inherited from SoReplacedElement

  • virtual SbBool matches(const SoElement *element) const
  • virtual SoElement * copyMatchInfo() const
  • uint32_t getNodeId() const
  • virtual void print(FILE *file) const

πŸ¦‹ Public Member Functions inherited from SoElement

  • const SoType getTypeId(void) const
  • int getStackIndex(void) const
  • void setDepth(const int depth)
  • int getDepth(void) const
  • virtual ~SoElement()

⭐ Static Public Member Functions

  • static SoType getClassTypeId(void)
  • static int getClassStackIndex(void)
  • static void * createInstance(void)
  • static void initClass(void)
  • static uint32_t getNodeId(SoState *const state)
  • static SbMatrix getResetMatrix(SoState *state)

🌈 Static Public Member Functions inherited from SoViewingMatrixElement

  • static SoType getClassTypeId(void)
  • static int getClassStackIndex(void)
  • static void * createInstance(void)
  • static void initClass(void)
  • static void set(SoState *const state, SoNode *const node, const SbMatrix &ViewingMatrix) β€” FIXME: write doc.
  • static const SbMatrix & get(SoState *const state) β€” FIXME: write doc.

πŸ’œ Static Public Member Functions inherited from SoReplacedElement

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

πŸ“ Static Public Member Functions inherited from SoElement

  • static void initClass(void)
  • static SoType getClassTypeId(void)
  • static int getClassStackIndex(void)
  • static void initElements(void)
  • static int getNumStackIndices(void)
  • static SoType getIdFromStackIndex(const int stackIndex)

πŸŽ€ Protected Member Functions πŸŽ€

  • virtual ~SoGLViewingMatrixElement()
  • virtual void setElt(const SbMatrix &matrix)

🌸 Protected Member Functions inherited from SoViewingMatrixElement

  • virtual ~SoViewingMatrixElement()

🌸 Protected Member Functions inherited from SoReplacedElement

  • virtual ~SoReplacedElement()

🌸 Protected Member Functions inherited from SoElement

  • SoElement(void)
  • void capture(SoState *const state) const
  • virtual void captureThis(SoState *state) const
  • void setTypeId(const SoType typeId)
  • void setStackIndex(const int index)
  • SoElement * getNextInStack(void) const
  • SoElement * getNextFree(void) const

🧚 Additional Inherited Members 🧚

Static Protected Member Functions inherited from SoReplacedElement

  • static SoElement * getElement(SoState *const state, const int stackIndex, SoNode *const node)

Static Protected Member Functions inherited from SoElement

  • static SoElement * getElement(SoState *const state, const int stackIndex)
  • static const SoElement * getConstElement(SoState *const state, const int stackIndex)
  • static int createStackIndex(const SoType id)

Protected Attributes inherited from SoViewingMatrixElement

  • SbMatrix viewingMatrix

Protected Attributes inherited from SoReplacedElement

  • uint32_t nodeId

Protected Attributes inherited from SoElement

  • SoType typeId
  • int stackIndex
  • int depth

Static Protected Attributes inherited from SoElement

  • static int classStackIndex
  • static SoTypeList * stackToType

πŸ‘‘ Detailed Description πŸ‘‘

SoGLViewingMatrixElement is the class that holds the current viewing matrix. That's it, that's the job. πŸ’…

The viewing matrix contains the inverse camera coordinate system matrix. And where does that camera coordinate system come from, bestie? It's built from the field values in the current SoCamera β€” which right now means either SoPerspectiveCamera or SoOrthographicCamera β€” plus any transformations that come before the camera in the scene graph. So like, the whole squad of prior transforms is part of the vibe check πŸ¦‹


πŸ’€ Constructor & Destructor Documentation πŸ’€

SoGLViewingMatrixElement::~SoGLViewingMatrixElement(void) [protected], [virtual]

The destructor. Say bye bestie, she's leaving the group chat πŸ™ˆ


πŸ”₯ Member Function Documentation πŸ”₯

void * SoGLViewingMatrixElement::createInstance(void) [static]

This API member is considered internal to the library, because it's not likely to be of interest to the application programmer. So like… not your business, no cap 🀫

void SoGLViewingMatrixElement::init(SoState *state) [virtual]

FIXME: write doc. (the docs really said "we'll do it later" and never did 😭)

Reimplemented from SoViewingMatrixElement.

void SoGLViewingMatrixElement::push(SoState *state) [virtual]

This method gets called every single time a new element is required in one of the stacks. When does that even happen? When a writable element is requested β€” via SoState::getElement() or indirectly SoElement::getElement() β€” and the depth of the current element is less than the state depth. Slay, that's the condition ✨

Override this method if your element needs to copy data from the previous top of stack. The push() method is called on the new element, and you can find the previous element using SoElement::getNextInStack(). Iconic behaviour, fr fr.

Reimplemented from SoElement.

void SoGLViewingMatrixElement::pop(SoState *state, const SoElement *prevTopElement) [virtual]

not the typo, but okay β€” the original says "callled" πŸ’€

This method is callled when the state is popped, and the depth of the element is bigger than the current state depth. pop() is called on the new top of stack, and a pointer to the previous top of stack gets passed in through prevTopElement.

Override this method if you need to copy some state information from the previous top of stack.

Reimplemented from SoElement.

uint32_t SoGLViewingMatrixElement::getNodeId(SoState *const state) [static]

Returns the node id of the current camera node. This is used by SoGLModelMatrixElement to detect a change in the viewing matrix inside an SoTransformSeparator node. Detective work, but make it Open Inventor πŸ”

SbMatrix SoGLViewingMatrixElement::getResetMatrix(SoState *state) [static]

Returns the matrix that SoGLModelMatrixElement should use when the transformation needs to be reset during traversal β€” which typically happens when it encounters an SoResetTransform node. And bestie, listen: it is not sufficient to simply load the viewing matrix, because the transformations that were applied before the camera also need to be accounted for. The math said "actually, context matters" πŸ’…

This function is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API.

Since: Coin 2.0

void SoGLViewingMatrixElement::setElt(const SbMatrix &matrix) [protected], [virtual]

Sets the current viewing matrix. Periodt.

Reimplemented from SoViewingMatrixElement.


πŸŽ€ Author πŸŽ€

Generated automatically by Doxygen for Coin, straight from the source code. Not a human, just a very diligent robot 🫢


okay that's the whole page bestie, go forth and traverse your scene graph πŸ’–

Coin β€” Version 3.1.3 β€” SoGLViewingMatrixElement(3) ✨ (source/version and date all wrapped up in one cute little sign-off, mwah 😘)

πŸ“¦ where this page comes from