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
static void setParam(POA_OpenHRP::BodyInfo *bodyInfo, std::string param, int value)
AllLinkShapeIndexSequence linkShapeIndices_
Definition: BodyInfo_impl.h:71
char * filename
Definition: cdjpeg.h:133
OpenHRP::ModelLoader::AABBdataType AABBdataType_
Definition: BodyInfo_impl.h:65
png_infop png_charpp name
Definition: png.h:2382
png_voidp int value
Definition: png.h:2113
boost::intrusive_ptr< VrmlProtoInstance > VrmlProtoInstancePtr
Definition: VrmlNodes.h:898
void setLastUpdateTime(time_t time)
Definition: BodyInfo_impl.h:47
AllLinkShapeIndexSequence originlinkShapeIndices_
Definition: BodyInfo_impl.h:72
static void changetoBoundingBox(POA_OpenHRP::BodyInfo *bodyInfo, unsigned int *depth)
time_t lastUpdate_
Definition: BodyInfo_impl.h:63
LinkInfoSequence links_
Definition: BodyInfo_impl.h:70
std::string name_
Definition: BodyInfo_impl.h:67
std::vector< ColdetModelPtr > linkColdetModels
Definition: BodyInfo_impl.h:75
bool checkInlineFileUpdateTime()
Definition: BodyInfo_impl.h:49
ExtraJointInfoSequence extraJoints_
Definition: BodyInfo_impl.h:73
time_t getLastUpdateTime()
Definition: BodyInfo_impl.h:48
backing_store_ptr info
Definition: jmemsys.h:181
boost::shared_ptr< JointNodeSet > JointNodeSetPtr
Definition: ModelNodeSet.h:34
std::string url_
Definition: BodyInfo_impl.h:68
StringSequence info_
Definition: BodyInfo_impl.h:69


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