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
virtual AllLinkShapeIndexSequence * linkShapeIndices()
AllLinkShapeIndexSequence linkShapeIndices_
std::vector< ColdetModelPtr > linkColdetModels
bool getParam(std::string param)
static boost::mutex lock_
ExtraJointInfoSequence extraJoints_
char * filename
Definition: cdjpeg.h:133
void setColdetModelTriangles(ColdetModelPtr &coldetModel, const TransformedShapeIndex &tsi, const Matrix44 &Tparent, int &vertexIndex, int &triangleIndex)
png_voidp int value
Definition: png.h:2113
Eigen::Matrix4d Matrix44
Definition: Eigen4d.h:18
virtual ExtraJointInfoSequence * extraJoints()
reads in collada files and initializes a BodyInfo struct
PortableServer::POA_var poa
std::map< std::string, time_t > fileTimeMap
void loadModelFile(const std::string &filename)
void setParam(std::string param, bool value)
virtual LinkInfoSequence * links()
void setColdetModel(ColdetModelPtr &coldetModel, TransformedShapeIndexSequence shapeIndices, const Matrix44 &Tparent, int &vertexIndex, int &triangleIndex)
BodyInfoCollada_impl(PortableServer::POA_ptr poa)
void changetoBoundingBox(unsigned int *depth)
OpenHRP::ModelLoader::AABBdataType AABBdataType_
The colladadom reader that fills in the BodyInfoCollada_impl class.
virtual StringSequence * info()
boost::intrusive_ptr< ColdetModel > ColdetModelPtr
Definition: ColdetModel.h:268
virtual const std::string & topUrl()
void setLastUpdateTime(time_t time)


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Sat May 8 2021 02:42:36