RobWorkProject
24.8.23-
|
render for the Model3D class. More...
#include <RenderModel3D.hpp>
Inherits Render.
Public Types | |
typedef rw::core::Ptr< RenderModel3D > | Ptr |
smart pointer type to this class | |
Public Types inherited from Render | |
typedef rw::core::Ptr< Render > | Ptr |
smart pointer type to this class | |
typedef DrawableNode::DrawType | DrawType |
when calling render on the draw mode or type can be specified. See DrawableNode::DrawType | |
Public Member Functions | |
RenderModel3D (rw::graphics::Model3D::Ptr model) | |
constructor. More... | |
virtual | ~RenderModel3D () |
Destructor. | |
rw::graphics::Model3D::Ptr | getModel () |
get the model that is being rendered | |
void | draw (const rw::graphics::DrawableNode::RenderInfo &info, rw::graphics::DrawableNode::DrawType type, double alpha) const |
void | drawUsingArrays (const rw::graphics::DrawableNode::RenderInfo &info, DrawType type, double alpha) const |
Fast drawing of model using drawelements array. This draw method require that textured objects use texture coordinates that are mapped to vertices and not faces. Also this method only works on triangle meshes. More... | |
void | drawUsingSimple (const rw::graphics::DrawableNode::RenderInfo &info, DrawType type, double alpha, bool disableMaterials=false) const |
Slower drawing of model using simple opengl draw calls. This draw method is slower than the array method but it is more general and does not requre texture coordinates to be ordered specifically. More... | |
Public Member Functions inherited from Render | |
virtual | ~Render () |
destructor | |
Additional Inherited Members | |
Protected Member Functions inherited from Render | |
Render () | |
Only instances of classes inheriting Render is allowed. | |
render for the Model3D class.
RenderModel3D | ( | rw::graphics::Model3D::Ptr | model | ) |
constructor.
model | [in] the model that is to be rendered |
|
virtual |
info | [in] state and rendering specific info |
type | [in] the drawtype which is being used |
alpha | [in] the alpha value to render with |
Implements Render.
void drawUsingArrays | ( | const rw::graphics::DrawableNode::RenderInfo & | info, |
DrawType | type, | ||
double | alpha | ||
) | const |
Fast drawing of model using drawelements array. This draw method require that textured objects use texture coordinates that are mapped to vertices and not faces. Also this method only works on triangle meshes.
info | [in] state and rendering specific info |
type | [in] the drawtype which is being used |
alpha | [in] the alpha value to render with |
void drawUsingSimple | ( | const rw::graphics::DrawableNode::RenderInfo & | info, |
DrawType | type, | ||
double | alpha, | ||
bool | disableMaterials = false |
||
) | const |
Slower drawing of model using simple opengl draw calls. This draw method is slower than the array method but it is more general and does not requre texture coordinates to be ordered specifically.
info | [in] state and rendering specific info |
type | [in] the drawtype which is being used |
alpha | [in] the alpha value to render with |
disableMaterials | [in] true to disable materials, false otherwise. |