BodyInfo_impl.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 
15 #ifndef OPENHRP_MODEL_LOADER_BODYINFO_IMPL_H_INCLUDED
16 #define OPENHRP_MODEL_LOADER_BODYINFO_IMPL_H_INCLUDED
17 
18 #include <string>
19 #include <hrpCorba/ORBwrap.h>
20 #include <hrpCorba/ModelLoader.hh>
21 #include <hrpModel/ModelNodeSet.h>
23 
24 #include "ShapeSetInfo_impl.h"
25 
26 using namespace OpenHRP;
27 using namespace hrp;
28 
30  public virtual POA_OpenHRP::BodyInfo,
31  public virtual ShapeSetInfo_impl
32 {
33  public:
34 
35  BodyInfo_impl(PortableServer::POA_ptr poa);
36  virtual ~BodyInfo_impl();
37 
38  virtual char* name();
39  virtual char* url();
40  virtual StringSequence* info();
41  virtual LinkInfoSequence* links();
42  virtual AllLinkShapeIndexSequence* linkShapeIndices();
43  virtual ExtraJointInfoSequence* extraJoints();
44 
45  void loadModelFile(const std::string& filename);
46 
47  void setLastUpdateTime(time_t time) { lastUpdate_ = time;};
48  time_t getLastUpdateTime() { return lastUpdate_; }
49  bool checkInlineFileUpdateTime() { return checkFileUpdateTime(); }
50 
51  bool getParam(std::string param);
52  void setParam(std::string param, bool value);
53  void setParam(std::string param, int value);
54  void changetoBoundingBox(unsigned int* depth) ;
55  void changetoOriginData();
56 
57 protected:
58 
59  virtual const std::string& topUrl();
60 
61 private:
62 
63  time_t lastUpdate_;
64  bool readImage_;
65  OpenHRP::ModelLoader::AABBdataType AABBdataType_;
66 
67  std::string name_;
68  std::string url_;
69  StringSequence info_;
70  LinkInfoSequence links_;
71  AllLinkShapeIndexSequence linkShapeIndices_;
72  AllLinkShapeIndexSequence originlinkShapeIndices_;
73  ExtraJointInfoSequence extraJoints_;
74 
75  std::vector<ColdetModelPtr> linkColdetModels;
76 
77  int readJointNodeSet(JointNodeSetPtr jointNodeSet, int& currentIndex, int motherIndex);
78  void setJointParameters(int linkInfoIndex, VrmlProtoInstancePtr jointNode );
79  void setSegmentParameters(int linkInfoIndex, JointNodeSetPtr jointNodeSet);
80  void setSensors(int linkInfoIndex, JointNodeSetPtr jointNodeSet);
81  void setHwcs(int linkInfoIndex, JointNodeSetPtr jointNodeSet);
82  void setLights(int linkInfoIndex, JointNodeSetPtr jointNodeSet);
83  void readSensorNode(int linkInfoIndex, SensorInfo& sensorInfo, VrmlProtoInstancePtr sensorNode);
84  void readHwcNode(int linkInfoIndex, HwcInfo& hwcInfo, VrmlProtoInstancePtr hwcNode);
85  void readLightNode(int linkInfoIndex, LightInfo& LightInfo,
86  std::pair<Matrix44, VrmlNodePtr> &transformedLight);
87 };
88 
89 #endif
BodyInfo_impl::checkInlineFileUpdateTime
bool checkInlineFileUpdateTime()
Definition: BodyInfo_impl.h:49
hrp::JointNodeSetPtr
boost::shared_ptr< JointNodeSet > JointNodeSetPtr
Definition: ModelNodeSet.h:34
BodyInfo_impl::url_
std::string url_
Definition: BodyInfo_impl.h:68
BodyInfo_impl::linkColdetModels
std::vector< ColdetModelPtr > linkColdetModels
Definition: BodyInfo_impl.h:75
BodyInfo_impl::name_
std::string name_
Definition: BodyInfo_impl.h:67
BodyInfo_impl::readImage_
bool readImage_
Definition: BodyInfo_impl.h:64
ModelNodeSet.h
BodyInfo_impl::getLastUpdateTime
time_t getLastUpdateTime()
Definition: BodyInfo_impl.h:48
hrp::VrmlProtoInstancePtr
boost::intrusive_ptr< VrmlProtoInstance > VrmlProtoInstancePtr
Definition: VrmlNodes.h:898
hrp
Definition: ColdetModel.h:28
BodyInfo_impl::originlinkShapeIndices_
AllLinkShapeIndexSequence originlinkShapeIndices_
Definition: BodyInfo_impl.h:72
OpenHRP
Definition: ConstraintForceSolver.h:19
filename
char * filename
Definition: cdjpeg.h:133
value
png_voidp int value
Definition: png.h:2110
ShapeSetInfo_impl.h
BodyInfo_impl::AABBdataType_
OpenHRP::ModelLoader::AABBdataType AABBdataType_
Definition: BodyInfo_impl.h:65
BodyInfo_impl::linkShapeIndices_
AllLinkShapeIndexSequence linkShapeIndices_
Definition: BodyInfo_impl.h:71
BodyInfo_impl::links_
LinkInfoSequence links_
Definition: BodyInfo_impl.h:70
changetoBoundingBox
static void changetoBoundingBox(POA_OpenHRP::BodyInfo *bodyInfo, unsigned int *depth)
Definition: ModelLoader_impl.cpp:142
name
png_infop png_charpp name
Definition: png.h:2379
ColdetModel.h
ORBwrap.h
BodyInfo_impl::extraJoints_
ExtraJointInfoSequence extraJoints_
Definition: BodyInfo_impl.h:73
BodyInfo_impl::setLastUpdateTime
void setLastUpdateTime(time_t time)
Definition: BodyInfo_impl.h:47
BodyInfo_impl
Definition: BodyInfo_impl.h:29
BodyInfo_impl::info_
StringSequence info_
Definition: BodyInfo_impl.h:69
BodyInfo_impl::lastUpdate_
time_t lastUpdate_
Definition: BodyInfo_impl.h:63
info
backing_store_ptr info
Definition: jmemsys.h:181
ShapeSetInfo_impl
Definition: ShapeSetInfo_impl.h:30
setParam
static void setParam(POA_OpenHRP::BodyInfo *bodyInfo, std::string param, int value)
Definition: ModelLoader_impl.cpp:125


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