/// <summary>
            /// 剛体データのテンポラリ
            /// </summary>
            /// <param name="rigidBodyData">剛体データ</param>
            public TempRigidBodyData(RigidBodyData rigidBodyData)
            {
                position = rigidBodyData.Position;
                var r = rigidBodyData.Rotation;

                init_matrix     = Matrix.RotationYawPitchRoll(r.Y, r.X, r.Z) * Matrix.Translation(position);
                offset_matrix   = Matrix.Invert(init_matrix);
                boneIndex       = rigidBodyData.BoneIndex;
                physicsCalcType = rigidBodyData.PhysicsCalcType;
                shape           = rigidBodyData.Shape;
            }
Beispiel #2
0
        public void Create(RigidBodyCreateInfo info)
        {
            unsafe
            {
                if (_Handler != null)
                {
                    _Shape     = info.eShape;
                    _Type      = info.eType;
                    _IsCreated = true;

                    CreateRigidBody_EX(ref info, *_Handler);
                }
            }
        }
Beispiel #3
0
        public string         Path; // fo custom geometry

        public void CreateDefault()
        {
            Size             = new Vector3(1, 1, 1);
            eShape           = RigidBodyShape.Box;
            eType            = RigidBodyType.Dynamic;
            Mass             = 1.0f;
            Density          = 0.5f;
            Friction         = 0.5f;
            Restitution      = 0.0f;
            LinearDamping    = 0.0f;
            AngularDamping   = 0.0f;
            RollingFriction  = 0.1f;
            SpinningFriction = 0.1f;
        }