MCPcopy Create free account
hub / github.com/OctoMap/octomap / getModelViewProjectionMatrix

Method getModelViewProjectionMatrix

octovis/src/extern/QGLViewer/camera.cpp:673–690  ·  view source on GitHub ↗

! Fills \p m with the product of the ModelView and Projection matrices. Calls getModelViewMatrix() and getProjectionMatrix() and then fills \p m with the product of these two matrices. */

Source from the content-addressed store, hash-verified

671
672 Calls getModelViewMatrix() and getProjectionMatrix() and then fills \p m with the product of these two matrices. */
673void Camera::getModelViewProjectionMatrix(GLdouble m[16]) const
674{
675 GLdouble mv[16];
676 GLdouble proj[16];
677 getModelViewMatrix(mv);
678 getProjectionMatrix(proj);
679
680 for (unsigned short i=0; i<4; ++i)
681 {
682 for (unsigned short j=0; j<4; ++j)
683 {
684 qreal sum = 0.0;
685 for (unsigned short k=0; k<4; ++k)
686 sum += proj[i+4*k]*mv[k+4*j];
687 m[i+4*j] = sum;
688 }
689 }
690}
691
692/*! Overloaded getModelViewProjectionMatrix(GLdouble m[16]) method using a \c GLfloat array instead. */
693void Camera::getModelViewProjectionMatrix(GLfloat m[16]) const

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected