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