BodyInfoCollada_impl.h
Go to the documentation of this file.
1 // -*- coding: utf-8 -*-
2 // Copyright (C) 2011 University of Tokyo, General Robotix Inc.
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
21 #ifndef MODELNODE_COLLADA_IMPL_H
22 #define MODELNODE_COLLADA_IMPL_H
23 
24 #include <string>
25 #include <hrpCorba/ORBwrap.h>
26 #include <hrpCorba/ModelLoader.hh>
28 
29 #include <boost/thread/thread.hpp>
30 
31 #include "ShapeSetInfo_impl.h"
32 
33 class ColladaReader;
34 
37  public virtual ShapeSetInfo_impl,
38  public virtual POA_OpenHRP::BodyInfo
39 {
40  public:
41 
42  BodyInfoCollada_impl(PortableServer::POA_ptr poa);
43  virtual ~BodyInfoCollada_impl();
44 
45  virtual char* name();
46  virtual char* url();
47  virtual StringSequence* info();
48  virtual LinkInfoSequence* links();
49  virtual AllLinkShapeIndexSequence* linkShapeIndices();
50  virtual ExtraJointInfoSequence* extraJoints();
51 
52  void loadModelFile(const std::string& filename);
53  void setLastUpdateTime(time_t time) { lastUpdate_ = time;};
54  time_t getLastUpdateTime() { return lastUpdate_; }
56 
57  bool getParam(std::string param);
58  void setParam(std::string param, bool value);
59  void setParam(std::string param, int value);
60  void changetoBoundingBox(unsigned int* depth) ;
61 
62 protected:
63 
64  virtual const std::string& topUrl();
65 
66 private:
67 
68  time_t lastUpdate_;
69  std::map<std::string, time_t> fileTimeMap;
70  bool readImage_;
71  OpenHRP::ModelLoader::AABBdataType AABBdataType_;
72 
73  std::string name_;
74  std::string url_;
75  StringSequence info_;
76  LinkInfoSequence links_;
77  AllLinkShapeIndexSequence linkShapeIndices_;
78  ExtraJointInfoSequence extraJoints_;
79 
80  std::vector<ColdetModelPtr> linkColdetModels;
81 
82  void setColdetModel(ColdetModelPtr& coldetModel, TransformedShapeIndexSequence shapeIndices, const Matrix44& Tparent, int& vertexIndex, int& triangleIndex);
83  void setColdetModelTriangles(ColdetModelPtr& coldetModel, const TransformedShapeIndex& tsi, const Matrix44& Tparent, int& vertexIndex, int& triangleIndex);
84 
85  static boost::mutex lock_;
86 
87  friend class ColladaReader;
88 };
89 
90 #endif
BodyInfoCollada_impl::checkInlineFileUpdateTime
bool checkInlineFileUpdateTime()
Definition: BodyInfoCollada_impl.cpp:3479
BodyInfoCollada_impl::url
virtual char * url()
Definition: BodyInfoCollada_impl.cpp:3293
BodyInfoCollada_impl::lastUpdate_
time_t lastUpdate_
Definition: BodyInfoCollada_impl.h:68
BodyInfoCollada_impl::extraJoints_
ExtraJointInfoSequence extraJoints_
Definition: BodyInfoCollada_impl.h:78
BodyInfoCollada_impl::setColdetModelTriangles
void setColdetModelTriangles(ColdetModelPtr &coldetModel, const TransformedShapeIndex &tsi, const Matrix44 &Tparent, int &vertexIndex, int &triangleIndex)
Definition: BodyInfoCollada_impl.cpp:3363
ColladaReader
The colladadom reader that fills in the BodyInfoCollada_impl class.
Definition: BodyInfoCollada_impl.cpp:58
BodyInfoCollada_impl::setColdetModel
void setColdetModel(ColdetModelPtr &coldetModel, TransformedShapeIndexSequence shapeIndices, const Matrix44 &Tparent, int &vertexIndex, int &triangleIndex)
Definition: BodyInfoCollada_impl.cpp:3356
BodyInfoCollada_impl::info_
StringSequence info_
Definition: BodyInfoCollada_impl.h:75
BodyInfoCollada_impl::~BodyInfoCollada_impl
virtual ~BodyInfoCollada_impl()
Definition: BodyInfoCollada_impl.cpp:3277
BodyInfoCollada_impl
reads in collada files and initializes a BodyInfo struct
Definition: BodyInfoCollada_impl.h:36
BodyInfoCollada_impl::readImage_
bool readImage_
Definition: BodyInfoCollada_impl.h:70
BodyInfoCollada_impl::getParam
bool getParam(std::string param)
Definition: BodyInfoCollada_impl.cpp:3341
BodyInfoCollada_impl::extraJoints
virtual ExtraJointInfoSequence * extraJoints()
Definition: BodyInfoCollada_impl.cpp:3316
BodyInfoCollada_impl::name
virtual char * name()
Definition: BodyInfoCollada_impl.cpp:3287
BodyInfoCollada_impl::fileTimeMap
std::map< std::string, time_t > fileTimeMap
Definition: BodyInfoCollada_impl.h:69
BodyInfoCollada_impl::AABBdataType_
OpenHRP::ModelLoader::AABBdataType AABBdataType_
Definition: BodyInfoCollada_impl.h:71
filename
char * filename
Definition: cdjpeg.h:133
value
png_voidp int value
Definition: png.h:2110
hrp::Matrix44
Eigen::Matrix4d Matrix44
Definition: Eigen4d.h:18
ShapeSetInfo_impl.h
BodyInfoCollada_impl::linkShapeIndices_
AllLinkShapeIndexSequence linkShapeIndices_
Definition: BodyInfoCollada_impl.h:77
BodyInfoCollada_impl::setParam
void setParam(std::string param, bool value)
Definition: BodyInfoCollada_impl.cpp:3334
BodyInfoCollada_impl::linkShapeIndices
virtual AllLinkShapeIndexSequence * linkShapeIndices()
Definition: BodyInfoCollada_impl.cpp:3311
BodyInfoCollada_impl::name_
std::string name_
Definition: BodyInfoCollada_impl.h:73
BodyInfoCollada_impl::linkColdetModels
std::vector< ColdetModelPtr > linkColdetModels
Definition: BodyInfoCollada_impl.h:80
BodyInfoCollada_impl::links
virtual LinkInfoSequence * links()
Definition: BodyInfoCollada_impl.cpp:3305
BodyInfoCollada_impl::BodyInfoCollada_impl
BodyInfoCollada_impl(PortableServer::POA_ptr poa)
Definition: BodyInfoCollada_impl.cpp:3270
ColdetModel.h
BodyInfoCollada_impl::links_
LinkInfoSequence links_
Definition: BodyInfoCollada_impl.h:76
ORBwrap.h
BodyInfoCollada_impl::lock_
static boost::mutex lock_
Definition: BodyInfoCollada_impl.h:85
BodyInfoCollada_impl::changetoBoundingBox
void changetoBoundingBox(unsigned int *depth)
Definition: BodyInfoCollada_impl.cpp:3396
BodyInfoCollada_impl::url_
std::string url_
Definition: BodyInfoCollada_impl.h:74
BodyInfoCollada_impl::getLastUpdateTime
time_t getLastUpdateTime()
Definition: BodyInfoCollada_impl.h:54
ShapeSetInfo_impl::poa
PortableServer::POA_var poa
Definition: ShapeSetInfo_impl.h:61
BodyInfoCollada_impl::info
virtual StringSequence * info()
Definition: BodyInfoCollada_impl.cpp:3299
hrp::ColdetModelPtr
boost::intrusive_ptr< ColdetModel > ColdetModelPtr
Definition: ColdetModel.h:268
ShapeSetInfo_impl
Definition: ShapeSetInfo_impl.h:30
BodyInfoCollada_impl::setLastUpdateTime
void setLastUpdateTime(time_t time)
Definition: BodyInfoCollada_impl.h:53
BodyInfoCollada_impl::topUrl
virtual const std::string & topUrl()
Definition: BodyInfoCollada_impl.cpp:3281
BodyInfoCollada_impl::loadModelFile
void loadModelFile(const std::string &filename)
Definition: BodyInfoCollada_impl.cpp:3322


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