17 #ifndef OPENHRP_UTIL_VRMLNODES_H_INCLUDED 18 #define OPENHRP_UTIL_VRMLNODES_H_INCLUDED 27 #include <boost/intrusive_ptr.hpp> 28 #include <boost/array.hpp> 128 static const char* getLabelOfFieldType(
int type);
225 virtual MFNode& getChildren() = 0;
226 virtual int countChildren() = 0;
228 virtual void replaceChild(
int childIndex,
VrmlNode* childNode) = 0;
230 void removeChild(
int childIndex);
241 virtual MFNode& getChildren();
242 virtual int countChildren();
244 virtual void replaceChild(
int childIndex,
VrmlNode* childNode);
660 virtual MFNode& getChildren();
661 virtual int countChildren();
663 virtual void replaceChild(
int childIndex,
VrmlNode* childNode);
677 virtual MFNode& getChildren();
678 virtual int countChildren();
680 virtual void replaceChild(
int childIndex,
VrmlNode* childNode);
831 inline SFInt32&
sfInt32() {
return v.sfInt32; }
832 inline MFInt32&
mfInt32() {
return *((MFInt32*)valueObj); }
833 inline SFFloat&
sfFloat() {
return v.sfFloat; }
834 inline MFFloat&
mfFloat() {
return *((MFFloat*)valueObj); }
835 inline SFTime&
sfTime() {
return v.sfFloat; }
836 inline MFTime&
mfTime() {
return *((MFTime*)valueObj); }
837 inline SFBool&
sfBool() {
return v.sfBool; }
838 inline SFVec2f&
sfVec2f() {
return v.sfVec2f; }
839 inline MFVec2f&
mfVec2f() {
return *((MFVec2f*)valueObj); }
840 inline SFVec3f&
sfVec3f() {
return v.sfVec3f; }
841 inline MFVec3f&
mfVec3f() {
return *((MFVec3f*)valueObj); }
843 inline MFRotation&
mfRotation() {
return *((MFRotation*)valueObj); }
844 inline SFString&
sfString() {
return *((SFString*)valueObj); }
845 inline MFString&
mfString() {
return *((MFString*)valueObj); }
846 inline SFColor&
sfColor() {
return v.sfColor; }
847 inline MFColor&
mfColor() {
return *((MFColor*)valueObj); }
848 inline SFNode&
sfNode() {
return *((SFNode*)valueObj); }
849 inline MFNode&
mfNode() {
return *((MFNode*)valueObj); }
868 TProtoFieldMap::iterator p = fields.find(fieldName);
869 return (p != fields.end()) ? &p->second : 0;
893 TProtoFieldMap::iterator p = fields.find(fieldName);
894 return (p != fields.end()) ? &p->second : 0;
906 template<
class VrmlNodeType>
908 VrmlProtoInstancePtr protoInstance = boost::dynamic_pointer_cast<
VrmlProtoInstance>(node);
910 return boost::dynamic_pointer_cast<VrmlNodeType>(protoInstance->actualNode);
912 return boost::dynamic_pointer_cast<VrmlNodeType>(node);
std::vector< SFNode > MFNode
MFRotation & mfRotation()
std::vector< SFFloat > MFFloat
boost::intrusive_ptr< VrmlTextureTransform > VrmlTextureTransformPtr
boost::intrusive_ptr< VrmlCollision > VrmlCollisionPtr
boost::intrusive_ptr< VrmlBackground > VrmlBackgroundPtr
std::vector< SFColor > MFColor
png_infop png_charp png_int_32 png_int_32 int * type
boost::intrusive_ptr< VrmlUnsupportedNode > VrmlUnsupportedNodePtr
boost::intrusive_ptr< VrmlText > VrmlTextPtr
Abstract base class of all vrml nodes.
boost::intrusive_ptr< VrmlImageTexture > VrmlImageTexturePtr
boost::intrusive_ptr< VrmlTransform > VrmlTransformPtr
std::pair< std::string, VrmlVariantField > TProtoFieldPair
std::vector< unsigned char > pixels
boost::intrusive_ptr< VrmlGroup > VrmlGroupPtr
boost::intrusive_ptr< VrmlElevationGrid > VrmlElevationGridPtr
std::map< std::string, VrmlVariantField > TProtoFieldMap
boost::intrusive_ptr< VrmlProtoInstance > VrmlProtoInstancePtr
boost::intrusive_ptr< VrmlGeometry > VrmlGeometryPtr
Base class of VRML geometry nodes.
boost::intrusive_ptr< VrmlNavigationInfo > VrmlNavigationInfoPtr
boost::intrusive_ptr< VrmlNodeType > dynamic_node_cast(VrmlNodePtr node)
VRML IndexedFaseSet node.
void intrusive_ptr_add_ref(Referenced *obj)
boost::intrusive_ptr< VrmlMovieTexture > VrmlMovieTexturePtr
VRML TextureCoordinate node.
boost::intrusive_ptr< VrmlBillboard > VrmlBillboardPtr
boost::intrusive_ptr< VrmlPixelTexture > VrmlPixelTexturePtr
boost::intrusive_ptr< VrmlCone > VrmlConePtr
void intrusive_ptr_release(Referenced *obj)
boost::intrusive_ptr< VrmlLOD > VrmlLODPtr
boost::intrusive_ptr< VrmlShape > VrmlShapePtr
boost::intrusive_ptr< VrmlFontStyle > VrmlFontStylePtr
boost::intrusive_ptr< VrmlSwitch > VrmlSwitchPtr
VRML IndexedLineSet node.
boost::intrusive_ptr< VrmlBox > VrmlBoxPtr
boost::intrusive_ptr< VrmlProto > VrmlProtoPtr
VrmlTextureCoordinatePtr texCoord
VRML TextureTransform node.
boost::intrusive_ptr< VrmlCylinderSensor > VrmlCylinderSensorPtr
std::vector< SFRotation > MFRotation
boost::intrusive_ptr< VrmlIndexedLineSet > VrmlIndexedLineSetPtr
std::vector< SFVec3f > MFVec3f
VrmlVariantField * addField(const std::string &fieldName, VrmlFieldTypeId typeId)
boost::intrusive_ptr< VrmlColor > VrmlColorPtr
boost::array< SFFloat, 2 > SFVec2f
boost::intrusive_ptr< VrmlTexture > VrmlTexturePtr
boost::intrusive_ptr< VrmlAppearance > VrmlAppearancePtr
VrmlVariantField * getField(const std::string &fieldName)
void setType(VrmlFieldTypeId typeId0)
This can be called once.
VrmlTextureCoordinatePtr texCoord
boost::intrusive_ptr< VrmlPointLight > VrmlPointLightPtr
VRML node which is instance of VRML Prototype.
boost::intrusive_ptr< VrmlAnchor > VrmlAnchorPtr
boost::intrusive_ptr< VrmlSphere > VrmlSpherePtr
boost::intrusive_ptr< VrmlInline > VrmlInlinePtr
std::vector< SFVec2f > MFVec2f
Base class of VRML Texture nodes.
boost::intrusive_ptr< VrmlNode > VrmlNodePtr
VrmlTextureTransformPtr textureTransform
VrmlAppearancePtr appearance
std::bitset< NUM_VRML_NODE_CATEGORIES > categorySet
boost::intrusive_ptr< VrmlWorldInfo > VrmlWorldInfoPtr
VrmlFontStylePtr fontStyle
boost::array< SFFloat, 3 > SFVec3f
boost::intrusive_ptr< VrmlExtrusion > VrmlExtrusionPtr
boost::intrusive_ptr< VrmlSpotLight > VrmlSpotLightPtr
VRML CylinderSensor node.
std::vector< SFString > MFString
SFRotation & sfRotation()
boost::intrusive_ptr< VrmlDirectionalLight > VrmlDirectionalLightPtr
boost::intrusive_ptr< VrmlIndexedFaceSet > VrmlIndexedFaceSetPtr
boost::intrusive_ptr< AbstractVrmlGroup > AbstractVrmlGroupPtr
boost::intrusive_ptr< VrmlCoordinate > VrmlCoordinatePtr
boost::intrusive_ptr< VrmlCylinder > VrmlCylinderPtr
boost::intrusive_ptr< VrmlPointSet > VrmlPointSetPtr
VrmlVariantField * getField(const std::string &fieldName)
std::vector< SFVec4f > MFVec4f
boost::intrusive_ptr< VrmlViewpoint > VrmlViewpointPtr
std::vector< SFInt32 > MFInt32
boost::intrusive_ptr< VrmlFog > VrmlFogPtr
boost::intrusive_ptr< VrmlTextureCoordinate > VrmlTextureCoordinatePtr
VRML NavigationInfo node.
boost::array< SFFloat, 4 > SFVec4f
boost::intrusive_ptr< VrmlNormal > VrmlNormalPtr
boost::intrusive_ptr< VrmlMaterial > VrmlMaterialPtr
std::vector< SFTime > MFTime