.TH "SoGLViewingMatrixElement" 3 "Thu May 29 2014" "Version 4.0.0a" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SoGLViewingMatrixElement \- .PP The \fBSoGLViewingMatrixElement\fP class is used to store the current viewing matrix\&. .PP The viewing matrix contains the inverse camera coordinate system matrix\&. The camera coordinate system is built from the field values in the current \fBSoCamera\fP (currently either \fBSoPerspectiveCamera\fP or \fBSoOrthographicCamera\fP) and any transformations prior to the camera in the scene graph\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBSoViewingMatrixElement\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "virtual void \fBinit\fP (\fBSoState\fP *state)" .br .RI "\fIFIXME: write doc\&. \fP" .ti -1c .RI "virtual void \fBpush\fP (\fBSoState\fP *state)" .br .ti -1c .RI "virtual void \fBpop\fP (\fBSoState\fP *state, const \fBSoElement\fP *prevTopElement)" .br .in -1c .SS "Static Public Member Functions" .in +1c .ti -1c .RI "static \fBSoType\fP \fBgetClassTypeId\fP (void)" .br .ti -1c .RI "static int \fBgetClassStackIndex\fP (void)" .br .ti -1c .RI "static void * \fBcreateInstance\fP (void)" .br .ti -1c .RI "static void \fBinitClass\fP (void)" .br .ti -1c .RI "static uint32_t \fBgetNodeId\fP (\fBSoState\fP *const state)" .br .ti -1c .RI "static \fBSbMatrix\fP \fBgetResetMatrix\fP (\fBSoState\fP *state)" .br .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "virtual \fB~SoGLViewingMatrixElement\fP ()" .br .ti -1c .RI "virtual void \fBsetElt\fP (const \fBSbMatrix\fP &matrix)" .br .in -1c .SS "Additional Inherited Members" .SH "Detailed Description" .PP The \fBSoGLViewingMatrixElement\fP class is used to store the current viewing matrix\&. .PP The viewing matrix contains the inverse camera coordinate system matrix\&. The camera coordinate system is built from the field values in the current \fBSoCamera\fP (currently either \fBSoPerspectiveCamera\fP or \fBSoOrthographicCamera\fP) and any transformations prior to the camera in the scene graph\&. .SH "Constructor & Destructor Documentation" .PP .SS "SoGLViewingMatrixElement::~SoGLViewingMatrixElement (void)\fC [protected]\fP, \fC [virtual]\fP" The destructor\&. .SH "Member Function Documentation" .PP .SS "void * SoGLViewingMatrixElement::createInstance (void)\fC [static]\fP" \fIThis API member is considered internal to the library, as it is not likely to be of interest to the application programmer\&.\fP .SS "void SoGLViewingMatrixElement::push (\fBSoState\fP *state)\fC [virtual]\fP" This method is called every time a new element is required in one of the stacks\&. This happens when a writable element is requested, using \fBSoState::getElement()\fP or indirectly \fBSoElement::getElement()\fP, and the depth of the current element is less than the state depth\&. .PP Override this method if your element needs to copy data from the previous top of stack\&. The \fBpush()\fP method is called on the new element, and the previous element can be found using \fBSoElement::getNextInStack()\fP\&. .PP Reimplemented from \fBSoElement\fP\&. .SS "void SoGLViewingMatrixElement::pop (\fBSoState\fP *state, const \fBSoElement\fP *prevTopElement)\fC [virtual]\fP" This method is callled when the state is popped, and the depth of the element is bigger than the current state depth\&. \fBpop()\fP is called on the new top of stack, and a pointer to the previous top of stack is passed in \fIprevTopElement\fP\&. .PP Override this method if you need to copy some state information from the previous top of stack\&. .PP Reimplemented from \fBSoElement\fP\&. .SS "uint32_t SoGLViewingMatrixElement::getNodeId (\fBSoState\fP *conststate)\fC [static]\fP" Returns the node id of the current camera node\&. This is used by \fBSoGLModelMatrixElement\fP to detect a change in the viewing matrix inside an \fBSoTransformSeparator\fP node\&. .SS "\fBSbMatrix\fP SoGLViewingMatrixElement::getResetMatrix (\fBSoState\fP *state)\fC [static]\fP" Returns the matrix that should be used by \fBSoGLModelMatrixElement\fP when the transformation should be reset during traversal (typically when encountering an \fBSoResetTransform\fP node)\&. It is not sufficient to simply load the viewing matrix, since the transformations that were applied before the camera needs to be accounted for\&. .PP This function is an extension for Coin, and it is not available in the original SGI Open Inventor v2\&.1 API\&. .PP \fBSince:\fP .RS 4 Coin 2\&.0 .RE .PP .SS "void SoGLViewingMatrixElement::setElt (const \fBSbMatrix\fP &matrix)\fC [protected]\fP, \fC [virtual]\fP" Sets the current viewing matrix\&. .PP Reimplemented from \fBSoViewingMatrixElement\fP\&. .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.