Exemplo n.º 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());
 }
Exemplo n.º 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);
    }
Exemplo n.º 3
0
 void SliderConstraint::SetPivotBLocation(const Vector3& Location)
     { this->Slider->getFrameOffsetB().setOrigin(Location.GetBulletVector3()); }
Exemplo n.º 4
0
 void ActorRigid::SetAngularMovementFactor(const Vector3& Factor)
     { this->PhysicsRigidBody->setAngularFactor(Factor.GetBulletVector3()); }
Exemplo n.º 5
0
 void GearConstraint::SetAxisB(const Vector3& Axis)
     { this->Gear->setAxisInB(Axis.GetBulletVector3()); }
Exemplo n.º 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);
        }
Exemplo n.º 7
0
 void WorldObject::SetScaling(const Vector3& Scale)
 {
     this->GraphicsNode->setScale(Scale.GetOgreVector3());
     this->PhysicsShape->setLocalScaling(Scale.GetBulletVector3());
 }