TriangleMeshShaper.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2008, AIST, the University of Tokyo and General Robotix Inc.
3  * All rights reserved. This program is made available under the terms of the
4  * Eclipse Public License v1.0 which accompanies this distribution, and is
5  * available at http://www.eclipse.org/legal/epl-v10.html
6  * Contributors:
7  * National Institute of Advanced Industrial Science and Technology (AIST)
8  */
9 
14 #ifndef HRPUTIL_TRIANGLE_MESH_SHAPER_H_INCLUDED
15 #define HRPUTIL_TRIANGLE_MESH_SHAPER_H_INCLUDED
16 
17 #include "config.h"
18 #include "VrmlNodes.h"
19 #include <string>
20 #include <boost/version.hpp>
21 #if (BOOST_VERSION >= 103900)
22 #include <boost/signals2/signal.hpp>
23 #else
24 #include <boost/signal.hpp>
25 #endif
26 
27 namespace hrp
28 {
29  class TMSImpl;
30 
32  {
33  public:
34 
37 
38  void setDivisionNumber(int n);
39  void setNormalGenerationMode(bool on);
40  VrmlNodePtr apply(VrmlNodePtr topNode);
41  SFNode getOriginalGeometry(VrmlShapePtr shapeNode);
42  void defaultTextureMapping(VrmlShape* shapeNode);
43 
44 #if (BOOST_VERSION >= 103900)
45  boost::signals2::signal<void(const std::string& message)> sigMessage;
46 #else
47  boost::signal<void(const std::string& message)> sigMessage;
48 #endif
49 
50  bool convertBox(VrmlBox* box, VrmlIndexedFaceSetPtr& triangleMesh);
51 
52  private:
54 
55  void defaultTextureMappingFaceSet(VrmlIndexedFaceSet* triangleMesh);
56  void defaultTextureMappingElevationGrid(VrmlElevationGrid* grid, VrmlIndexedFaceSet* triangleMesh);
57  void defaultTextureMappingBox(VrmlIndexedFaceSet* triangleMesh);
58  void defaultTextureMappingCone(VrmlIndexedFaceSet* triangleMesh);
59  void defaultTextureMappingCylinder(VrmlIndexedFaceSet* triangleMesh);
60  void defaultTextureMappingSphere(VrmlIndexedFaceSet* triangleMesh, double radius);
61  void defaultTextureMappingExtrusion(VrmlIndexedFaceSet* triangleMesh, VrmlExtrusion* extrusion );
62  int faceofBox(SFVec3f* point);
63  int findPoint(MFVec2f& points, SFVec2f& target);
64  double calcangle(SFVec3f& point);
65  };
66 
67  enum { LEFT, TOP, FRONT, BOTTOM, RIGHT, BACK };
68 
69 };
70 
71 #endif
72 
boost::signal< void(const std::string &message)> sigMessage
VRML Shape node.
Definition: VrmlNodes.h:285
VRML IndexedFaseSet node.
Definition: VrmlNodes.h:483
boost::intrusive_ptr< VrmlShape > VrmlShapePtr
Definition: VrmlNodes.h:292
VRML Box node.
Definition: VrmlNodes.h:373
#define HRP_UTIL_EXPORT
boost::array< SFFloat, 2 > SFVec2f
Definition: VrmlNodes.h:54
std::vector< SFVec2f > MFVec2f
Definition: VrmlNodes.h:71
boost::intrusive_ptr< VrmlNode > VrmlNodePtr
Definition: VrmlNodes.h:155
boost::array< SFFloat, 3 > SFVec3f
Definition: VrmlNodes.h:55
boost::intrusive_ptr< VrmlIndexedFaceSet > VrmlIndexedFaceSetPtr
Definition: VrmlNodes.h:498
VRML ElevationGrid node.
Definition: VrmlNodes.h:608
VrmlNodePtr SFNode
Definition: VrmlNodes.h:157
Definition: jquant2.c:258
VRML Extrusion node.
Definition: VrmlNodes.h:634


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Sat Apr 13 2019 02:14:25