Beispiel #1
0
 public CreateObjectCmd(PhysxPrim parent, string primName, OpenSim.Framework.PrimitiveBaseShape pbs, OpenMetaverse.Vector3 position,
     OpenMetaverse.Vector3 size, OpenMetaverse.Quaternion rotation, OpenMetaverse.Vector3 velocity, OpenMetaverse.Vector3 angularVelocity,
     float lod, PhysicsScene.AddPrimShapeFlags flags, Material material, byte[] serializedPhysicsProperties, byte[] serializedPhysicsShapes,
     ulong interpolateTime)
 {
     _parent = parent;
     _primName = primName;
     _pbs = pbs;
     _position = position;
     _size = size;
     _rotation = rotation;
     _velocity = velocity;
     _angularVelocity = angularVelocity;
     _lod = lod;
     _flags = flags;
     _material = material;
     _serializedPhysicsProperties = serializedPhysicsProperties;
     _serializedPhysicsShapes = serializedPhysicsShapes;
     _interpolateTime = interpolateTime;
 }
Beispiel #2
0
 public virtual void Combine(PhysicsScene pScene, Vector3 offset, Vector3 extents)
 {
 }
Beispiel #3
0
 public virtual void UnCombine(PhysicsScene pScene)
 {
 }
Beispiel #4
0
        public static PhysX.RigidActor CreateProperInitialActor(PhysicsShape meshedShape, PhysxScene scene, OpenMetaverse.Vector3 pos, 
            OpenMetaverse.Quaternion rotation, PhysicsScene.AddPrimShapeFlags flags, out bool kinematicStatic,
            Material material)
        {
            bool isPhysical = (flags & PhysicsScene.AddPrimShapeFlags.Physical) != 0;
            kinematicStatic = false;

            PhysX.RigidActor actor;
            if (isPhysical)
            {
                actor = PhysxActorFactory.CreateRigidDynamic(scene, meshedShape, pos, rotation, isPhysical, kinematicStatic, material);
            }
            else
            {
                if ((flags & PhysicsScene.AddPrimShapeFlags.FromSceneStartup) != 0)
                {
                    actor = PhysxActorFactory.CreateRigidStatic(scene, meshedShape, pos, rotation, material);
                }
                else
                {
                    kinematicStatic = true;
                    actor = PhysxActorFactory.CreateRigidDynamic(scene, meshedShape, pos, rotation, isPhysical, kinematicStatic, material);
                }
            }

            return actor;
        }