public x3dTextureTransform() { Center=new SFVec2f(0, 0); Rotation=0; Scale=new SFVec2f(1, 1); Translation=new SFVec2f(0, 0); }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { if(id=="center") Center=parser.ParseSFVec2fValue(); else if(id=="rotation") Rotation=parser.ParseDoubleValue(); else if(id=="scale") Scale=parser.ParseSFVec2fValue(); else if(id=="translation") Translation=parser.ParseSFVec2fValue(); else return false; return true; }
public x3dPlaneSensor() { AutoOffset=true; AxisRotation=new SFRotation(0, 0, 1, 0); Description=""; Enabled=true; MaxPosition=new SFVec2f(-1, -1); MinPosition=new SFVec2f(0, 0); Offset=new SFVec3f(0, 0, 0); }
public x3dParticleSystem() { CreateParticles=true; Enabled=true; LifetimeVariation=0.25; MaxParticles=200; ParticleLifetime=5; ParticleSize=new SFVec2f(0.02, 0.02); BBoxCenter=new SFVec3f(0, 0, 0); BBoxSize=new SFVec3f(-1, -1, -1); ColorKey=new List<double>(); GeometryType="QUAD"; Physics=new List<X3DParticlePhysicsModelNode>(); TexCoordKey=new List<double>(); }
internal SFVec2f ParseSFVec2fValue() { // float float try { SFVec2f ret=new SFVec2f(); ret.X=ParseDoubleValue(); ret.Y=ParseDoubleValue(); return ret; } catch(UserCancellationException) { throw; } catch(Exception ex) { ErrorParsingField(VRMLReaderError.SFVec2fInvalid, ex); } return null; }