6 #ifndef CNOID_UTIL_VRMLNODES_H_INCLUDED
7 #define CNOID_UTIL_VRMLNODES_H_INCLUDED
12 #include <boost/variant.hpp>
13 #include <boost/intrusive_ptr.hpp>
15 #include <Eigen/Geometry>
16 #include <Eigen/StdVector>
48 typedef std::vector<SFVec2f, Eigen::aligned_allocator<SFVec2f> >
MFVec2f;
121 if(obj->refCounter <= 0){
145 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
198 virtual MFNode& getChildren() = 0;
199 virtual int countChildren() = 0;
200 virtual VrmlNode* getChild(
int index) = 0;
201 virtual void replaceChild(
int childIndex,
VrmlNode* childNode) = 0;
203 void removeChild(
int childIndex);
214 virtual MFNode& getChildren();
215 virtual int countChildren();
216 virtual VrmlNode* getChild(
int index);
217 virtual void replaceChild(
int childIndex,
VrmlNode* childNode);
232 Eigen::Affine3d toAffine3d();
331 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
625 virtual MFNode& getChildren();
626 virtual int countChildren();
627 virtual VrmlNode* getChild(
int index);
628 virtual void replaceChild(
int childIndex,
VrmlNode* childNode);
642 virtual MFNode& getChildren();
643 virtual int countChildren();
644 virtual VrmlNode* getChild(
int index);
645 virtual void replaceChild(
int childIndex,
VrmlNode* childNode);
759 typedef boost::variant<
SFBool,
760 SFInt32,
SFFloat,
SFVec2f,
SFVec3f,
SFRotation,
SFColor,
SFTime,
SFString,
SFNode,
SFImage,
765 SFINT32,
SFFLOAT,
SFVEC2F,
SFVEC3F,
SFROTATION,
SFCOLOR,
SFTIME,
SFSTRING,
SFNODE,
SFIMAGE,
808 TProtoFieldMap::iterator p = fields.find(fieldName);
809 return (p != fields.end()) ? &p->second : 0;
813 return fields[fieldName];
839 TProtoFieldMap::iterator p = fields.find(fieldName);
840 return (p != fields.end()) ? &p->second : 0;
851 template<
class VrmlNodeType>
855 return boost::dynamic_pointer_cast<VrmlNodeType>(protoInstance->actualNode);
857 return boost::dynamic_pointer_cast<VrmlNodeType>(node);