DART  6.7.3
dart::gui::OpenGLRenderInterface Class Reference

#include <OpenGLRenderInterface.hpp>

Inheritance diagram for dart::gui::OpenGLRenderInterface:
dart::gui::RenderInterface

Public Member Functions

 OpenGLRenderInterface ()
 
virtual ~OpenGLRenderInterface ()
 
void initialize () override
 
void destroy () override
 
void setViewport (int _x, int _y, int _width, int _height) override
 
void getViewport (int &_x, int &_y, int &_width, int &_height) const override
 
void clear (const Eigen::Vector3d &_color) override
 
void setMaterial (const Eigen::Vector3d &_diffuse, const Eigen::Vector3d &_specular, double _cosinePow) override
 
void getMaterial (Eigen::Vector3d &_diffuse, Eigen::Vector3d &_specular, double &_cosinePow) const override
 
void setDefaultMaterial () override
 
void pushMatrix () override
 
void popMatrix () override
 
void pushName (int _id) override
 
void popName () override
 
void translate (const Eigen::Vector3d &_offset) override
 
void rotate (const Eigen::Vector3d &_axis, double _rad) override
 
void transform (const Eigen::Isometry3d &_transform) override
 
void scale (const Eigen::Vector3d &_scale) override
 
void compileList (dynamics::Skeleton *_skel)
 
void compileList (dynamics::BodyNode *_node)
 
void compileList (dynamics::Shape *_shape)
 
GLuint compileList (const Eigen::Vector3d &_scale, const aiScene *_mesh)
 
void drawSphere (double radius, int slices=16, int stacks=16) override
 
void drawMultiSphere (const std::vector< std::pair< double, Eigen::Vector3d >> &spheres, int slices=16, int stacks=16) override
 
void drawEllipsoid (const Eigen::Vector3d &_diameters) override
 
void drawCube (const Eigen::Vector3d &_size) override
 
void drawOpenCylinder (double baseRadius, double topRadius, double height, int slices=16, int stacks=16) override
 
void drawCylinder (double _radius, double _height, int slices=16, int stacks=16) override
 
void drawCapsule (double radius, double height) override
 
void drawCone (double radius, double height) override
 
void drawMesh (const Eigen::Vector3d &_scale, const aiScene *_mesh) override
 
void drawSoftMesh (const aiMesh *mesh) override
 
void drawList (GLuint index) override
 
void drawLineSegments (const std::vector< Eigen::Vector3d > &_vertices, const common::aligned_vector< Eigen::Vector2i > &_connections) override
 
void setPenColor (const Eigen::Vector4d &_col) override
 
void setPenColor (const Eigen::Vector3d &_col) override
 
void setLineWidth (float _width) override
 
void saveToImage (const char *_filename, DecoBufferType _buffType=BT_Back) override
 
void readFrameBuffer (DecoBufferType _buffType, DecoColorChannel _ch, void *_pixels) override
 
virtual void drawList (unsigned int index)
 
virtual unsigned int compileDisplayList (const Eigen::Vector3d &_size, const aiScene *_mesh)
 

Private Member Functions

void color4_to_float4 (const aiColor4D *c, float f[4])
 
void set_float4 (float f[4], float a, float b, float c, float d)
 
void applyMaterial (const struct aiMaterial *mtl)
 
void recursiveRender (const struct aiScene *sc, const struct aiNode *nd)
 

Private Attributes

int mViewportX
 
int mViewportY
 
int mViewportWidth
 
int mViewportHeight
 

Constructor & Destructor Documentation

◆ OpenGLRenderInterface()

dart::gui::OpenGLRenderInterface::OpenGLRenderInterface ( )
inline

◆ ~OpenGLRenderInterface()

virtual dart::gui::OpenGLRenderInterface::~OpenGLRenderInterface ( )
inlinevirtual

Member Function Documentation

◆ applyMaterial()

void dart::gui::OpenGLRenderInterface::applyMaterial ( const struct aiMaterial *  mtl)
private

◆ clear()

void dart::gui::OpenGLRenderInterface::clear ( const Eigen::Vector3d &  _color)
overridevirtual

Reimplemented from dart::gui::RenderInterface.

◆ color4_to_float4()

void dart::gui::OpenGLRenderInterface::color4_to_float4 ( const aiColor4D *  c,
float  f[4] 
)
private

◆ compileDisplayList()

unsigned int dart::gui::RenderInterface::compileDisplayList ( const Eigen::Vector3d &  _size,
const aiScene *  _mesh 
)
virtualinherited

◆ compileList() [1/4]

GLuint dart::gui::OpenGLRenderInterface::compileList ( const Eigen::Vector3d &  _scale,
const aiScene *  _mesh 
)

◆ compileList() [2/4]

void dart::gui::OpenGLRenderInterface::compileList ( dynamics::BodyNode _node)

◆ compileList() [3/4]

void dart::gui::OpenGLRenderInterface::compileList ( dynamics::Shape _shape)

◆ compileList() [4/4]

void dart::gui::OpenGLRenderInterface::compileList ( dynamics::Skeleton _skel)

◆ destroy()

void dart::gui::OpenGLRenderInterface::destroy ( )
overridevirtual

Reimplemented from dart::gui::RenderInterface.

◆ drawCapsule()

void dart::gui::OpenGLRenderInterface::drawCapsule ( double  radius,
double  height 
)
overridevirtual

Reimplemented from dart::gui::RenderInterface.

◆ drawCone()

void dart::gui::OpenGLRenderInterface::drawCone ( double  radius,
double  height 
)
overridevirtual

Reimplemented from dart::gui::RenderInterface.

◆ drawCube()

void dart::gui::OpenGLRenderInterface::drawCube ( const Eigen::Vector3d &  _size)
overridevirtual

Reimplemented from dart::gui::RenderInterface.

◆ drawCylinder()

void dart::gui::OpenGLRenderInterface::drawCylinder ( double  _radius,
double  _height,
int  slices = 16,
int  stacks = 16 
)
overridevirtual

Reimplemented from dart::gui::RenderInterface.

◆ drawEllipsoid()

void dart::gui::OpenGLRenderInterface::drawEllipsoid ( const Eigen::Vector3d &  _diameters)
overridevirtual

Reimplemented from dart::gui::RenderInterface.

◆ drawLineSegments()

void dart::gui::OpenGLRenderInterface::drawLineSegments ( const std::vector< Eigen::Vector3d > &  _vertices,
const common::aligned_vector< Eigen::Vector2i > &  _connections 
)
overridevirtual

Reimplemented from dart::gui::RenderInterface.

◆ drawList() [1/2]

void dart::gui::OpenGLRenderInterface::drawList ( GLuint  index)
override

◆ drawList() [2/2]

void dart::gui::RenderInterface::drawList ( unsigned int  index)
virtualinherited

◆ drawMesh()

void dart::gui::OpenGLRenderInterface::drawMesh ( const Eigen::Vector3d &  _scale,
const aiScene *  _mesh 
)
overridevirtual

Reimplemented from dart::gui::RenderInterface.

◆ drawMultiSphere()

void dart::gui::OpenGLRenderInterface::drawMultiSphere ( const std::vector< std::pair< double, Eigen::Vector3d >> &  spheres,
int  slices = 16,
int  stacks = 16 
)
overridevirtual

Reimplemented from dart::gui::RenderInterface.

◆ drawOpenCylinder()

void dart::gui::OpenGLRenderInterface::drawOpenCylinder ( double  baseRadius,
double  topRadius,
double  height,
int  slices = 16,
int  stacks = 16 
)
overridevirtual

Reimplemented from dart::gui::RenderInterface.

◆ drawSoftMesh()

void dart::gui::OpenGLRenderInterface::drawSoftMesh ( const aiMesh *  mesh)
overridevirtual

Reimplemented from dart::gui::RenderInterface.

◆ drawSphere()

void dart::gui::OpenGLRenderInterface::drawSphere ( double  radius,
int  slices = 16,
int  stacks = 16 
)
overridevirtual

Reimplemented from dart::gui::RenderInterface.

◆ getMaterial()

void dart::gui::OpenGLRenderInterface::getMaterial ( Eigen::Vector3d &  _diffuse,
Eigen::Vector3d &  _specular,
double &  _cosinePow 
) const
overridevirtual

Reimplemented from dart::gui::RenderInterface.

◆ getViewport()

void dart::gui::OpenGLRenderInterface::getViewport ( int &  _x,
int &  _y,
int &  _width,
int &  _height 
) const
overridevirtual

Reimplemented from dart::gui::RenderInterface.

◆ initialize()

void dart::gui::OpenGLRenderInterface::initialize ( )
overridevirtual

Reimplemented from dart::gui::RenderInterface.

◆ popMatrix()

void dart::gui::OpenGLRenderInterface::popMatrix ( )
overridevirtual

Reimplemented from dart::gui::RenderInterface.

◆ popName()

void dart::gui::OpenGLRenderInterface::popName ( )
overridevirtual

Reimplemented from dart::gui::RenderInterface.

◆ pushMatrix()

void dart::gui::OpenGLRenderInterface::pushMatrix ( )
overridevirtual

Reimplemented from dart::gui::RenderInterface.

◆ pushName()

void dart::gui::OpenGLRenderInterface::pushName ( int  _id)
overridevirtual

Reimplemented from dart::gui::RenderInterface.

◆ readFrameBuffer()

void dart::gui::OpenGLRenderInterface::readFrameBuffer ( DecoBufferType  _buffType,
DecoColorChannel  _ch,
void *  _pixels 
)
overridevirtual

Reimplemented from dart::gui::RenderInterface.

◆ recursiveRender()

void dart::gui::OpenGLRenderInterface::recursiveRender ( const struct aiScene *  sc,
const struct aiNode *  nd 
)
private

◆ rotate()

void dart::gui::OpenGLRenderInterface::rotate ( const Eigen::Vector3d &  _axis,
double  _rad 
)
overridevirtual

Reimplemented from dart::gui::RenderInterface.

◆ saveToImage()

void dart::gui::OpenGLRenderInterface::saveToImage ( const char *  _filename,
DecoBufferType  _buffType = BT_Back 
)
overridevirtual

Reimplemented from dart::gui::RenderInterface.

◆ scale()

void dart::gui::OpenGLRenderInterface::scale ( const Eigen::Vector3d &  _scale)
overridevirtual

Reimplemented from dart::gui::RenderInterface.

◆ set_float4()

void dart::gui::OpenGLRenderInterface::set_float4 ( float  f[4],
float  a,
float  b,
float  c,
float  d 
)
private

◆ setDefaultMaterial()

void dart::gui::OpenGLRenderInterface::setDefaultMaterial ( )
overridevirtual

Reimplemented from dart::gui::RenderInterface.

◆ setLineWidth()

void dart::gui::OpenGLRenderInterface::setLineWidth ( float  _width)
overridevirtual

Reimplemented from dart::gui::RenderInterface.

◆ setMaterial()

void dart::gui::OpenGLRenderInterface::setMaterial ( const Eigen::Vector3d &  _diffuse,
const Eigen::Vector3d &  _specular,
double  _cosinePow 
)
overridevirtual

Reimplemented from dart::gui::RenderInterface.

◆ setPenColor() [1/2]

void dart::gui::OpenGLRenderInterface::setPenColor ( const Eigen::Vector3d &  _col)
overridevirtual

Reimplemented from dart::gui::RenderInterface.

◆ setPenColor() [2/2]

void dart::gui::OpenGLRenderInterface::setPenColor ( const Eigen::Vector4d &  _col)
overridevirtual

Reimplemented from dart::gui::RenderInterface.

◆ setViewport()

void dart::gui::OpenGLRenderInterface::setViewport ( int  _x,
int  _y,
int  _width,
int  _height 
)
overridevirtual

Reimplemented from dart::gui::RenderInterface.

◆ transform()

void dart::gui::OpenGLRenderInterface::transform ( const Eigen::Isometry3d &  _transform)
overridevirtual

Reimplemented from dart::gui::RenderInterface.

◆ translate()

void dart::gui::OpenGLRenderInterface::translate ( const Eigen::Vector3d &  _offset)
overridevirtual

Reimplemented from dart::gui::RenderInterface.

Member Data Documentation

◆ mViewportHeight

int dart::gui::OpenGLRenderInterface::mViewportHeight
private

◆ mViewportWidth

int dart::gui::OpenGLRenderInterface::mViewportWidth
private

◆ mViewportX

int dart::gui::OpenGLRenderInterface::mViewportX
private

◆ mViewportY

int dart::gui::OpenGLRenderInterface::mViewportY
private