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
hrp::JointNodeSetPtr
boost::shared_ptr< JointNodeSet > JointNodeSetPtr
Definition: ModelNodeSet.h:34
hrp::VrmlProtoInstancePtr
boost::intrusive_ptr< VrmlProtoInstance > VrmlProtoInstancePtr
Definition: VrmlNodes.h:898
hrp::JointNodeSet::transforms
std::vector< Matrix44, Eigen::aligned_allocator< Matrix44 > > transforms
Definition: ModelNodeSet.h:42
hrp
Definition: ColdetModel.h:28
hrp::ModelNodeSet::Exception::what
const char * what() const
Definition: ModelNodeSet.h:85
VrmlNodes.h
hrp::ModelNodeSet
Definition: ModelNodeSet.h:54
hrp::JointNodeSet::sensorNodes
std::vector< VrmlProtoInstancePtr > sensorNodes
Definition: ModelNodeSet.h:44
hrp::ModelNodeSetPtr
boost::shared_ptr< ModelNodeSet > ModelNodeSetPtr
Definition: ModelNodeSet.h:94
hrp::JointNodeSet::jointNode
VrmlProtoInstancePtr jointNode
Definition: ModelNodeSet.h:40
filename
char * filename
Definition: cdjpeg.h:133
hrp::ModelNodeSet::Exception
Definition: ModelNodeSet.h:82
hrp::JointNodeSet
Definition: ModelNodeSet.h:37
hrp::JointNodeSet::lightNodes
std::vector< std::pair< Matrix44, VrmlNodePtr >, Eigen::aligned_allocator< std::pair< Matrix44, VrmlNodePtr > > > lightNodes
Definition: ModelNodeSet.h:47
Eigen4d.h
hrp::ModelNodeSet::sigMessage
boost::signal< void(const std::string &message)> sigMessage
Definition: ModelNodeSet.h:79
hrp::ModelNodeSetImpl
Definition: ModelNodeSet.cpp:47
hrp::JointNodeSetArray
std::vector< JointNodeSetPtr > JointNodeSetArray
Definition: ModelNodeSet.h:50
hrp::JointNodeSet::childJointNodeSets
std::vector< JointNodeSetPtr > childJointNodeSets
Definition: ModelNodeSet.h:41
hrp::JointNodeSet::segmentNodes
std::vector< VrmlProtoInstancePtr > segmentNodes
Definition: ModelNodeSet.h:43
hrp::ModelNodeSet::impl
ModelNodeSetImpl * impl
Definition: ModelNodeSet.h:91
void
typedef void(PNGAPI *png_error_ptr) PNGARG((png_structp
hrp::ModelNodeSet::Exception::Exception
Exception(const std::string &description)
Definition: ModelNodeSet.h:84
hrp::JointNodeSet::hwcNodes
std::vector< VrmlProtoInstancePtr > hwcNodes
Definition: ModelNodeSet.h:45
hrp::ModelNodeSet::Exception::description
std::string description
Definition: ModelNodeSet.h:87


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Wed Sep 7 2022 02:51:03