RobWorkProject  23.9.11-
Public Types | Public Member Functions | List of all members
RenderModel3D Class Reference

render for the Model3D class. More...

#include <RenderModel3D.hpp>

Inherits Render.

Public Types

typedef rw::core::Ptr< RenderModel3DPtr
 smart pointer type to this class
 
- Public Types inherited from Render
typedef rw::core::Ptr< RenderPtr
 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.
 

Detailed Description

render for the Model3D class.

Constructor & Destructor Documentation

◆ RenderModel3D()

constructor.

Parameters
model[in] the model that is to be rendered

Member Function Documentation

◆ draw()

void draw ( const rw::graphics::DrawableNode::RenderInfo info,
rw::graphics::DrawableNode::DrawType  type,
double  alpha 
) const
virtual

Parameters
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.

◆ drawUsingArrays()

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.

Parameters
info[in] state and rendering specific info
type[in] the drawtype which is being used
alpha[in] the alpha value to render with

◆ drawUsingSimple()

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.

Parameters
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.

The documentation for this class was generated from the following file: