#include <actor.hpp>
MWPhysics::Actor::~Actor |
( |
| ) |
|
MWPhysics::Actor::Actor |
( |
const Actor & |
| ) |
|
|
private |
void MWPhysics::Actor::addCollisionMask |
( |
int |
collisionMask | ) |
|
|
private |
void MWPhysics::Actor::enableCollisionBody |
( |
bool |
collision | ) |
|
Enables or disables the external collision body. If disabled, other actors will not collide with this actor.
void MWPhysics::Actor::enableCollisionMode |
( |
bool |
collision | ) |
|
Sets the collisionMode for this actor. If disabled, the actor can fly and clip geometry.
int MWPhysics::Actor::getCollisionMask |
( |
| ) |
|
|
private |
bool MWPhysics::Actor::getCollisionMode |
( |
| ) |
const |
|
inline |
btCollisionObject* MWPhysics::Actor::getCollisionObject |
( |
| ) |
const |
|
inline |
osg::Vec3f MWPhysics::Actor::getCollisionObjectPosition |
( |
| ) |
const |
Returns the position of the collision body
- Note
- The collision shape's origin is in its center, so the position returned can be described as center of the actor collision box in world space.
osg::Vec3f MWPhysics::Actor::getHalfExtents |
( |
| ) |
const |
Returns the half extents of the collision body (scaled according to collision scale)
const osg::Vec3f& MWPhysics::Actor::getInertialForce |
( |
| ) |
const |
|
inline |
Gets the current amount of inertial force (incl. gravity) affecting this physic actor
bool MWPhysics::Actor::getOnGround |
( |
| ) |
const |
|
inline |
osg::Vec3f MWPhysics::Actor::getPosition |
( |
| ) |
const |
osg::Vec3f MWPhysics::Actor::getPreviousPosition |
( |
| ) |
const |
osg::Vec3f MWPhysics::Actor::getRenderingHalfExtents |
( |
| ) |
const |
Returns the half extents of the collision body (scaled according to rendering scale)
- Note
- The reason we need this extra method is because of an inconsistency in MW - NPC race scales aren't applied to the collision shape, most likely to make environment collision testing easier. However in some cases (swimming level) we want the actual scale.
bool MWPhysics::Actor::isWalkingOnWater |
( |
| ) |
const |
Actor& MWPhysics::Actor::operator= |
( |
const Actor & |
| ) |
|
|
private |
void MWPhysics::Actor::setCanWaterWalk |
( |
bool |
waterWalk | ) |
|
Sets whether this actor should be able to collide with the water surface.
void MWPhysics::Actor::setInertialForce |
( |
const osg::Vec3f & |
force | ) |
|
Sets the current amount of inertial force (incl. gravity) affecting this physic actor
void MWPhysics::Actor::setOnGround |
( |
bool |
grounded | ) |
|
void MWPhysics::Actor::setPosition |
( |
const osg::Vec3f & |
position | ) |
|
Store the current position into mPreviousPosition, then move to this position.
void MWPhysics::Actor::setWalkingOnWater |
( |
bool |
walkingOnWater | ) |
|
Sets whether this actor has been walking on the water surface in the last frame.
void MWPhysics::Actor::updateCollisionMask |
( |
| ) |
|
|
private |
Removes then re-adds the collision object to the dynamics world.
void MWPhysics::Actor::updateCollisionObjectPosition |
( |
| ) |
|
void MWPhysics::Actor::updatePosition |
( |
| ) |
|
Set mPosition and mPreviousPosition to the position in the Ptr's RefData. This should be used when an object is "instantly" moved/teleported as opposed to being moved by the physics simulation.
void MWPhysics::Actor::updateRotation |
( |
| ) |
|
void MWPhysics::Actor::updateScale |
( |
| ) |
|
bool MWPhysics::Actor::mCanWaterWalk |
|
private |
std::auto_ptr<btCollisionObject> MWPhysics::Actor::mCollisionObject |
|
private |
btCollisionWorld* MWPhysics::Actor::mCollisionWorld |
|
private |
bool MWPhysics::Actor::mExternalCollisionMode |
|
private |
osg::Vec3f MWPhysics::Actor::mForce |
|
private |
osg::Vec3f MWPhysics::Actor::mHalfExtents |
|
private |
bool MWPhysics::Actor::mInternalCollisionMode |
|
private |
osg::Vec3f MWPhysics::Actor::mMeshTranslation |
|
private |
bool MWPhysics::Actor::mOnGround |
|
private |
osg::Vec3f MWPhysics::Actor::mPosition |
|
private |
osg::Vec3f MWPhysics::Actor::mPreviousPosition |
|
private |
osg::Vec3f MWPhysics::Actor::mRenderingScale |
|
private |
osg::Quat MWPhysics::Actor::mRotation |
|
private |
osg::Vec3f MWPhysics::Actor::mScale |
|
private |
std::auto_ptr<btCollisionShape> MWPhysics::Actor::mShape |
|
private |
bool MWPhysics::Actor::mWalkingOnWater |
|
private |
The documentation for this class was generated from the following files:
- /home/travis/build/OpenMW/openmw/apps/openmw/mwphysics/actor.hpp
- /home/travis/build/OpenMW/openmw/apps/openmw/mwphysics/actor.cpp