Choreonoid  1.8
MeshExtractor.h
Go to the documentation of this file.
1 
6 #ifndef CNOID_UTIL_MESH_EXTRACTOR_H
7 #define CNOID_UTIL_MESH_EXTRACTOR_H
8 
9 #include "EigenTypes.h"
10 #include <functional>
11 #include "exportdecl.h"
12 
13 namespace cnoid {
14 
15 class SgNode;
16 class SgMesh;
17 class SgShape;
18 class MeshExtractorImpl;
19 
20 class CNOID_EXPORT MeshExtractor
21 {
22 public:
23  MeshExtractor();
24  bool extract(SgNode* node, std::function<void()> callback);
25  bool extract(SgNode* node, std::function<void(SgMesh* mesh)> callback);
26  SgMesh* integrate(SgNode* node);
27 
28  SgMesh* currentMesh() const;
29  SgShape* currentShape() const;
30  const Affine3& currentTransform() const;
31  const Isometry3& currentTransformWithoutScaling() const;
32  bool isCurrentScaled() const;
33 
34 private:
35  MeshExtractorImpl* impl;
36 };
37 
38 }
39 
40 #endif
cnoid::SgMesh
Definition: SceneDrawables.h:337
cnoid::Isometry3
Eigen::Isometry3d Isometry3
Definition: EigenTypes.h:73
cnoid::MeshExtractor
Definition: MeshExtractor.h:20
cnoid
Definition: AbstractSceneLoader.h:11
EigenTypes.h
cnoid::SgShape
Definition: SceneDrawables.h:530
cnoid::SgNode
Definition: SceneGraph.h:157
cnoid::Affine3
Eigen::Affine3d Affine3
Definition: EigenTypes.h:62