Example #1
0
 void WorldObject::SetLocation(const Vector3& Location)
 {
     //Bullet
     this->PhysicsObject->getWorldTransform().setOrigin(Location.GetBulletVector3());
     this->PhysicsObject->getInterpolationWorldTransform().setOrigin(Location.GetBulletVector3());
     //Ogre
     this->GraphicsNode->setPosition(Location.GetOgreVector3());
 }
Example #2
0
    void AreaEffect::CreateGhostObject(const Vector3& Location)
    {
        Ghost = new btPairCachingGhostObject();
        Ghost->setCollisionFlags(Ghost->getCollisionFlags() | btCollisionObject::CF_NO_CONTACT_RESPONSE);
        Ghost->getWorldTransform().setOrigin(Location.GetBulletVector3());
        Ghost->setUserPointer( (WorldObject*)this );

        PhysicsObject = Ghost;
        this->GraphicsSettings = new WorldObjectGraphicsSettings(this,GraphicsObject);
        this->PhysicsSettings = new WorldObjectPhysicsSettings(this,PhysicsObject);
    }
Example #3
0
 void SliderConstraint::SetPivotBLocation(const Vector3& Location)
     { this->Slider->getFrameOffsetB().setOrigin(Location.GetBulletVector3()); }
Example #4
0
 void ActorRigid::SetAngularMovementFactor(const Vector3& Factor)
     { this->PhysicsRigidBody->setAngularFactor(Factor.GetBulletVector3()); }
Example #5
0
 void GearConstraint::SetAxisB(const Vector3& Axis)
     { this->Gear->setAxisInB(Axis.GetBulletVector3()); }
Example #6
0
        GearConstraint::GearConstraint(ActorRigid* ActorA, ActorRigid* ActorB, const Vector3& AxisA, const Vector3& AxisB, const Real Ratio)
        {
            this->SetBodies(ActorA,ActorB);

            this->Gear = new btGearConstraint(*BodyA, *BodyB, AxisA.GetBulletVector3(), AxisB.GetBulletVector3(), Ratio);
        }
Example #7
0
 void WorldObject::SetScaling(const Vector3& Scale)
 {
     this->GraphicsNode->setScale(Scale.GetOgreVector3());
     this->PhysicsShape->setLocalScaling(Scale.GetBulletVector3());
 }