コード例 #1
0
ファイル: BSPhysObject.cs プロジェクト: inknijihara/opensim
    protected BSPhysObject(BSScene parentScene, uint localID, string name, string typeName)
    {
        IsInitialized = false;

        PhysScene = parentScene;
        LocalID = localID;
        PhysObjectName = name;
        Name = name;    // PhysicsActor also has the name of the object. Someday consolidate.
        TypeName = typeName;

        // The collection of things that push me around
        PhysicalActors = new BSActorCollection(PhysScene);

        // We don't have any physical representation yet.
        PhysBody = new BulletBody(localID);
        PhysShape = new BSShapeNull();

        UserSetCenterOfMassDisplacement = null;

        PrimAssetState = PrimAssetCondition.Unknown;

        // Initialize variables kept in base.
        // Beware that these cause taints to be queued whch can cause race conditions on startup.
        GravModifier = 1.0f;
        Gravity = new OMV.Vector3(0f, 0f, BSParam.Gravity);
        HoverActive = false;

        // Default material type. Also sets Friction, Restitution and Density.
        SetMaterial((int)MaterialAttributes.Material.Wood);

        CollisionCollection = new CollisionEventUpdate();
        CollisionsLastReported = CollisionCollection;
        CollisionsLastTick = new CollisionEventUpdate();
        CollisionsLastTickStep = -1;

        SubscribedEventsMs = 0;
        // Crazy values that will never be true
        CollidingStep = BSScene.NotASimulationStep;
        CollidingGroundStep = BSScene.NotASimulationStep;
        CollisionAccumulation = BSScene.NotASimulationStep;
        ColliderIsMoving = false;
        CollisionScore = 0;

        // All axis free.
        LockedLinearAxis = LockedAxisFree;
        LockedAngularAxis = LockedAxisFree;
    }
コード例 #2
0
        protected BSPhysObject(BSScene parentScene, uint localID, string name, string typeName)
        {
            IsInitialized = false;

            PhysScene      = parentScene;
            LocalID        = localID;
            PhysObjectName = name;
            Name           = name; // PhysicsActor also has the name of the object. Someday consolidate.
            TypeName       = typeName;

            // The collection of things that push me around
            PhysicalActors = new BSActorCollection(PhysScene);

            // Initialize variables kept in base.
            GravModifier = 1.0f;
            Gravity      = new OMV.Vector3(0f, 0f, BSParam.Gravity);
            HoverActive  = false;

            // We don't have any physical representation yet.
            PhysBody  = new BulletBody(localID);
            PhysShape = new BSShapeNull();

            UserSetCenterOfMassDisplacement = null;

            PrimAssetState = PrimAssetCondition.Unknown;

            // Default material type. Also sets Friction, Restitution and Density.
            SetMaterial((int)MaterialAttributes.Material.Wood);

            CollisionCollection    = new CollisionEventUpdate();
            CollisionsLastReported = CollisionCollection;
            CollisionsLastTick     = new CollisionEventUpdate();
            CollisionsLastTickStep = -1;

            SubscribedEventsMs = 0;
            // Crazy values that will never be true
            CollidingStep         = BSScene.NotASimulationStep;
            CollidingGroundStep   = BSScene.NotASimulationStep;
            CollisionAccumulation = BSScene.NotASimulationStep;
            ColliderIsMoving      = false;
            CollisionScore        = 0;

            // All axis free.
            LockedLinearAxis  = LockedAxisFree;
            LockedAngularAxis = LockedAxisFree;
        }
コード例 #3
0
        protected BSPhysObject(BSScene parentScene, uint localID, string name, string typeName)
        {
            PhysicsScene   = parentScene;
            LocalID        = localID;
            PhysObjectName = name;
            Name           = name; // PhysicsActor also has the name of the object. Someday consolidate.
            TypeName       = typeName;

            // The collection of things that push me around
            PhysicalActors = new BSActorCollection(PhysicsScene);

            // Initialize variables kept in base.
            GravityMultiplier = 1.0f;
            Gravity           = new OMV.Vector3(0f, 0f, BSParam.Gravity);
            //HoverActive = false;

            // We don't have any physical representation yet.
            PhysBody  = new BulletBody(localID);
            PhysShape = new BulletShape();

            PrimAssetState = PrimAssetCondition.Unknown;

            // Default material type. Also sets Friction, Restitution and Density.
            SetMaterial((int)MaterialAttributes.Material.Wood);

            CollisionCollection   = new CollisionEventUpdate();
            CollisionsLastTick    = CollisionCollection;
            SubscribedEventsMs    = 0;
            CollidingStep         = 0;
            TrueCollidingStep     = 0;
            CollisionAccumulation = 0;
            ColliderIsMoving      = false;
            CollisionScore        = 0;

            // All axis free.
            LockedAxis = LockedAxisFree;
        }
コード例 #4
0
ファイル: BSPhysObject.cs プロジェクト: KSLcom/Aurora-Sim
        protected BSPhysObject(BSScene parentScene, uint localID, string name, string typeName)
        {
            PhysicsScene = parentScene;
            LocalID = localID;
            PhysObjectName = name;
            Name = name;    // PhysicsActor also has the name of the object. Someday consolidate.
            TypeName = typeName;

            // The collection of things that push me around
            PhysicalActors = new BSActorCollection(PhysicsScene);

            // Initialize variables kept in base.
            GravityMultiplier = 1.0f;
            Gravity = new OMV.Vector3(0f, 0f, BSParam.Gravity);
            //HoverActive = false;

            // We don't have any physical representation yet.
            PhysBody = new BulletBody(localID);
            PhysShape = new BulletShape();

            PrimAssetState = PrimAssetCondition.Unknown;

            // Default material type. Also sets Friction, Restitution and Density.
            SetMaterial((int)MaterialAttributes.Material.Wood);

            CollisionCollection = new CollisionEventUpdate();
            CollisionsLastTick = CollisionCollection;
            SubscribedEventsMs = 0;
            CollidingStep = 0;
            TrueCollidingStep = 0;
            CollisionAccumulation = 0;
            ColliderIsMoving = false;
            CollisionScore = 0;

            // All axis free.
            LockedAxis = LockedAxisFree;
        }