BodyInfo_impl.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2008, AIST, the University of Tokyo and General Robotix Inc.
00003  * All rights reserved. This program is made available under the terms of the
00004  * Eclipse Public License v1.0 which accompanies this distribution, and is
00005  * available at http://www.eclipse.org/legal/epl-v10.html
00006  * Contributors:
00007  * National Institute of Advanced Industrial Science and Technology (AIST)
00008  */
00009 
00015 #ifndef OPENHRP_MODEL_LOADER_BODYINFO_IMPL_H_INCLUDED
00016 #define OPENHRP_MODEL_LOADER_BODYINFO_IMPL_H_INCLUDED
00017 
00018 #include <string>
00019 #include <hrpCorba/ORBwrap.h>
00020 #include <hrpCorba/ModelLoader.hh>
00021 #include <hrpModel/ModelNodeSet.h>
00022 #include <hrpCollision/ColdetModel.h>
00023 
00024 #include "ShapeSetInfo_impl.h"
00025 
00026 using namespace OpenHRP;
00027 using namespace hrp;
00028 
00029 class BodyInfo_impl :
00030     public virtual POA_OpenHRP::BodyInfo,
00031     public virtual ShapeSetInfo_impl
00032 {
00033   public:
00034                 
00035     BodyInfo_impl(PortableServer::POA_ptr poa);
00036     virtual ~BodyInfo_impl();
00037 
00038     virtual char* name();
00039     virtual char* url();
00040     virtual StringSequence* info();
00041     virtual LinkInfoSequence* links();
00042     virtual AllLinkShapeIndexSequence* linkShapeIndices();
00043         virtual ExtraJointInfoSequence* extraJoints();
00044 
00045     void loadModelFile(const std::string& filename);
00046 
00047     void setLastUpdateTime(time_t time) { lastUpdate_ = time;};
00048     time_t getLastUpdateTime() { return lastUpdate_; }
00049     bool checkInlineFileUpdateTime() { return checkFileUpdateTime(); }
00050 
00051     bool getParam(std::string param);
00052     void setParam(std::string param, bool value);
00053     void setParam(std::string param, int value);
00054     void changetoBoundingBox(unsigned int* depth) ; 
00055     void changetoOriginData();
00056 
00057 protected:
00058 
00059     virtual const std::string& topUrl();
00060 
00061 private:
00062         
00063     time_t lastUpdate_;
00064     bool readImage_;
00065     OpenHRP::ModelLoader::AABBdataType AABBdataType_;
00066 
00067     std::string name_;
00068     std::string url_;
00069     StringSequence info_;
00070     LinkInfoSequence links_;
00071     AllLinkShapeIndexSequence linkShapeIndices_;
00072     AllLinkShapeIndexSequence originlinkShapeIndices_;
00073         ExtraJointInfoSequence extraJoints_;
00074 
00075     std::vector<ColdetModelPtr> linkColdetModels;
00076 
00077     int readJointNodeSet(JointNodeSetPtr jointNodeSet, int& currentIndex, int motherIndex);
00078     void setJointParameters(int linkInfoIndex, VrmlProtoInstancePtr jointNode );
00079     void setSegmentParameters(int linkInfoIndex, JointNodeSetPtr jointNodeSet);
00080     void setSensors(int linkInfoIndex, JointNodeSetPtr jointNodeSet);
00081     void setHwcs(int linkInfoIndex, JointNodeSetPtr jointNodeSet);
00082     void setLights(int linkInfoIndex, JointNodeSetPtr jointNodeSet);
00083     void readSensorNode(int linkInfoIndex, SensorInfo& sensorInfo, VrmlProtoInstancePtr sensorNode);
00084     void readHwcNode(int linkInfoIndex, HwcInfo& hwcInfo, VrmlProtoInstancePtr hwcNode);
00085     void readLightNode(int linkInfoIndex, LightInfo& LightInfo, 
00086                        std::pair<Matrix44, VrmlNodePtr> &transformedLight);
00087 };
00088 
00089 #endif


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Thu Apr 11 2019 03:30:15