void ConeNode::parseField(const char* fieldName,VRMLFile& vrmlFile) { if(strcmp(fieldName,"height")==0) { vrmlFile.parseField(height); } else if(strcmp(fieldName,"bottomRadius")==0) { vrmlFile.parseField(bottomRadius); } else if(strcmp(fieldName,"numSegments")==0) { vrmlFile.parseField(numSegments); } else if(strcmp(fieldName,"side")==0) { vrmlFile.parseField(side); } else if(strcmp(fieldName,"bottom")==0) { vrmlFile.parseField(bottom); } else GeometryNode::parseField(fieldName,vrmlFile); }
void TransformNode::parseField(const char* fieldName,VRMLFile& vrmlFile) { if(strcmp(fieldName,"center")==0) { vrmlFile.parseField(center); } else if(strcmp(fieldName,"rotation")==0) { vrmlFile.parseField(rotation); } else if(strcmp(fieldName,"scale")==0) { vrmlFile.parseField(scale); } else if(strcmp(fieldName,"scaleOrientation")==0) { vrmlFile.parseField(scaleOrientation); } else if(strcmp(fieldName,"translation")==0) { vrmlFile.parseField(translation); } else GroupNode::parseField(fieldName,vrmlFile); }
void QuadSetNode::parseField(const char* fieldName,VRMLFile& vrmlFile) { if(strcmp(fieldName,"coord")==0) { vrmlFile.parseSFNode(coord); } else if(strcmp(fieldName,"ccw")==0) { vrmlFile.parseField(ccw); } else if(strcmp(fieldName,"solid")==0) { vrmlFile.parseField(solid); } else if(strcmp(fieldName,"subdivideX")==0) { vrmlFile.parseField(subdivideX); } else if(strcmp(fieldName,"subdivideY")==0) { vrmlFile.parseField(subdivideY); } else GeometryNode::parseField(fieldName,vrmlFile); }
void FTTextNode::parseField(const char* fieldName, VRMLFile& vrmlFile) { std::string f(fieldName); if(f == "string") {vrmlFile.parseField(string);} else if(f == "fontStyle") {vrmlFile.parseSFNode(fontStyle);} else if(f == "length") {vrmlFile.parseField(length);} else if(f == "maxExtent") {vrmlFile.parseField(maxExtent);} else {GeometryNode::parseField(fieldName,vrmlFile);} }
void LODSphereNode::parseField(const char* fieldName,VRMLFile& vrmlFile) { std::string f = fieldName; if(f == "radius") return vrmlFile.parseField(radius); else if (f == "detail") return vrmlFile.parseField(detail); else if (f == "lodRatio") return vrmlFile.parseField(lodRatio); else GeometryNode::parseField(fieldName,vrmlFile); }
void ShapeNode::parseField(const char* fieldName,VRMLFile& vrmlFile) { if(strcmp(fieldName,"appearance")==0) { vrmlFile.parseSFNode(appearance); } else if(strcmp(fieldName,"geometry")==0) { vrmlFile.parseSFNode(geometry); } else GraphNode::parseField(fieldName,vrmlFile); }
void Doom3MD5MeshNode::parseField(const char* fieldName,VRMLFile& vrmlFile) { if(strcmp(fieldName,"dataContext")==0) { vrmlFile.parseSFNode(dataContext); } else if(strcmp(fieldName,"model")==0) { vrmlFile.parseField(model); } else GraphNode::parseField(fieldName,vrmlFile); }
void InlineNode::parseField(const char* fieldName,VRMLFile& vrmlFile) { if(strcmp(fieldName,"url")==0) { vrmlFile.parseField(url); /* Load the external VRML file: */ std::string externalFileName=vrmlFile.getFullUrl(url.getValue(0)); Misc::FileCharacterSource externalFile(externalFileName.c_str()); SceneGraph::VRMLFile externalVrmlFile(externalFileName,externalFile,vrmlFile.getNodeCreator()); externalVrmlFile.parse(this); } else GroupNode::parseField(fieldName,vrmlFile); }
void ArcInfoExportFileNode::parseField(const char* fieldName,VRMLFile& vrmlFile) { if(strcmp(fieldName,"url")==0) { vrmlFile.parseField(url); /* Fully qualify all URLs: */ for(size_t i=0;i<url.getNumValues();++i) url.setValue(i,vrmlFile.getFullUrl(url.getValue(i))); multiplexer=vrmlFile.getMultiplexer(); } else GroupNode::parseField(fieldName,vrmlFile); }
void GroupNode::parseField(const char* fieldName,VRMLFile& vrmlFile) { if(strcmp(fieldName,"children")==0) { vrmlFile.parseMFNode(children); } else if(strcmp(fieldName,"bboxCenter")==0) { vrmlFile.parseField(bboxCenter); } else if(strcmp(fieldName,"bboxSize")==0) { vrmlFile.parseField(bboxSize); } else GraphNode::parseField(fieldName,vrmlFile); }
void AppearanceNode::parseField(const char* fieldName,VRMLFile& vrmlFile) { if(strcmp(fieldName,"material")==0) { vrmlFile.parseSFNode(material); } else if(strcmp(fieldName,"texture")==0) { vrmlFile.parseSFNode(texture); } else if(strcmp(fieldName,"textureTransform")==0) { vrmlFile.parseSFNode(textureTransform); } else AttributeNode::parseField(fieldName,vrmlFile); }
void GeometryNode::parseField(const char* fieldName,VRMLFile& vrmlFile) { if(strcmp(fieldName,"pointTransform")==0) { vrmlFile.parseSFNode(pointTransform); } else Node::parseField(fieldName,vrmlFile); }
void AffinePointTransformNode::parseField(const char* fieldName,VRMLFile& vrmlFile) { if(strcmp(fieldName,"matrix")==0) { vrmlFile.parseField(matrix); } else PointTransformNode::parseField(fieldName,vrmlFile); }
void CoordinateNode::parseField(const char* fieldName,VRMLFile& vrmlFile) { if(strcmp(fieldName,"point")==0) { vrmlFile.parseField(point); } else Node::parseField(fieldName,vrmlFile); }
void Doom3DataContextNode::parseField(const char* fieldName,VRMLFile& vrmlFile) { if(strcmp(fieldName,"baseUrl")==0) { vrmlFile.parseField(baseUrl); /* Fully qualify all URLs: */ for(size_t i=0;i<baseUrl.getNumValues();++i) baseUrl.setValue(i,vrmlFile.getFullUrl(baseUrl.getValue(i))); multiplexer=vrmlFile.getMultiplexer(); } else if(strcmp(fieldName,"pakFilePrefix")==0) { vrmlFile.parseField(pakFilePrefix); } else Node::parseField(fieldName,vrmlFile); }
void MaterialNode::parseField(const char* fieldName,VRMLFile& vrmlFile) { if(strcmp(fieldName,"ambientIntensity")==0) { vrmlFile.parseField(ambientIntensity); } else if(strcmp(fieldName,"diffuseColor")==0) { vrmlFile.parseField(diffuseColor); } else if(strcmp(fieldName,"specularColor")==0) { vrmlFile.parseField(specularColor); } else if(strcmp(fieldName,"shininess")==0) { vrmlFile.parseField(shininess); } else if(strcmp(fieldName,"emissiveColor")==0) { vrmlFile.parseField(emissiveColor); } else if(strcmp(fieldName,"transparency")==0) { vrmlFile.parseField(transparency); } else AttributeNode::parseField(fieldName,vrmlFile); }
void FontStyleNode::parseField(const char* fieldName,VRMLFile& vrmlFile) { if(strcmp(fieldName,"family")==0) { vrmlFile.parseField(family); } else if(strcmp(fieldName,"style")==0) { vrmlFile.parseField(style); } else if(strcmp(fieldName,"language")==0) { vrmlFile.parseField(language); } else if(strcmp(fieldName,"size")==0) { vrmlFile.parseField(size); } else if(strcmp(fieldName,"spacing")==0) { vrmlFile.parseField(spacing); } else if(strcmp(fieldName,"justify")==0) { vrmlFile.parseField(justify); } else if(strcmp(fieldName,"horizontal")==0) { vrmlFile.parseField(horizontal); } else if(strcmp(fieldName,"leftToRight")==0) { vrmlFile.parseField(leftToRight); } else if(strcmp(fieldName,"topToBottom")==0) { vrmlFile.parseField(topToBottom); } else Node::parseField(fieldName,vrmlFile); }
NodeTransitPtr VRMLSceneFileType::read( std::istream &is, const Char8 *, Resolver ) const { NodeTransitPtr root(NULL); VRMLFile *loader = new VRMLFile(); bool pushNames = false; if(this->getOptionAs("pushNames", pushNames) == true) { if(pushNames == true) loader->addOptions(VRMLFile::PushNames); } loader->createStandardPrototypes(); root = loader->scanStream(is); delete loader; return root; }