/// <summary>
        /// Creates a physics object with a container that uses the physical properties specified
        /// in this class. The 'container' is usually an instance of GeometryNode.
        /// </summary>
        /// <param name="container">The container of this physics object.</param>
        public PhysicsObject(Object container)
        {
            this.container   = container;
            collisionGroupID = 0;
            materialName     = "";
            mass             = 1.0f;
            shape            = ShapeType.Box;
            shapeData        = new List <float>();
            momentOfInertia  = new Vector3();
            centerOfMass     = new Vector3();
            pickable         = false;
            collidable       = false;
            interactable     = false;
            manipulatable    = false;
            applyGravity     = true;
            neverDeactivate  = false;
            modified         = false;
            shapeModified    = false;

            physicsWorldTransform         = Matrix.Identity;
            initialWorldTransform         = Matrix.Identity;
            compoundInitialWorldTransform = Matrix.Identity;

            initialLinearVelocity  = new Vector3();
            initialAngularVelocity = new Vector3();

            linearDamping  = 0.0f;
            angularDamping = -Vector3.One;

            model        = null;
            meshProvider = null;
        }
Exemple #2
0
        /// <summary>
        /// Creates a physics object with a container that uses the physical properties specified
        /// in this class. The 'container' is usually an instance of GeometryNode.
        /// </summary>
        /// <param name="container">The container of this physics object.</param>
        public PhysicsObject(Object container)
        {
            this.container = container;
            collisionGroupID = 0;
            materialName = "";
            mass = 1.0f;
            shape = ShapeType.Box;
            shapeData = new List<float>();
            momentOfInertia = new Vector3();
            centerOfMass = new Vector3();
            pickable = false;
            collidable = false;
            interactable = false;
            manipulatable = false;
            applyGravity = true;
            neverDeactivate = false;
            modified = false;
            shapeModified = false;

            physicsWorldTransform = Matrix.Identity;
            initialWorldTransform = Matrix.Identity;
            compoundInitialWorldTransform = Matrix.Identity;

            initialLinearVelocity = new Vector3();
            initialAngularVelocity = new Vector3();

            linearDamping = 0.0f;
            angularDamping = -Vector3.One;

            model = null;
            meshProvider = null;
        }