33 #ifndef DART_GUI_OPENGLRENDERINTERFACE_HPP_
34 #define DART_GUI_OPENGLRENDERINTERFACE_HPP_
69 void setViewport(
int _x,
int _y,
int _width,
int _height)
override;
70 void getViewport(
int& _x,
int& _y,
int& _width,
int& _height)
const override;
72 void clear(
const Eigen::Vector3d& _color)
override;
75 const Eigen::Vector3d& _diffuse,
76 const Eigen::Vector3d& _specular,
77 double _cosinePow)
override;
79 Eigen::Vector3d& _diffuse,
80 Eigen::Vector3d& _specular,
81 double& _cosinePow)
const override;
89 void translate(
const Eigen::Vector3d& _offset)
override;
90 void rotate(
const Eigen::Vector3d& _axis,
double _rad)
override;
91 void transform(
const Eigen::Isometry3d& _transform)
override;
92 void scale(
const Eigen::Vector3d& _scale)
override;
97 GLuint
compileList(
const Eigen::Vector3d& _scale,
const aiScene* _mesh);
99 void drawSphere(
double radius,
int slices = 16,
int stacks = 16)
override;
101 const std::vector<std::pair<double, Eigen::Vector3d>>& spheres,
103 int stacks = 16)
override;
104 void drawEllipsoid(
const Eigen::Vector3d& _diameters)
override;
105 void drawCube(
const Eigen::Vector3d& _size)
override;
111 int stacks = 16)
override;
116 int stacks = 16)
override;
117 void drawCapsule(
double radius,
double height)
override;
118 void drawCone(
double radius,
double height)
override;
119 void drawPyramid(
double baseWidth,
double baseDepth,
double height)
override;
120 void drawMesh(
const Eigen::Vector3d& _scale,
const aiScene* _mesh)
override;
124 const std::vector<Eigen::Vector3d>& _vertices,
127 void setPenColor(
const Eigen::Vector4d& _col)
override;
128 void setPenColor(
const Eigen::Vector3d& _col)
override;
139 void set_float4(
float f[4],
float a,
float b,
float c,
float d);
141 void recursiveRender(
const struct aiScene* sc,
const struct aiNode* nd);
146 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
std::size_t index
Definition: SkelParser.cpp:1672
BodyNode class represents a single node of the skeleton.
Definition: BodyNode.hpp:79
class Skeleton
Definition: Skeleton.hpp:59
Definition: OpenGLRenderInterface.hpp:52
void scale(const Eigen::Vector3d &_scale) override
Definition: OpenGLRenderInterface.cpp:165
void transform(const Eigen::Isometry3d &_transform) override
Definition: OpenGLRenderInterface.cpp:160
void drawCapsule(double radius, double height) override
Definition: OpenGLRenderInterface.cpp:424
void drawEllipsoid(const Eigen::Vector3d &_diameters) override
Definition: OpenGLRenderInterface.cpp:260
void drawList(GLuint index) override
Definition: OpenGLRenderInterface.cpp:744
void compileList(dynamics::Skeleton *_skel)
Definition: OpenGLRenderInterface.cpp:765
void drawCube(const Eigen::Vector3d &_size) override
Definition: OpenGLRenderInterface.cpp:267
void translate(const Eigen::Vector3d &_offset) override
Definition: OpenGLRenderInterface.cpp:150
void clear(const Eigen::Vector3d &_color) override
Definition: OpenGLRenderInterface.cpp:106
void rotate(const Eigen::Vector3d &_axis, double _rad) override
Definition: OpenGLRenderInterface.cpp:155
void popName() override
Definition: OpenGLRenderInterface.cpp:145
void destroy() override
Definition: OpenGLRenderInterface.cpp:84
int mViewportX
Definition: OpenGLRenderInterface.hpp:143
OpenGLRenderInterface()
Definition: OpenGLRenderInterface.hpp:55
virtual ~OpenGLRenderInterface()
Definition: OpenGLRenderInterface.hpp:62
void getMaterial(Eigen::Vector3d &_diffuse, Eigen::Vector3d &_specular, double &_cosinePow) const override
Definition: OpenGLRenderInterface.cpp:119
void saveToImage(const char *_filename, DecoBufferType _buffType=BT_Back) override
Definition: OpenGLRenderInterface.cpp:853
void setDefaultMaterial() override
Definition: OpenGLRenderInterface.cpp:126
void set_float4(float f[4], float a, float b, float c, float d)
Definition: OpenGLRenderInterface.cpp:540
void drawSoftMesh(const aiMesh *mesh) override
Definition: OpenGLRenderInterface.cpp:720
void popMatrix() override
Definition: OpenGLRenderInterface.cpp:135
void getViewport(int &_x, int &_y, int &_width, int &_height) const override
Definition: OpenGLRenderInterface.cpp:97
void readFrameBuffer(DecoBufferType _buffType, DecoColorChannel _ch, void *_pixels) override
Definition: OpenGLRenderInterface.cpp:848
int mViewportY
Definition: OpenGLRenderInterface.hpp:143
int mViewportWidth
Definition: OpenGLRenderInterface.hpp:143
void applyMaterial(const struct aiMaterial *mtl)
Definition: OpenGLRenderInterface.cpp:550
void drawOpenCylinder(double baseRadius, double topRadius, double height, int slices=16, int stacks=16) override
Definition: OpenGLRenderInterface.cpp:309
int mViewportHeight
Definition: OpenGLRenderInterface.hpp:143
void initialize() override
Definition: OpenGLRenderInterface.cpp:70
void setPenColor(const Eigen::Vector4d &_col) override
Definition: OpenGLRenderInterface.cpp:833
void setMaterial(const Eigen::Vector3d &_diffuse, const Eigen::Vector3d &_specular, double _cosinePow) override
Definition: OpenGLRenderInterface.cpp:112
void drawMultiSphere(const std::vector< std::pair< double, Eigen::Vector3d >> &spheres, int slices=16, int stacks=16) override
Definition: OpenGLRenderInterface.cpp:225
void setLineWidth(float _width) override
Definition: OpenGLRenderInterface.cpp:843
void drawCylinder(double _radius, double _height, int slices=16, int stacks=16) override
Definition: OpenGLRenderInterface.cpp:331
void drawSphere(double radius, int slices=16, int stacks=16) override
Definition: OpenGLRenderInterface.cpp:170
void drawLineSegments(const std::vector< Eigen::Vector3d > &_vertices, const common::aligned_vector< Eigen::Vector2i > &_connections) override
Definition: OpenGLRenderInterface.cpp:749
void drawMesh(const Eigen::Vector3d &_scale, const aiScene *_mesh) override
Definition: OpenGLRenderInterface.cpp:705
void color4_to_float4(const aiColor4D *c, float f[4])
Definition: OpenGLRenderInterface.cpp:532
void recursiveRender(const struct aiScene *sc, const struct aiNode *nd)
Definition: OpenGLRenderInterface.cpp:625
void drawPyramid(double baseWidth, double baseDepth, double height) override
Definition: OpenGLRenderInterface.cpp:486
void setViewport(int _x, int _y, int _width, int _height) override
Definition: OpenGLRenderInterface.cpp:88
void drawCone(double radius, double height) override
Definition: OpenGLRenderInterface.cpp:457
void pushMatrix() override
Definition: OpenGLRenderInterface.cpp:130
void pushName(int _id) override
Definition: OpenGLRenderInterface.cpp:140
Definition: RenderInterface.hpp:71
std::vector< _Tp, Eigen::aligned_allocator< _Tp > > aligned_vector
Definition: Memory.hpp:71
DecoBufferType
Definition: RenderInterface.hpp:46
@ BT_Back
Definition: RenderInterface.hpp:48
DecoColorChannel
Definition: RenderInterface.hpp:52
Definition: BulletCollisionDetector.cpp:65