ModelNodeSet.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 OPENHRP_MODEL_NODE_SET_H_INCLUDED
15 #define OPENHRP_MODEL_NODE_SET_H_INCLUDED
16 
17 #include <vector>
18 #include <boost/shared_ptr.hpp>
19 #include <boost/version.hpp>
20 #if (BOOST_VERSION >= 103900)
21 #include <boost/signals2/signal.hpp>
22 #else
23 #include <boost/signals.hpp>
24 #endif
25 #include <hrpUtil/VrmlNodes.h>
26 #include <hrpUtil/Eigen4d.h>
27 #include "Config.h"
28 
29 
30 namespace hrp {
31 
32  class VrmlParser;
33 
34  class JointNodeSet;
35  typedef boost::shared_ptr<JointNodeSet> JointNodeSetPtr;
36 
38  {
39  public:
41  std::vector<JointNodeSetPtr> childJointNodeSets;
42  std::vector<Matrix44, Eigen::aligned_allocator<Matrix44> > transforms;
43  std::vector<VrmlProtoInstancePtr> segmentNodes;
44  std::vector<VrmlProtoInstancePtr> sensorNodes;
45  std::vector<VrmlProtoInstancePtr> hwcNodes;
46  std::vector<std::pair<Matrix44, VrmlNodePtr>,
47  Eigen::aligned_allocator<std::pair<Matrix44, VrmlNodePtr> > > lightNodes;
48  };
49 
50  typedef std::vector<JointNodeSetPtr> JointNodeSetArray;
51 
52  class ModelNodeSetImpl;
53 
54  class HRPMODEL_API ModelNodeSet
55  {
56  public:
57 
58  ModelNodeSet();
59  virtual ~ModelNodeSet();
60 
61  bool loadModelFile(const std::string& filename);
62 
63  int numJointNodes();
64  VrmlProtoInstancePtr humanoidNode();
65  JointNodeSetPtr rootJointNodeSet();
66 
67  int numExtraJointNodes();
68  VrmlProtoInstancePtr extraJointNode(int index);
69 
76 #if (BOOST_VERSION >= 103900)
77  boost::signals2::signal<void(const std::string& message)> sigMessage;
78 #else
79  boost::signal<void(const std::string& message)> sigMessage;
80 #endif
81 
82  class Exception {
83  public:
84  Exception(const std::string& description) : description(description) { }
85  const char* what() const { return description.c_str(); }
86  private:
87  std::string description;
88  };
89 
90  private:
92  };
93 
94  typedef boost::shared_ptr<ModelNodeSet> ModelNodeSetPtr;
95 };
96 
97 
98 #endif
VrmlProtoInstancePtr jointNode
Definition: ModelNodeSet.h:40
char * filename
Definition: cdjpeg.h:133
std::vector< JointNodeSetPtr > childJointNodeSets
Definition: ModelNodeSet.h:41
std::vector< VrmlProtoInstancePtr > segmentNodes
Definition: ModelNodeSet.h:43
boost::intrusive_ptr< VrmlProtoInstance > VrmlProtoInstancePtr
Definition: VrmlNodes.h:898
std::vector< VrmlProtoInstancePtr > sensorNodes
Definition: ModelNodeSet.h:44
def description()
std::vector< JointNodeSetPtr > JointNodeSetArray
Definition: ModelNodeSet.h:50
ModelNodeSetImpl * impl
Definition: ModelNodeSet.h:91
std::vector< std::pair< Matrix44, VrmlNodePtr >, Eigen::aligned_allocator< std::pair< Matrix44, VrmlNodePtr > > > lightNodes
Definition: ModelNodeSet.h:47
list index
Exception(const std::string &description)
Definition: ModelNodeSet.h:84
std::vector< VrmlProtoInstancePtr > hwcNodes
Definition: ModelNodeSet.h:45
std::vector< Matrix44, Eigen::aligned_allocator< Matrix44 > > transforms
Definition: ModelNodeSet.h:42
boost::shared_ptr< ModelNodeSet > ModelNodeSetPtr
Definition: ModelNodeSet.h:94
boost::shared_ptr< JointNodeSet > JointNodeSetPtr
Definition: ModelNodeSet.h:34
const char * what() const
Definition: ModelNodeSet.h:85
boost::signal< void(const std::string &message)> sigMessage
Definition: ModelNodeSet.h:79


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:24