|
TR-mbed 1.0
|
#include <gpuhelper.h>
Public Types | |
| enum | ProjectionMode2D { PM_Normalized = 1 , PM_Viewport = 2 } |
Public Member Functions | |
| GpuHelper () | |
| ~GpuHelper () | |
| void | pushProjectionMode2D (ProjectionMode2D pm) |
| void | popProjectionMode2D () |
| template<typename Scalar , int _Flags> | |
| void | multMatrix (const Matrix< Scalar, 4, 4, _Flags, 4, 4 > &mat, GLenum matrixTarget) |
| template<typename Scalar , int _Flags> | |
| void | loadMatrix (const Eigen::Matrix< Scalar, 4, 4, _Flags, 4, 4 > &mat, GLenum matrixTarget) |
| template<typename Scalar , typename Derived > | |
| void | loadMatrix (const Eigen::CwiseNullaryOp< Eigen::internal::scalar_identity_op< Scalar >, Derived > &, GLenum matrixTarget) |
| void | forceMatrixTarget (GLenum matrixTarget) |
| void | setMatrixTarget (GLenum matrixTarget) |
| template<typename Scalar , int _Flags> | |
| void | pushMatrix (const Matrix< Scalar, 4, 4, _Flags, 4, 4 > &mat, GLenum matrixTarget) |
| template<typename Scalar , typename Derived > | |
| void | pushMatrix (const Eigen::CwiseNullaryOp< Eigen::internal::scalar_identity_op< Scalar >, Derived > &, GLenum matrixTarget) |
| void | pushMatrix (GLenum matrixTarget) |
| void | popMatrix (GLenum matrixTarget) |
| void | drawVector (const Vector3f &position, const Vector3f &vec, const Color &color, float aspect=50.) |
| void | drawVectorBox (const Vector3f &position, const Vector3f &vec, const Color &color, float aspect=50.) |
| void | drawUnitCube (void) |
| void | drawUnitSphere (int level=0) |
| void | draw (GLenum mode, uint nofElement) |
| draw the nofElement first elements | |
| void | draw (GLenum mode, uint start, uint end) |
| draw a range of elements | |
| void | draw (GLenum mode, const std::vector< uint > *pIndexes) |
| draw an indexed subset | |
Protected Member Functions | |
| void | update (void) |
Protected Attributes | |
| GLuint | mColorBufferId |
| int | mVpWidth |
| int | mVpHeight |
| GLenum | mCurrentMatrixTarget |
| bool | mInitialized |
| GpuHelper::GpuHelper | ( | ) |
| GpuHelper::~GpuHelper | ( | ) |
|
inline |
draw an indexed subset
|
inline |
draw the nofElement first elements
|
inline |
draw a range of elements
| void GpuHelper::drawUnitCube | ( | void | ) |
| void GpuHelper::drawUnitSphere | ( | int | level = 0 | ) |
| void GpuHelper::drawVector | ( | const Vector3f & | position, |
| const Vector3f & | vec, | ||
| const Color & | color, | ||
| float | aspect = 50. |
||
| ) |
| void GpuHelper::drawVectorBox | ( | const Vector3f & | position, |
| const Vector3f & | vec, | ||
| const Color & | color, | ||
| float | aspect = 50. |
||
| ) |
|
inline |
Make the matrix matrixTarget the current OpenGL matrix target. Call this function before loadMatrix() or multMatrix() if you cannot guarantee that glMatrixMode() has never been called after the last loadMatrix() or multMatrix() calls.
| void GpuHelper::loadMatrix | ( | const Eigen::CwiseNullaryOp< Eigen::internal::scalar_identity_op< Scalar >, Derived > & | , |
| GLenum | matrixTarget | ||
| ) |
| void GpuHelper::loadMatrix | ( | const Eigen::Matrix< Scalar, 4, 4, _Flags, 4, 4 > & | mat, |
| GLenum | matrixTarget | ||
| ) |
Load the matrix mat to the OpenGL matrix matrixTarget. Essentially, this helper function automatically calls glMatrixMode(matrixTarget) if required and does a proper call to the right glLoadMatrix*() or glLoadIdentity() function according to the scalar type and storage order.
| void GpuHelper::multMatrix | ( | const Matrix< Scalar, 4, 4, _Flags, 4, 4 > & | mat, |
| GLenum | matrixTarget | ||
| ) |
Multiply the OpenGL matrix matrixTarget by the matrix mat. Essentially, this helper function automatically calls glMatrixMode(matrixTarget) if required and does a proper call to the right glMultMatrix*() function according to the scalar type and storage order.
|
inline |
Pop the OpenGL matrix matrixTarget
| void GpuHelper::popProjectionMode2D | ( | void | ) |
| void GpuHelper::pushMatrix | ( | const Eigen::CwiseNullaryOp< Eigen::internal::scalar_identity_op< Scalar >, Derived > & | , |
| GLenum | matrixTarget | ||
| ) |
|
inline |
Push the OpenGL matrix matrixTarget and load mat.
|
inline |
Push and clone the OpenGL matrix matrixTarget
| void GpuHelper::pushProjectionMode2D | ( | ProjectionMode2D | pm | ) |
|
inline |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |