public override string GetStepParameters() { var parameters = new List <string>(); parameters.Add(CoordIndex != null ? CoordIndex.ToStepValue() : "$"); return(string.Join(", ", parameters.ToArray())); }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { int line = parser.Line; if (id == "coord") { X3DNode node = parser.ParseSFNodeValue(); if (node != null) { Coord = node as X3DCoordinateNode; if (Coord == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } } else if (id == "direction") { Direction = parser.ParseSFVec3fValue(); } else if (id == "speed") { Speed = parser.ParseDoubleValue(); } else if (id == "variation") { Variation = parser.ParseDoubleValue(); } else if (id == "coordIndex") { if (wasCoordIndex) { CoordIndex.AddRange(parser.ParseSFInt32OrMFInt32Value()); } else { CoordIndex = parser.ParseSFInt32OrMFInt32Value(); } wasCoordIndex = true; } else if (id == "internal") { Internal = parser.ParseBoolValue(); } else if (id == "mass") { Mass = parser.ParseDoubleValue(); } else if (id == "surfaceArea") { SurfaceArea = parser.ParseDoubleValue(); } else { return(false); } return(true); }
public override string GetStepParameters() { var parameters = new List <string>(); parameters.Add(Coordinates != null ? Coordinates.ToStepValue() : "$"); parameters.Add(Normals != null ? Normals.ToStepValue() : "$"); parameters.Add(Closed != null ? Closed.ToStepValue() : "$"); parameters.Add(CoordIndex != null ? CoordIndex.ToStepValue() : "$"); parameters.Add(PnIndex != null ? PnIndex.ToStepValue() : "$"); return(string.Join(", ", parameters.ToArray())); }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { if (id == "coordIndex") { CoordIndex.AddRange(parser.ParseSFInt32OrMFInt32Value()); } else if (id == "displacements") { Displacements.AddRange(parser.ParseSFVec3fOrMFVec3fValue()); } else if (id == "name") { Name = parser.ParseStringValue(); } else if (id == "weight") { Weight = parser.ParseDoubleValue(); } else { return(false); } return(true); }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { int line=parser.Line; if(id=="attrib") { List<X3DNode> nodes=parser.ParseSFNodeOrMFNodeValue(); foreach(X3DNode node in nodes) { X3DVertexAttributeNode attr=node as X3DVertexAttributeNode; if(attr==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); else Attrib.Add(attr); } } else if(id=="color") { X3DNode node=parser.ParseSFNodeValue(); if(node!=null) { Color=node as X3DColorNode; if(Color==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } else if(id=="coord") { X3DNode node=parser.ParseSFNodeValue(); if(node!=null) { Coord=node as X3DCoordinateNode; if(Coord==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } else if(id=="fogCoord") { X3DNode node=parser.ParseSFNodeValue(); if(node!=null) { FogCoord=node as IX3DFogCoordinateNode; if(FogCoord==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } else if(id=="normal") { X3DNode node=parser.ParseSFNodeValue(); if(node!=null) { Normal=node as X3DNormalNode; if(Normal==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } else if(id=="texCoord") { X3DNode node=parser.ParseSFNodeValue(); if(node!=null) { TexCoord=node as X3DTextureCoordinateNode; if(TexCoord==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } else if(id=="ccw") CCW=parser.ParseBoolValue(); else if(id=="colorIndex") ColorIndex.AddRange(parser.ParseSFInt32OrMFInt32Value()); else if(id=="colorPerVertex") ColorPerVertex=parser.ParseBoolValue(); else if(id=="convex") Convex=parser.ParseBoolValue(); else if(id=="coordIndex") CoordIndex.AddRange(parser.ParseSFInt32OrMFInt32Value()); else if(id=="creaseAngle") CreaseAngle=parser.ParseDoubleValue(); else if(id=="normalIndex") NormalIndex.AddRange(parser.ParseSFInt32OrMFInt32Value()); else if(id=="normalPerVertex") NormalPerVertex=parser.ParseBoolValue(); else if(id=="solid") Solid=parser.ParseBoolValue(); else if(id=="texCoordIndex") TexCoordIndex.AddRange(parser.ParseSFInt32OrMFInt32Value()); else return false; return true; }