![]() |
|
#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 More... | |
void | draw (GLenum mode, uint start, uint end) |
draw a range of elements More... | |
void | draw (GLenum mode, const std::vector< uint > *pIndexes) |
draw an indexed subset More... | |
Protected Member Functions | |
void | update (void) |
Protected Attributes | |
GLuint | mColorBufferId |
int | mVpWidth |
int | mVpHeight |
GLenum | mCurrentMatrixTarget |
bool | mInitialized |
GpuHelper::GpuHelper | ( | ) |
References mCurrentMatrixTarget, mInitialized, mVpHeight, and mVpWidth.
|
inline |
|
inline |
|
inline |
draw a range of elements
References Eigen::placeholders::end, and oomph::CumulativeTimings::start().
void GpuHelper::drawUnitCube | ( | void | ) |
Referenced by drawVectorBox().
void GpuHelper::drawUnitSphere | ( | int | level = 0 | ) |
References IcoSphere::draw().
void GpuHelper::drawVector | ( | const Vector3f & | position, |
const Vector3f & | vec, | ||
const Color & | color, | ||
float | aspect = 50. |
||
) |
References acos(), Jeffery_Solution::angle(), plotDoE::ax, e(), M_PI, popMatrix(), pushMatrix(), and tmp.
Referenced by RenderingWidget::drawScene().
void GpuHelper::drawVectorBox | ( | const Vector3f & | position, |
const Vector3f & | vec, | ||
const Color & | color, | ||
float | aspect = 50. |
||
) |
References acos(), Jeffery_Solution::angle(), plotDoE::ax, drawUnitCube(), e(), M_PI, popMatrix(), pushMatrix(), and tmp.
|
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.
References Eigen::RowMajorBit.
Referenced by Camera::activateGL().
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.
Referenced by FancySpheres::draw().
|
inline |
Pop the OpenGL matrix matrixTarget
Referenced by FancySpheres::draw(), drawVector(), drawVectorBox(), and popProjectionMode2D().
void GpuHelper::popProjectionMode2D | ( | void | ) |
References popMatrix().
void GpuHelper::pushMatrix | ( | const Eigen::CwiseNullaryOp< Eigen::internal::scalar_identity_op< Scalar >, Derived > & | , |
GLenum | matrixTarget | ||
) |
|
inline |
Push the OpenGL matrix matrixTarget and load mat.
Referenced by FancySpheres::draw(), drawVector(), drawVectorBox(), and pushProjectionMode2D().
|
inline |
Push and clone the OpenGL matrix matrixTarget
void GpuHelper::pushProjectionMode2D | ( | ProjectionMode2D | pm | ) |
References pm, PM_Normalized, PM_Viewport, and pushMatrix().
|
inline |
|
protected |
Referenced by smc.smc::recursiveBayesian().
|
protected |
|
protected |
Referenced by GpuHelper().
|
protected |
Referenced by GpuHelper().
|
protected |
Referenced by GpuHelper().
|
protected |
Referenced by GpuHelper().