SOGLVIEWINGMATRIXELEMENT(3coin3)
π 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) constvirtual SoElement * copyMatchInfo() constuint32_t getNodeId() constvirtual void print(FILE *file) const
π¦ Public Member Functions inherited from SoElement
const SoType getTypeId(void) constint getStackIndex(void) constvoid setDepth(const int depth)int getDepth(void) constvirtual ~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) constvirtual void captureThis(SoState *state) constvoid setTypeId(const SoType typeId)void setStackIndex(const int index)SoElement * getNextInStack(void) constSoElement * 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 typeIdint stackIndexint depth
Static Protected Attributes inherited from SoElement
static int classStackIndexstatic 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
- fedora 43: Coin3-devel 3.1.3-40.fc43 Β· GPL-2.0-only
- fedora 43: Coin3-devel 3.1.3-40.fc43 Β· GPL-2.0-only
- fedora 44: Coin3-devel 3.1.3-42.fc44 Β· GPL-2.0-only
- fedora 44: Coin3-devel 3.1.3-42.fc44 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms