Example #1
0
 public x3dCollision()
 {
     Children   = new List <X3DChildNode>();
     Collide    = true;
     BBoxCenter = new SFVec3f(0, 0, 0);
     BBoxSize   = new SFVec3f(-1, -1, -1);
 }
Example #2
0
 public x3dNurbsSet()
 {
     Geometry          = new List <X3DNurbsSurfaceGeometryNode>();
     TessellationScale = 0;
     BBoxCenter        = new SFVec3f(0, 0, 0);
     BBoxSize          = new SFVec3f(-1, -1, -1);
 }
Example #3
0
 internal override bool ParseNodeBodyElement(string id, VRMLParser parser)
 {
     if (id == "collidables")
     {
         Collidables.AddRange(parser.ParseSFNodeOrMFNodeValue());
     }
     else if (id == "enabled")
     {
         Enabled = parser.ParseBoolValue();
     }
     else if (id == "useGeometry")
     {
         UseGeometry = parser.ParseBoolValue();
     }
     else if (id == "bboxCenter")
     {
         BBoxCenter = parser.ParseSFVec3fValue();
     }
     else if (id == "bboxSize")
     {
         BBoxSize = parser.ParseSFVec3fValue();
     }
     else
     {
         return(false);
     }
     return(true);
 }
Example #4
0
 public x3dTextureTransform3D()
 {
     Center      = new SFVec3f(0, 0, 0);
     Rotation    = new SFRotation(0, 0, 1, 0);
     Scale       = new SFVec3f(1, 1, 1);
     Translation = new SFVec3f(0, 0, 0);
 }
Example #5
0
 public x3dCADAssembly()
 {
     Children   = new List <X3DChildNode>();
     Name       = "";
     BBoxCenter = new SFVec3f(0, 0, 0);
     BBoxSize   = new SFVec3f(-1, -1, -1);
 }
 public x3dRigidBody()
 {
     AngularDampingFactor = 0.001;
     AngularVelocity      = new SFVec3f(0, 0, 0);
     AutoDamp             = false;
     AutoDisable          = false;
     CenterOfMass         = new SFVec3f(0, 0, 0);
     DisableAngularSpeed  = 0;
     DisableLinearSpeed   = 0;
     DisableTime          = 0;
     Enabled            = true;
     FiniteRotationAxis = new SFVec3f(0, 0, 0);
     Fixed               = false;
     Forces              = new List <SFVec3f>();
     Geometry            = new List <X3DNBodyCollidableNode>();
     Inertia             = new SFMatrix3f(new List <double>(new double[] { 1, 0, 0, 0, 1, 0, 0, 0, 1 }));
     LinearDampingFactor = 0.001;
     LinearVelocity      = new SFVec3f(0, 0, 0);
     Mass              = 1;
     Orientation       = new SFRotation(0, 0, 1, 0);
     Position          = new SFVec3f(0, 0, 0);
     Torques           = new List <SFVec3f>();
     UseFiniteRotation = false;
     UseGlobalGravity  = true;
 }
Example #7
0
 public x3dReceiverPdu()
 {
     Address            = "localhost";
     ApplicationID      = 1;
     Enabled            = true;
     EntityID           = 0;
     MulticastRelayHost = "";
     MulticastRelayPort = 0;
     NetworkMode        = "standAlone";
     Port                     = 0;
     RadioID                  = 0;
     ReadInterval             = 0.1;
     ReceivedPower            = 0.0;
     ReceiverState            = 0;
     RtpHeaderExpected        = false;
     SiteID                   = 0;
     TransmitterApplicationID = 1;
     TransmitterEntityID      = 0;
     TransmitterRadioID       = 0;
     TransmitterSiteID        = 0;
     WhichGeometry            = 1;
     WriteInterval            = 1.0;
     BBoxCenter               = new SFVec3f(0, 0, 0);
     BBoxSize                 = new SFVec3f(-1, -1, -1);
 }
Example #8
0
        public void StringCompatibility()
        {
            const string s = "0.456789 0.654321 0.000001";
            var          a = new SFVec3f(0.456789f, 0.654321f, 0.000001f);

            Assert.AreEqual(s, a.ToString());
        }
Example #9
0
        public void HashCode()
        {
            var a = new SFVec3f();
            var b = new SFVec3f();

            Assert.AreEqual(a.GetHashCode(), b.GetHashCode());
        }
Example #10
0
 public x3dInline()
 {
     Load       = true;
     URL        = new List <string>();
     BBoxCenter = new SFVec3f(0, 0, 0);
     BBoxSize   = new SFVec3f(-1, -1, -1);
 }
        internal override bool ParseNodeBodyElement(string id, VRMLParser parser)
        {
            int line = parser.Line;

            if (id == "name")
            {
                Name = parser.ParseStringValue();
            }
            else if (id == "shape")
            {
                X3DNode node = parser.ParseSFNodeValue();
                if (node != null)
                {
                    Shape = node as IX3DCADFaceShape;
                    if (Shape == null)
                    {
                        parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line);
                    }
                }
            }
            else if (id == "bboxCenter")
            {
                BBoxCenter = parser.ParseSFVec3fValue();
            }
            else if (id == "bboxSize")
            {
                BBoxSize = parser.ParseSFVec3fValue();
            }
            else
            {
                return(false);
            }
            return(true);
        }
Example #12
0
 public x3dSignalPdu()
 {
     Address            = "localhost";
     ApplicationID      = 1;
     Data               = new List <int>();
     DataLength         = 0;
     Enabled            = true;
     EncodingScheme     = 0;
     EntityID           = 0;
     MulticastRelayHost = "";
     MulticastRelayPort = 0;
     NetworkMode        = "standAlone";
     Port               = 0;
     RadioID            = 0;
     ReadInterval       = 0.1;
     RtpHeaderExpected  = false;
     SampleRate         = 0;
     Samples            = 0;
     SiteID             = 0;
     TdlType            = 0;
     WhichGeometry      = 1;
     WriteInterval      = 1.0;
     BBoxCenter         = new SFVec3f(0, 0, 0);
     BBoxSize           = new SFVec3f(-1, -1, -1);
 }
 public x3dSwitch()
 {
     Children    = new List <X3DChildNode>();
     WhichChoice = -1;
     BBoxCenter  = new SFVec3f(0, 0, 0);
     BBoxSize    = new SFVec3f(-1, -1, -1);
 }
Example #14
0
 public x3dBillboard()
 {
     AxisOfRotation = new SFVec3f(0, 1, 0);
     Children       = new List <X3DChildNode>();
     BBoxCenter     = new SFVec3f(0, 0, 0);
     BBoxSize       = new SFVec3f(-1, -1, -1);
 }
        internal override bool ParseNodeBodyElement(string id, VRMLParser parser)
        {
            int line = parser.Line;

            if (id == "children")
            {
                List <X3DNode> nodes = parser.ParseSFNodeOrMFNodeValue();
                foreach (X3DNode node in nodes)
                {
                    X3DChildNode child = node as X3DChildNode;
                    if (child == null)
                    {
                        parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line);
                    }
                    else
                    {
                        Children.Add(child);
                    }
                }
            }
            else if (id == "bboxCenter")
            {
                BBoxCenter = parser.ParseSFVec3fValue();
            }
            else if (id == "bboxSize")
            {
                BBoxSize = parser.ParseSFVec3fValue();
            }
            else
            {
                return(false);
            }
            return(true);
        }
Example #16
0
 public x3dExplosionEmitter()
 {
     Position    = new SFVec3f(0, 0, 0);
     Speed       = 0;
     Variation   = 0.25;
     Mass        = 0;
     SurfaceArea = 0;
 }
 public x3dGeoOrigin()
 {
     GeoCoords = new SFVec3f(0, 0, 0);
     GeoSystem = new List <string>();
     GeoSystem.Add("GD");
     GeoSystem.Add("WE");
     RotateYUp = false;
 }
Example #18
0
 public x3dCollisionSpace()
 {
     Collidables = new List <X3DNode>();
     Enabled     = true;
     UseGeometry = false;
     BBoxCenter  = new SFVec3f(0, 0, 0);
     BBoxSize    = new SFVec3f(-1, -1, -1);
 }
 public x3dWindPhysicsModel()
 {
     Direction  = new SFVec3f(0, 0, 0);
     Enabled    = true;
     Gustiness  = 0.1;
     Speed      = 0.1;
     Turbulence = 0;
 }
Example #20
0
 public x3dCADLayer()
 {
     Children   = new List <X3DChildNode>();
     Name       = "";
     Visible    = new List <bool>();
     BBoxCenter = new SFVec3f(0, 0, 0);
     BBoxSize   = new SFVec3f(-1, -1, -1);
 }
 public x3dCollidableOffset()
 {
     Enabled     = true;
     Rotation    = new SFRotation(0, 0, 1, 0);
     Translation = new SFVec3f(0, 0, 0);
     BBoxCenter  = new SFVec3f(0, 0, 0);
     BBoxSize    = new SFVec3f(-1, -1, -1);
 }
 public x3dPointEmitter()
 {
     Direction   = new SFVec3f(0, 1, 0);
     Position    = new SFVec3f(0, 0, 0);
     Speed       = 0;
     Variation   = 0.25;
     Mass        = 0;
     SurfaceArea = 0;
 }
Example #23
0
 public x3dAnchor()
 {
     Children    = new List <X3DChildNode>();
     Description = "";
     Parameter   = new List <string>();
     URL         = new List <string>();
     BBoxCenter  = new SFVec3f(0, 0, 0);
     BBoxSize    = new SFVec3f(-1, -1, -1);
 }
 public x3dDirectionalLight()
 {
     AmbientIntensity = 0;
     Color            = new SFColor(1, 1, 1);
     Direction        = new SFVec3f(0, 0, -1);
     Global           = false;
     Intensity        = 1;
     On = true;
 }
Example #25
0
 public x3dGeoProximitySensor()
 {
     Enabled   = true;
     GeoCenter = new SFVec3f(0, 0, 0);
     Size      = new SFVec3f(0, 0, 0);
     GeoSystem = new List <string>();
     GeoSystem.Add("GD");
     GeoSystem.Add("WE");
 }
Example #26
0
 public void visit(MFVec3f field)
 {
     field.clearValues();
     ParseMField((subcontext) => {
         var child = new SFVec3f();
         this.visit(child);
         field.AppendValue(child);
     });
 }
Example #27
0
 public x3dViewpointGroup()
 {
     Center            = new SFVec3f(0, 0, 0);
     Children          = new List <IX3DViewpointgroupChildren>();
     Description       = "";
     Displayed         = true;
     RetainUserOffsets = false;
     Size = new SFVec3f(0, 0, 0);
 }
 public x3dPickableGroup()
 {
     Children   = new List <X3DChildNode>();
     ObjectType = new List <string>();
     ObjectType.Add("ALL");
     Pickable   = true;
     BBoxCenter = new SFVec3f(0, 0, 0);
     BBoxSize   = new SFVec3f(-1, -1, -1);
 }
 public x3dLOD()
 {
     Children         = new List <X3DChildNode>();
     BBoxCenter       = new SFVec3f(0, 0, 0);
     BBoxSize         = new SFVec3f(-1, -1, -1);
     Center           = new SFVec3f(0, 0, 0);
     ForceTransitions = false;
     Range            = new List <double>();
 }
 public x3dGeoLocation()
 {
     Children  = new List <X3DChildNode>();
     GeoCoords = new SFVec3f(0, 0, 0);
     GeoSystem = new List <string>();
     GeoSystem.Add("GD");
     GeoSystem.Add("WE");
     BBoxCenter = new SFVec3f(0, 0, 0);
     BBoxSize   = new SFVec3f(-1, -1, -1);
 }
Example #31
0
 private Vector3D TestConvVector(SFVec3f vector)
 {
     return new Vector3D(vector.x, vector.y, vector.z);
 }