33 #ifndef DART_GUI_OPENGLRENDERINTERFACE_HPP_
34 #define DART_GUI_OPENGLRENDERINTERFACE_HPP_
60 void setViewport(
int _x,
int _y,
int _width,
int _height)
override;
61 void getViewport(
int& _x,
int& _y,
int& _width,
int& _height)
const override;
63 void clear(
const Eigen::Vector3d& _color)
override;
65 void setMaterial(
const Eigen::Vector3d& _diffuse,
const Eigen::Vector3d& _specular,
double _cosinePow)
override;
66 void getMaterial(Eigen::Vector3d& _diffuse, Eigen::Vector3d& _specular,
double& _cosinePow)
const override;
74 void translate(
const Eigen::Vector3d& _offset)
override;
75 void rotate(
const Eigen::Vector3d& _axis,
double _rad)
override;
76 void transform(
const Eigen::Isometry3d& _transform)
override;
77 void scale(
const Eigen::Vector3d& _scale)
override;
82 GLuint
compileList(
const Eigen::Vector3d& _scale,
const aiScene* _mesh);
84 void drawSphere(
double radius,
int slices = 16,
int stacks = 16)
override;
85 void drawMultiSphere(
const std::vector<std::pair<double, Eigen::Vector3d>>& spheres,
int slices = 16,
int stacks = 16)
override;
86 void drawEllipsoid(
const Eigen::Vector3d& _diameters)
override;
87 void drawCube(
const Eigen::Vector3d& _size)
override;
88 void drawOpenCylinder(
double baseRadius,
double topRadius,
double height,
int slices = 16,
int stacks = 16)
override;
89 void drawCylinder(
double _radius,
double _height,
int slices = 16,
int stacks = 16)
override;
90 void drawCapsule(
double radius,
double height)
override;
91 void drawCone(
double radius,
double height)
override;
92 void drawMesh(
const Eigen::Vector3d& _scale,
const aiScene* _mesh)
override;
98 void setPenColor(
const Eigen::Vector4d& _col)
override;
99 void setPenColor(
const Eigen::Vector3d& _col)
override;
108 void set_float4(
float f[4],
float a,
float b,
float c,
float d);
110 void recursiveRender(
const struct aiScene *sc,
const struct aiNode* nd);
115 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
std::size_t index
Definition: SkelParser.cpp:1617
BodyNode class represents a single node of the skeleton.
Definition: BodyNode.hpp:78
class Skeleton
Definition: Skeleton.hpp:59
Definition: OpenGLRenderInterface.hpp:51
void scale(const Eigen::Vector3d &_scale) override
Definition: OpenGLRenderInterface.cpp:143
void transform(const Eigen::Isometry3d &_transform) override
Definition: OpenGLRenderInterface.cpp:139
void drawCapsule(double radius, double height) override
Definition: OpenGLRenderInterface.cpp:399
void drawEllipsoid(const Eigen::Vector3d &_diameters) override
Definition: OpenGLRenderInterface.cpp:232
void drawList(GLuint index) override
Definition: OpenGLRenderInterface.cpp:627
void compileList(dynamics::Skeleton *_skel)
Definition: OpenGLRenderInterface.cpp:647
void drawCube(const Eigen::Vector3d &_size) override
Definition: OpenGLRenderInterface.cpp:238
void translate(const Eigen::Vector3d &_offset) override
Definition: OpenGLRenderInterface.cpp:131
void clear(const Eigen::Vector3d &_color) override
Definition: OpenGLRenderInterface.cpp:98
void rotate(const Eigen::Vector3d &_axis, double _rad) override
Definition: OpenGLRenderInterface.cpp:135
void popName() override
Definition: OpenGLRenderInterface.cpp:127
void destroy() override
Definition: OpenGLRenderInterface.cpp:79
int mViewportX
Definition: OpenGLRenderInterface.hpp:112
OpenGLRenderInterface()
Definition: OpenGLRenderInterface.hpp:54
virtual ~OpenGLRenderInterface()
Definition: OpenGLRenderInterface.hpp:55
void getMaterial(Eigen::Vector3d &_diffuse, Eigen::Vector3d &_specular, double &_cosinePow) const override
Definition: OpenGLRenderInterface.cpp:107
void saveToImage(const char *_filename, DecoBufferType _buffType=BT_Back) override
Definition: OpenGLRenderInterface.cpp:728
void setDefaultMaterial() override
Definition: OpenGLRenderInterface.cpp:111
void set_float4(float f[4], float a, float b, float c, float d)
Definition: OpenGLRenderInterface.cpp:452
void drawSoftMesh(const aiMesh *mesh) override
Definition: OpenGLRenderInterface.cpp:603
void popMatrix() override
Definition: OpenGLRenderInterface.cpp:119
void getViewport(int &_x, int &_y, int &_width, int &_height) const override
Definition: OpenGLRenderInterface.cpp:91
void readFrameBuffer(DecoBufferType _buffType, DecoColorChannel _ch, void *_pixels) override
Definition: OpenGLRenderInterface.cpp:724
int mViewportY
Definition: OpenGLRenderInterface.hpp:112
int mViewportWidth
Definition: OpenGLRenderInterface.hpp:112
void applyMaterial(const struct aiMaterial *mtl)
Definition: OpenGLRenderInterface.cpp:461
void drawOpenCylinder(double baseRadius, double topRadius, double height, int slices=16, int stacks=16) override
Definition: OpenGLRenderInterface.cpp:284
int mViewportHeight
Definition: OpenGLRenderInterface.hpp:112
void initialize() override
Definition: OpenGLRenderInterface.cpp:66
void setPenColor(const Eigen::Vector4d &_col) override
Definition: OpenGLRenderInterface.cpp:712
void setMaterial(const Eigen::Vector3d &_diffuse, const Eigen::Vector3d &_specular, double _cosinePow) override
Definition: OpenGLRenderInterface.cpp:103
void drawMultiSphere(const std::vector< std::pair< double, Eigen::Vector3d >> &spheres, int slices=16, int stacks=16) override
Definition: OpenGLRenderInterface.cpp:198
void setLineWidth(float _width) override
Definition: OpenGLRenderInterface.cpp:720
void drawCylinder(double _radius, double _height, int slices=16, int stacks=16) override
Definition: OpenGLRenderInterface.cpp:306
void drawSphere(double radius, int slices=16, int stacks=16) override
Definition: OpenGLRenderInterface.cpp:147
void drawLineSegments(const std::vector< Eigen::Vector3d > &_vertices, const common::aligned_vector< Eigen::Vector2i > &_connections) override
Definition: OpenGLRenderInterface.cpp:631
void drawMesh(const Eigen::Vector3d &_scale, const aiScene *_mesh) override
Definition: OpenGLRenderInterface.cpp:588
void color4_to_float4(const aiColor4D *c, float f[4])
Definition: OpenGLRenderInterface.cpp:444
void recursiveRender(const struct aiScene *sc, const struct aiNode *nd)
Definition: OpenGLRenderInterface.cpp:528
void setViewport(int _x, int _y, int _width, int _height) override
Definition: OpenGLRenderInterface.cpp:83
void drawCone(double radius, double height) override
Definition: OpenGLRenderInterface.cpp:426
void pushMatrix() override
Definition: OpenGLRenderInterface.cpp:115
void pushName(int _id) override
Definition: OpenGLRenderInterface.cpp:123
Definition: RenderInterface.hpp:67
std::vector< _Tp, Eigen::aligned_allocator< _Tp > > aligned_vector
Definition: Memory.hpp:66
DecoBufferType
Definition: RenderInterface.hpp:45
@ BT_Back
Definition: RenderInterface.hpp:47
DecoColorChannel
Definition: RenderInterface.hpp:50
Definition: BulletCollisionDetector.cpp:63