Choreonoid  1.8
MeshFilter.h
Go to the documentation of this file.
1 
6 #ifndef CNOID_UTIL_MESH_FILTER_H
7 #define CNOID_UTIL_MESH_FILTER_H
8 
9 #include "exportdecl.h"
10 
11 namespace cnoid {
12 
13 class SgNode;
14 class SgMesh;
15 class MeshFilterImpl;
16 
17 class CNOID_EXPORT MeshFilter
18 {
19 public:
20  MeshFilter();
21  MeshFilter(const MeshFilter& org);
22  ~MeshFilter();
23 
24  void integrateMeshes(SgMesh* mesh1, SgMesh* mesh2);
25 
26  void removeRedundantVertices(SgNode* scene);
27  void removeRedundantVertices(SgMesh* mesh);
28 
32  KEEP_LAST_OVERLAPPING_FACES
33  };
34 
38  void removeRedundantFaces(SgNode* scene, int reductionMode = KEEP_OVERLAPPING_FACES_WTIH_DIFFERENT_DIRECTIONS);
39  void removeRedundantFaces(SgMesh* mesh, int reductionMode = KEEP_OVERLAPPING_FACES_WTIH_DIFFERENT_DIRECTIONS);
40 
41  void removeRedundantNormals(SgNode* scene);
42  void removeRedundantNormals(SgMesh* mesh);
43 
44  bool generateNormals(SgMesh* mesh, float creaseAngle = 3.14159f, bool removeRedundantVertices = false);
45  void setNormalOverwritingEnabled(bool on);
46  void setMinCreaseAngle(float angle);
47  void setMaxCreaseAngle(float angle);
48 
49  // Deprecated. Use enableNormalOverwriting()
50  void setOverwritingEnabled(bool on);
51 
52 private:
53  MeshFilterImpl* impl;
54 };
55 
56 // for the backward compatibility
58 
59 }
60 
61 #endif
cnoid::MeshFilter::KEEP_FIRST_OVERLAPPING_FACES
@ KEEP_FIRST_OVERLAPPING_FACES
Definition: MeshFilter.h:31
cnoid::SgMesh
Definition: SceneDrawables.h:337
cnoid::MeshFilter
Definition: MeshFilter.h:17
cnoid::MeshFilter::FaceReductionMode
FaceReductionMode
Definition: MeshFilter.h:29
cnoid::MeshNormalGenerator
MeshFilter MeshNormalGenerator
Definition: MeshFilter.h:57
cnoid
Definition: AbstractSceneLoader.h:11
cnoid::MeshFilter::KEEP_OVERLAPPING_FACES_WTIH_DIFFERENT_DIRECTIONS
@ KEEP_OVERLAPPING_FACES_WTIH_DIFFERENT_DIRECTIONS
Definition: MeshFilter.h:30
cnoid::SgNode
Definition: SceneGraph.h:157