Provided by: libcoin80-doc_3.1.4~abc9f50-4ubuntu2_all

**NAME**

SoGLViewingMatrixElement - TheSoGLViewingMatrixElementclass is used to store the current viewing matrix. The viewing matrix contains the inverse camera coordinate system matrix. The camera coordinate system is built from the field values in the currentSoCamera(currently eitherSoPerspectiveCameraorSoOrthographicCamera) and any transformations prior to the camera in the scene graph.

**SYNOPSIS**

#include <Inventor/elements/SoGLViewingMatrixElement.h> InheritsSoViewingMatrixElement.PublicMemberFunctionsvirtual voidinit(SoState*state)FIXME:writedoc.virtual voidpush(SoState*state) virtual voidpop(SoState*state, constSoElement*prevTopElement)StaticPublicMemberFunctionsstaticSoTypegetClassTypeId(void) static intgetClassStackIndex(void) static void *createInstance(void) static voidinitClass(void) static uint32_tgetNodeId(SoState*const state) staticSbMatrixgetResetMatrix(SoState*state)ProtectedMemberFunctionsvirtual~SoGLViewingMatrixElement() virtual voidsetElt(constSbMatrix&matrix)AdditionalInheritedMembers

**Detailed** **Description**

TheSoGLViewingMatrixElementclass is used to store the current viewing matrix. The viewing matrix contains the inverse camera coordinate system matrix. The camera coordinate system is built from the field values in the currentSoCamera(currently eitherSoPerspectiveCameraorSoOrthographicCamera) and any transformations prior to the camera in the scene graph.

**Constructor** **&** **Destructor** **Documentation**

SoGLViewingMatrixElement::~SoGLViewingMatrixElement(void)[protected],[virtual]The destructor.

**Member** **Function** **Documentation**

void*SoGLViewingMatrixElement::createInstance(void)[static]ThisAPImemberisconsideredinternaltothelibrary,asitisnotlikelytobeofinteresttotheapplicationprogrammer.voidSoGLViewingMatrixElement::push(SoState*state)[virtual]This method is called every time a new element is required in one of the stacks. This happens when a writable element is requested, usingSoState::getElement()or indirectlySoElement::getElement(), and the depth of the current element is less than the state depth. Override this method if your element needs to copy data from the previous top of stack. Thepush()method is called on the new element, and the previous element can be found usingSoElement::getNextInStack(). Reimplemented fromSoElement.voidSoGLViewingMatrixElement::pop(SoState*state,constSoElement*prevTopElement)[virtual]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 is passed inprevTopElement. Override this method if you need to copy some state information from the previous top of stack. Reimplemented fromSoElement.uint32_tSoGLViewingMatrixElement::getNodeId(SoState*conststate)[static]Returns the node id of the current camera node. This is used bySoGLModelMatrixElementto detect a change in the viewing matrix inside anSoTransformSeparatornode.SbMatrixSoGLViewingMatrixElement::getResetMatrix(SoState*state)[static]Returns the matrix that should be used bySoGLModelMatrixElementwhen the transformation should be reset during traversal (typically when encountering anSoResetTransformnode). It is not sufficient to simply load the viewing matrix, since the transformations that were applied before the camera needs to be accounted for. This function is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API.Since:Coin 2.0voidSoGLViewingMatrixElement::setElt(constSbMatrix&matrix)[protected],[virtual]Sets the current viewing matrix. Reimplemented fromSoViewingMatrixElement.

**Author**

Generated automatically by Doxygen for Coin from the source code.