ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

Actor represents a 3D character on screen. More...

#include <actor.h>

Inheritance diagram for Grim::Actor:
Collaboration diagram for Grim::Actor:

List of all members.

Classes

class  ActionChore
struct  PathNode

Public Types

enum  CollisionMode { CollisionOff = 0, CollisionBox = 1, CollisionSphere = 2 }
enum  AlphaMode { AlphaOff = -1, AlphaReplace = 2, AlphaModulate = 3 }
enum  LightMode { LightStatic = 0, LightFastDyn = 1, LightNormDyn = 2, LightNone = 3 }

Public Member Functions

 Actor ()
 Builds an actor setting up only the minimal variables.
 ~Actor ()
 Destroys the actor.
void saveState (SaveGame *savedState) const
 Saves the actor state.
bool restoreState (SaveGame *savedState)
 Restores the actor state.
const Common::StringgetName () const
 Returns the name of the actor.
void setName (const Common::String &name)
 Sets the name of the actor.
void setTalkColor (const Color &color)
 Sets the color of the subtitles of the actor.
Color getTalkColor () const
 Returns the color of the subtitles of the actor.
void setPos (const Math::Vector3d &position)
 Sets the position of the actor on the 3D scene.
Math::Vector3d getPos () const
 Returns the position of the actor on the 3D scene.
Math::Vector3d getDestPos () const
void walkTo (const Math::Vector3d &position)
 Tells the actor to go to the wanted position.
void stopWalking ()
 Stops immediately the actor's walk.
bool isWalking () const
 Returns true if the actor is walking to a position.
void turnTo (const Math::Angle &pitch, const Math::Angle &yaw, const Math::Angle &roll, bool snap=false)
 Sets the rotation of thes actor in the 3D scene.
void turnTo (const Math::Vector3d &pos, bool snap=false)
 Turn the actor towards a point in space.
bool singleTurnTo (const Math::Vector3d &pos)
 Turn the actor towards a point in space, by an amount defined by the turn rate.
bool isTurning () const
 Returns true if the actor is turning.
void stopTurning ()
 Stops the actor from turning.
void setRot (const Math::Angle &pitch, const Math::Angle &yaw, const Math::Angle &roll)
 Sets the rotation of the actor in the 3D scene.
void setRot (const Math::Vector3d &pos)
 Turn the actor towards a point in space.
void turn (int dir)
 Turns the actor by the given parameter on the z axis.
Math::Angle getPitch () const
 Returns the pitch of the actor, which is the rotation on the x axis.
Math::Angle getYaw () const
 Returns the yaw of the actor, which is the rotation on the z axis.
Math::Angle getRoll () const
 Returns the roll of the actor, which is the rotation on the y axis.
Math::Angle getYawTo (const Actor *actor) const
 Calculates and returns the angle between the direction the actor is facing and the direction towards another actor.
Math::Angle getYawTo (const Math::Vector3d &p) const
 Calculates and returns the angle between the direction the actor is facing and the direction towards a point.
void setVisibility (bool val)
 Sets the actor visibility.
bool isVisible () const
 Returns true if the actor is visible.
void setScale (float scale)
 Sets the scale of the actor.
float getScale () const
void setTimeScale (float scale)
 Sets the time scale of the actor, used to calculate the speed of its animations.
float getTimeScale () const
 Returns the time scale of the actor.
void putInSet (const Common::String &setName)
 Puts the actor in a set.
bool isDrawableInSet (const Common::String &setName) const
 Returns true if the actor is in the given set.
bool isInSet (const Common::String &setName) const
 Returns true if the actor is in the given set.
void setTurnRate (float rate)
 Sets the rate of the turning.
float getTurnRate () const
 Returns the turn rate.
void setWalkRate (float rate)
 Sets the rate of the walk movement.
float getWalkRate () const
 Returns the walk rate of the actor.
void setLooking (bool lookingMode)
void walkForward ()
 Makes the actor move forward, the lenght of the movement based on the walk rate.
void moveTo (const Math::Vector3d &pos)
void setRunning (bool running)
 Used to tell the actor if it is running or not.
void setReflection (float angle)
Math::Vector3d getPuckVector () const
 Returns a vector representing the direction the actor is facing.
void setPuckOrient (bool orient)
void sayLine (const char *msgId, bool background, float x, float y)
 Makes the actor say the given line.
void lineCleanup ()
void shutUp ()
 Makes the actor discard any subtitle and voice.
bool isTalking ()
 Returns true if the actor is saying something.
void setRestChore (int choreNumber, Costume *cost)
int getRestChore () const
void setWalkChore (int choreNumber, Costume *cost)
void setTurnChores (int left_chore, int right_chore, Costume *cost)
void setTalkChore (int index, int choreNumber, Costume *cost)
int getTalkChore (int index) const
CostumegetTalkCostume (int index) const
void setMumbleChore (int choreNumber, Costume *cost)
void stopAllChores (bool ignoreLoopingChores=false)
void setColormap (const char *map)
void pushCostume (const char *name)
void setCostume (const char *name)
void popCostume ()
void clearCostumes ()
CostumegetCurrentCostume () const
void setLocalAlphaMode (unsigned int vertex, AlphaMode alphamode)
void setLocalAlpha (unsigned int vertex, float alpha)
bool hasLocalAlpha () const
float getLocalAlpha (unsigned int vertex) const
CostumefindCostume (const Common::String &name)
int getCostumeStackDepth () const
const Common::List< Costume * > & getCostumes () const
void setActiveShadow (int shadowId)
void setShadowPoint (const Math::Vector3d &pos)
void setShadowColor (const Color &color)
void setShadowPlane (const char *name)
void addShadowPlane (const char *name)
void clearShadowPlanes ()
void clearShadowPlane (int i)
void setShadowValid (int)
void setActivateShadow (int, bool)
void setFollowBoxes (bool follow)
bool hasFollowedBoxes () const
void update (uint frameTime)
bool updateTalk (uint frameTime)
 Check if the actor is still talking.
void draw ()
bool isLookAtVectorZero ()
void setLookAtVectorZero ()
void setLookAtVector (const Math::Vector3d &vector)
Math::Vector3d getLookAtVector ()
void setLookAtActor (Actor *other)
void setLookAtRate (float rate)
float getLookAtRate () const
void setHead (int joint1, int joint2, int joint3, float maxRoll, float maxPitch, float maxYaw)
void setHead (const char *joint, const Math::Vector3d &offset)
void setHeadLimits (float yawRange, float maxPitch, float minPitch)
void setCollisionMode (CollisionMode mode)
void setCollisionScale (float scale)
bool handleCollisionWith (Actor *actor, CollisionMode mode, Math::Vector3d *vec) const
bool isAttached () const
Math::Vector3d getWorldPos () const
void attachToActor (Actor *other, const char *joint)
void detach ()
Math::Quaternion getRotationQuat () const
const Math::Matrix4 getFinalMatrix () const
Math::Vector3d getHeadPos () const
void setInOverworld (bool inOverworld)
bool isInOverworld () const
float getGlobalAlpha () const
AlphaMode getAlphaMode () const
float getEffectiveAlpha () const
void setGlobalAlpha (float alpha, const Common::String &mesh)
void setAlphaMode (AlphaMode mode, const Common::String &mesh)
int getSortOrder () const
void setSortOrder (const int order)
int getEffectiveSortOrder () const
void activateShadow (bool active, const char *shadowName)
void activateShadow (bool active, SetShadow *shadow)
void drawToCleanBuffer ()
bool isTalkingForeground () const
LightMode getLightMode () const
void setLightMode (LightMode lightMode)
ObjectPtr< MaterialloadMaterial (const Common::String &name, bool clamp)
ObjectPtr< MaterialfindMaterial (const Common::String &name)
void getBBoxInfo (Math::Vector3d &bboxPos, Math::Vector3d &bboxSize) const

Static Public Member Functions

static int32 getStaticTag ()
static void saveStaticState (SaveGame *state)
static void restoreStaticState (SaveGame *state)

Private Member Functions

void costumeMarkerCallback (int marker)
void collisionHandlerCallback (Actor *other) const
void updateWalk ()
void addShadowPlane (const char *n, Set *scene, int shadowId)
bool shouldDrawShadow (int shadowId)
void stopTalking ()
bool stopMumbleChore ()
void drawCostume (Costume *costume)
Math::Vector3d handleCollisionTo (const Math::Vector3d &from, const Math::Vector3d &pos) const
 Given a start point and a destination this function returns a position that doesn't collide with any actor.
Math::Vector3d getTangentPos (const Math::Vector3d &pos, const Math::Vector3d &dest) const
 Check if the line from pos to dest collides with this actor's bounding box, and if yes return a point that, together with pos, defines a line tangent with the bounding box.
Math::Vector3d getSimplePuckVector () const
void calculateOrientation (const Math::Vector3d &pos, Math::Angle *pitch, Math::Angle *yaw, Math::Angle *roll)
bool getSphereInfo (bool adjustZ, float &size, Math::Vector3d &pos) const
EMIModelfindModelWithMesh (const Common::String &mesh)
ActionChoregetTurnChore (int dir)
void freeCostume (Costume *costume)
void freeCostumeChore (const Costume *toFree, ActionChore *chore)

Private Attributes

Common::String _name
Common::String _setName
Color _talkColor
Math::Vector3d _pos
Math::Angle _pitch
Math::Angle _yaw
Math::Angle _roll
float _walkRate
float _turnRate
bool _followBoxes
bool _hasFollowedBoxes
float _reflectionAngle
bool _visible
float _scale
float _timeScale
bool _lookingMode
Common::String _talkSoundName
bool _talking
bool _backgroundTalk
ObjectPtr< LipSync_lipSync
Common::List< Costume * > _costumeStack
bool _turning
bool _singleTurning
Math::Angle _moveYaw
Math::Angle _movePitch
Math::Angle _moveRoll
float _turnRateMultiplier
bool _walking
Math::Vector3d _destPos
ActionChore _restChore
ActionChore _walkChore
bool _walkedLast
bool _walkedCur
bool _running
ActionChore _leftTurnChore
ActionChore _rightTurnChore
int _lastTurnDir
int _currTurnDir
ActionChore _talkChore [10]
int _talkAnim
ActionChore _mumbleChore
Shadow_shadowArray
int _activeShadowSlot
int _sayLineText
bool _mustPlaceText
Math::Vector3d _lookAtVector
Common::List< Math::Vector3d_path
CollisionMode _collisionMode
float _collisionScale
bool _puckOrient
int _talkDelay
int _attachedActor
int _lookAtActor
Common::String _attachedJoint
AlphaMode _alphaMode
float _globalAlpha
bool _inOverworld
int _sortOrder
int _sectorSortOrder
bool _useParentSortOrder
bool _fakeUnbound
bool _drawnToClean
LightMode _lightMode
Common::List< ObjectPtr
< Material > > 
_materials
Common::Array< float > _localAlpha
Common::Array< int > _localAlphaMode

Static Private Attributes

static ObjectPtr< Font_sayLineFont
static bool _isTalkingBackground = false
static const unsigned int MAX_LOCAL_ALPHA_VERTICES = 48

Detailed Description

Actor represents a 3D character on screen.

Definition at line 74 of file grim/actor.h.


Member Enumeration Documentation

Enumerator:
AlphaOff 
AlphaReplace 
AlphaModulate 

Definition at line 82 of file grim/actor.h.

Enumerator:
CollisionOff 
CollisionBox 
CollisionSphere 

Definition at line 76 of file grim/actor.h.

Enumerator:
LightStatic 
LightFastDyn 
LightNormDyn 
LightNone 

Definition at line 88 of file grim/actor.h.


Constructor & Destructor Documentation

Grim::Actor::Actor (  ) 

Builds an actor setting up only the minimal variables.

Definition at line 84 of file grim/actor.cpp.

Grim::Actor::~Actor (  ) 

Destroys the actor.

The actor is automatically removed from the GrimEngine instance.

Definition at line 114 of file grim/actor.cpp.


Member Function Documentation

void Grim::Actor::activateShadow ( bool  active,
const char *  shadowName 
)

Definition at line 2418 of file grim/actor.cpp.

void Grim::Actor::activateShadow ( bool  active,
SetShadow shadow 
)

Definition at line 2435 of file grim/actor.cpp.

void Grim::Actor::addShadowPlane ( const char *  n,
Set scene,
int  shadowId 
) [private]

Definition at line 1830 of file grim/actor.cpp.

void Grim::Actor::addShadowPlane ( const char *  name  ) 

Definition at line 1874 of file grim/actor.cpp.

void Grim::Actor::attachToActor ( Actor other,
const char *  joint 
)

Definition at line 2475 of file grim/actor.cpp.

void Grim::Actor::calculateOrientation ( const Math::Vector3d pos,
Math::Angle pitch,
Math::Angle yaw,
Math::Angle roll 
) [private]

Definition at line 532 of file grim/actor.cpp.

void Grim::Actor::clearCostumes (  ) 

Definition at line 1391 of file grim/actor.cpp.

void Grim::Actor::clearShadowPlane ( int  i  ) 

Definition at line 1916 of file grim/actor.cpp.

void Grim::Actor::clearShadowPlanes (  ) 

Definition at line 1910 of file grim/actor.cpp.

void Grim::Actor::collisionHandlerCallback ( Actor other  )  const [private]

Definition at line 2296 of file grim/actor.cpp.

void Grim::Actor::costumeMarkerCallback ( int  marker  )  [private]

Definition at line 2288 of file grim/actor.cpp.

void Grim::Actor::detach (  ) 

Definition at line 2524 of file grim/actor.cpp.

void Grim::Actor::draw (  ) 

Definition at line 1744 of file grim/actor.cpp.

void Grim::Actor::drawCostume ( Costume costume  )  [private]

Definition at line 1803 of file grim/actor.cpp.

void Grim::Actor::drawToCleanBuffer (  ) 

Definition at line 2547 of file grim/actor.cpp.

Costume * Grim::Actor::findCostume ( const Common::String name  ) 

Definition at line 1487 of file grim/actor.cpp.

MaterialPtr Grim::Actor::findMaterial ( const Common::String name  ) 

Definition at line 2551 of file grim/actor.cpp.

EMIModel * Grim::Actor::findModelWithMesh ( const Common::String mesh  )  [private]

Definition at line 1446 of file grim/actor.cpp.

void Grim::Actor::freeCostume ( Costume costume  )  [private]

Definition at line 1963 of file grim/actor.cpp.

void Grim::Actor::freeCostumeChore ( const Costume toFree,
ActionChore chore 
) [private]

Definition at line 1975 of file grim/actor.cpp.

AlphaMode Grim::Actor::getAlphaMode (  )  const [inline]

Definition at line 548 of file grim/actor.h.

void Grim::Actor::getBBoxInfo ( Math::Vector3d bboxPos,
Math::Vector3d bboxSize 
) const

Definition at line 2081 of file grim/actor.cpp.

const Common::List<Costume *>& Grim::Actor::getCostumes (  )  const [inline]

Definition at line 486 of file grim/actor.h.

int Grim::Actor::getCostumeStackDepth (  )  const [inline]

Definition at line 483 of file grim/actor.h.

Costume * Grim::Actor::getCurrentCostume (  )  const

Definition at line 1397 of file grim/actor.cpp.

Math::Vector3d Grim::Actor::getDestPos (  )  const [inline]

Definition at line 159 of file grim/actor.h.

float Grim::Actor::getEffectiveAlpha (  )  const [inline]

Definition at line 549 of file grim/actor.h.

int Grim::Actor::getEffectiveSortOrder (  )  const

Definition at line 2410 of file grim/actor.cpp.

const Math::Matrix4 Grim::Actor::getFinalMatrix (  )  const

Definition at line 2309 of file grim/actor.cpp.

float Grim::Actor::getGlobalAlpha (  )  const [inline]

Definition at line 547 of file grim/actor.h.

Math::Vector3d Grim::Actor::getHeadPos (  )  const

Definition at line 2366 of file grim/actor.cpp.

LightMode Grim::Actor::getLightMode (  )  const [inline]

Definition at line 564 of file grim/actor.h.

float Grim::Actor::getLocalAlpha ( unsigned int  vertex  )  const

Definition at line 2073 of file grim/actor.cpp.

float Grim::Actor::getLookAtRate (  )  const

Definition at line 1442 of file grim/actor.cpp.

Math::Vector3d Grim::Actor::getLookAtVector (  )  [inline]

Definition at line 518 of file grim/actor.h.

const Common::String& Grim::Actor::getName (  )  const [inline]

Returns the name of the actor.

Definition at line 123 of file grim/actor.h.

Math::Angle Grim::Actor::getPitch (  )  const [inline]

Returns the pitch of the actor, which is the rotation on the x axis.

See also:
getYaw
getRoll
setRot
turnTo
isTurning

Definition at line 282 of file grim/actor.h.

Math::Vector3d Grim::Actor::getPos (  )  const [inline]

Returns the position of the actor on the 3D scene.

See also:
setPos

Definition at line 158 of file grim/actor.h.

Math::Vector3d Grim::Actor::getPuckVector (  )  const

Returns a vector representing the direction the actor is facing.

Definition at line 971 of file grim/actor.cpp.

int Grim::Actor::getRestChore (  )  const

Definition at line 1008 of file grim/actor.cpp.

Math::Angle Grim::Actor::getRoll (  )  const [inline]

Returns the roll of the actor, which is the rotation on the y axis.

See also:
getPitch
getYaw
setRot
turnTo
isTurning

Definition at line 304 of file grim/actor.h.

Math::Quaternion Grim::Actor::getRotationQuat (  )  const

Definition at line 2357 of file grim/actor.cpp.

float Grim::Actor::getScale (  )  const [inline]

Definition at line 342 of file grim/actor.h.

Math::Vector3d Grim::Actor::getSimplePuckVector (  )  const [private]

Definition at line 955 of file grim/actor.cpp.

int Grim::Actor::getSortOrder (  )  const

Definition at line 2406 of file grim/actor.cpp.

bool Grim::Actor::getSphereInfo ( bool  adjustZ,
float &  size,
Math::Vector3d pos 
) const [private]

Definition at line 2099 of file grim/actor.cpp.

static int32 Grim::Actor::getStaticTag (  )  [inline, static]

Definition at line 105 of file grim/actor.h.

int Grim::Actor::getTalkChore ( int  index  )  const

Definition at line 1077 of file grim/actor.cpp.

Color Grim::Actor::getTalkColor (  )  const [inline]

Returns the color of the subtitles of the actor.

See also:
setTalkColor

Definition at line 144 of file grim/actor.h.

Costume * Grim::Actor::getTalkCostume ( int  index  )  const

Definition at line 1081 of file grim/actor.cpp.

Math::Vector3d Grim::Actor::getTangentPos ( const Math::Vector3d pos,
const Math::Vector3d dest 
) const [private]

Check if the line from pos to dest collides with this actor's bounding box, and if yes return a point that, together with pos, defines a line tangent with the bounding box.

Definition at line 2020 of file grim/actor.cpp.

float Grim::Actor::getTimeScale (  )  const [inline]

Returns the time scale of the actor.

See also:
setTimeScale

Definition at line 358 of file grim/actor.h.

ActionChore* Grim::Actor::getTurnChore ( int  dir  )  [inline, private]

Definition at line 685 of file grim/actor.h.

float Grim::Actor::getTurnRate (  )  const [inline]

Returns the turn rate.

See also:
setTurnRate

Definition at line 393 of file grim/actor.h.

float Grim::Actor::getWalkRate (  )  const [inline]

Returns the walk rate of the actor.

See also:
setWalkRate

Definition at line 406 of file grim/actor.h.

Math::Vector3d Grim::Actor::getWorldPos (  )  const

Definition at line 2350 of file grim/actor.cpp.

Math::Angle Grim::Actor::getYaw (  )  const [inline]

Returns the yaw of the actor, which is the rotation on the z axis.

See also:
getPitch
getRoll
setRot
turnTo
isTurning

Definition at line 293 of file grim/actor.h.

Math::Angle Grim::Actor::getYawTo ( const Actor actor  )  const

Calculates and returns the angle between the direction the actor is facing and the direction towards another actor.

Parameters:
actor The actor to look at.

Definition at line 1124 of file grim/actor.cpp.

Math::Angle Grim::Actor::getYawTo ( const Math::Vector3d p  )  const

Calculates and returns the angle between the direction the actor is facing and the direction towards a point.

Parameters:
actor The point to look at.

Definition at line 1137 of file grim/actor.cpp.

Math::Vector3d Grim::Actor::handleCollisionTo ( const Math::Vector3d from,
const Math::Vector3d pos 
) const [private]

Given a start point and a destination this function returns a position that doesn't collide with any actor.

Definition at line 2004 of file grim/actor.cpp.

bool Grim::Actor::handleCollisionWith ( Actor actor,
CollisionMode  mode,
Math::Vector3d vec 
) const

Definition at line 2125 of file grim/actor.cpp.

bool Grim::Actor::hasFollowedBoxes (  )  const [inline]

Definition at line 499 of file grim/actor.h.

bool Grim::Actor::hasLocalAlpha (  )  const

Definition at line 2069 of file grim/actor.cpp.

bool Grim::Actor::isAttached (  )  const [inline]

Definition at line 536 of file grim/actor.h.

bool Grim::Actor::isDrawableInSet ( const Common::String setName  )  const

Returns true if the actor is in the given set.

For engine internal use only, do not expose via lua API.

Parameters:
setName The name of the set.

Definition at line 1955 of file grim/actor.cpp.

bool Grim::Actor::isInOverworld (  )  const [inline]

Definition at line 545 of file grim/actor.h.

bool Grim::Actor::isInSet ( const Common::String setName  )  const

Returns true if the actor is in the given set.

Can be exposed via lua API.

Parameters:
setName The name of the set.

Definition at line 1959 of file grim/actor.cpp.

bool Grim::Actor::isLookAtVectorZero (  )  [inline]

Definition at line 507 of file grim/actor.h.

bool Grim::Actor::isTalking (  ) 

Returns true if the actor is saying something.

See also:
sayLine
shutUp

Definition at line 1296 of file grim/actor.cpp.

bool Grim::Actor::isTalkingForeground (  )  const

Definition at line 1304 of file grim/actor.cpp.

bool Grim::Actor::isTurning (  )  const

Returns true if the actor is turning.

See also:
turnTo

Definition at line 765 of file grim/actor.cpp.

bool Grim::Actor::isVisible (  )  const [inline]

Returns true if the actor is visible.

See also:
setVisibility

Definition at line 333 of file grim/actor.h.

bool Grim::Actor::isWalking (  )  const

Returns true if the actor is walking to a position.

See also:
walkTo
stopWalking

Definition at line 761 of file grim/actor.cpp.

void Grim::Actor::lineCleanup (  ) 

Definition at line 1289 of file grim/actor.cpp.

MaterialPtr Grim::Actor::loadMaterial ( const Common::String name,
bool  clamp 
)

Definition at line 2567 of file grim/actor.cpp.

void Grim::Actor::moveTo ( const Math::Vector3d pos  ) 

Definition at line 787 of file grim/actor.cpp.

void Grim::Actor::popCostume (  ) 

Definition at line 1378 of file grim/actor.cpp.

void Grim::Actor::pushCostume ( const char *  name  ) 

Definition at line 1350 of file grim/actor.cpp.

void Grim::Actor::putInSet ( const Common::String setName  ) 

Puts the actor in a set.

Parameters:
setName The name of the set.

Definition at line 1931 of file grim/actor.cpp.

bool Grim::Actor::restoreState ( SaveGame savedState  ) 

Restores the actor state.

Parameters:
savedState The saved state from which the actor will be restored.

Definition at line 276 of file grim/actor.cpp.

void Grim::Actor::restoreStaticState ( SaveGame state  )  [static]

Reimplemented from Grim::PoolObject< Actor >.

Definition at line 80 of file grim/actor.cpp.

void Grim::Actor::saveState ( SaveGame savedState  )  const

Saves the actor state.

Parameters:
savedState The save state to which save the actor's state.

Definition at line 126 of file grim/actor.cpp.

void Grim::Actor::saveStaticState ( SaveGame state  )  [static]

Reimplemented from Grim::PoolObject< Actor >.

Definition at line 76 of file grim/actor.cpp.

void Grim::Actor::sayLine ( const char *  msgId,
bool  background,
float  x,
float  y 
)

Makes the actor say the given line.

It will show a subtitle and/or play the voice, depending on the speech mode set in the GrimEngine instance.

Parameters:
msgId The id of the message to say.
background ?? actual meaning unknown yet.
See also:
isTalking
shutUp

Definition at line 1149 of file grim/actor.cpp.

void Grim::Actor::setActivateShadow ( int  shadowId,
bool  state 
)

Definition at line 1892 of file grim/actor.cpp.

void Grim::Actor::setActiveShadow ( int  shadowId  ) 

Definition at line 1878 of file grim/actor.cpp.

void Grim::Actor::setAlphaMode ( AlphaMode  mode,
const Common::String mesh 
)

Definition at line 1476 of file grim/actor.cpp.

void Grim::Actor::setCollisionMode ( CollisionMode  mode  ) 

Definition at line 1996 of file grim/actor.cpp.

void Grim::Actor::setCollisionScale ( float  scale  ) 

Definition at line 2000 of file grim/actor.cpp.

void Grim::Actor::setColormap ( const char *  map  ) 

Definition at line 1362 of file grim/actor.cpp.

void Grim::Actor::setCostume ( const char *  name  ) 

Definition at line 1371 of file grim/actor.cpp.

void Grim::Actor::setFollowBoxes ( bool  follow  ) 

Definition at line 1496 of file grim/actor.cpp.

void Grim::Actor::setGlobalAlpha ( float  alpha,
const Common::String mesh 
)

Definition at line 1465 of file grim/actor.cpp.

void Grim::Actor::setHead ( int  joint1,
int  joint2,
int  joint3,
float  maxRoll,
float  maxPitch,
float  maxYaw 
)

Definition at line 1415 of file grim/actor.cpp.

void Grim::Actor::setHead ( const char *  joint,
const Math::Vector3d offset 
)

Definition at line 1422 of file grim/actor.cpp.

void Grim::Actor::setHeadLimits ( float  yawRange,
float  maxPitch,
float  minPitch 
)

Definition at line 1430 of file grim/actor.cpp.

void Grim::Actor::setInOverworld ( bool  inOverworld  )  [inline]

Definition at line 544 of file grim/actor.h.

void Grim::Actor::setLightMode ( LightMode  lightMode  )  [inline]

Definition at line 565 of file grim/actor.h.

void Grim::Actor::setLocalAlpha ( unsigned int  vertex,
float  alpha 
)

Definition at line 2055 of file grim/actor.cpp.

void Grim::Actor::setLocalAlphaMode ( unsigned int  vertex,
AlphaMode  alphamode 
)

Definition at line 2062 of file grim/actor.cpp.

void Grim::Actor::setLookAtActor ( Actor other  )  [inline]

Definition at line 521 of file grim/actor.h.

void Grim::Actor::setLookAtRate ( float  rate  ) 

Definition at line 1438 of file grim/actor.cpp.

void Grim::Actor::setLookAtVector ( const Math::Vector3d vector  )  [inline]

Definition at line 514 of file grim/actor.h.

void Grim::Actor::setLookAtVectorZero (  )  [inline]

Definition at line 510 of file grim/actor.h.

void Grim::Actor::setLooking ( bool  lookingMode  )  [inline]

Definition at line 408 of file grim/actor.h.

void Grim::Actor::setMumbleChore ( int  choreNumber,
Costume cost 
)

Definition at line 1085 of file grim/actor.cpp.

void Grim::Actor::setName ( const Common::String name  )  [inline]

Sets the name of the actor.

Parameters:
name The name.

Definition at line 130 of file grim/actor.h.

void Grim::Actor::setPos ( const Math::Vector3d position  ) 

Sets the position of the actor on the 3D scene.

Parameters:
position The position.
See also:
getPos

Definition at line 513 of file grim/actor.cpp.

void Grim::Actor::setPuckOrient ( bool  orient  ) 

Definition at line 985 of file grim/actor.cpp.

void Grim::Actor::setReflection ( float  angle  )  [inline]

Definition at line 425 of file grim/actor.h.

void Grim::Actor::setRestChore ( int  choreNumber,
Costume cost 
)

Definition at line 990 of file grim/actor.cpp.

void Grim::Actor::setRot ( const Math::Angle pitch,
const Math::Angle yaw,
const Math::Angle roll 
)

Sets the rotation of the actor in the 3D scene.

The effect is immediate.

Parameters:
pitch The rotation of the x axis
yaw The rotation of the z axis
roll The rotation of the y axis
See also:
getPitch
getYaw
getRoll
turnTo
turn
isTurning

Definition at line 505 of file grim/actor.cpp.

void Grim::Actor::setRot ( const Math::Vector3d pos  ) 

Turn the actor towards a point in space.

The effect is immediate.

Parameters:
pos The position the actor should turn to.
See also:
turnTo
setRot

Definition at line 499 of file grim/actor.cpp.

void Grim::Actor::setRunning ( bool  running  )  [inline]

Used to tell the actor if it is running or not.

Parameters:
running The value: true if it is running.

Definition at line 424 of file grim/actor.h.

void Grim::Actor::setScale ( float  scale  )  [inline]

Sets the scale of the actor.

A value of 1 is the natural size.

Parameters:
scale The scale of the actor.

Definition at line 341 of file grim/actor.h.

void Grim::Actor::setShadowColor ( const Color color  ) 

Definition at line 1904 of file grim/actor.cpp.

void Grim::Actor::setShadowPlane ( const char *  name  ) 

Definition at line 1824 of file grim/actor.cpp.

void Grim::Actor::setShadowPoint ( const Math::Vector3d pos  ) 

Definition at line 1898 of file grim/actor.cpp.

void Grim::Actor::setShadowValid ( int  valid  ) 

Definition at line 1885 of file grim/actor.cpp.

void Grim::Actor::setSortOrder ( const int  order  ) 

Definition at line 2396 of file grim/actor.cpp.

void Grim::Actor::setTalkChore ( int  index,
int  choreNumber,
Costume cost 
)

Definition at line 1056 of file grim/actor.cpp.

void Grim::Actor::setTalkColor ( const Color color  )  [inline]

Sets the color of the subtitles of the actor.

Parameters:
color The color.
See also:
getTalkColor

Definition at line 138 of file grim/actor.h.

void Grim::Actor::setTimeScale ( float  scale  )  [inline]

Sets the time scale of the actor, used to calculate the speed of its animations.

A value of 1 is the normal speed.

Parameters:
scale The time scale.
See also:
getTimeScale

Definition at line 352 of file grim/actor.h.

void Grim::Actor::setTurnChores ( int  left_chore,
int  right_chore,
Costume cost 
)

Definition at line 1034 of file grim/actor.cpp.

void Grim::Actor::setTurnRate ( float  rate  )  [inline]

Sets the rate of the turning.

Parameters:
rat The wanted rate.
See also:
getTurnRate

Definition at line 387 of file grim/actor.h.

void Grim::Actor::setVisibility ( bool  val  )  [inline]

Sets the actor visibility.

Parameters:
val The value: true if visible, false otherwise.
See also:
isVisible

Definition at line 327 of file grim/actor.h.

void Grim::Actor::setWalkChore ( int  choreNumber,
Costume cost 
)

Definition at line 1012 of file grim/actor.cpp.

void Grim::Actor::setWalkRate ( float  rate  )  [inline]

Sets the rate of the walk movement.

Parameters:
rate The wanted rate.
See also:
getWalkRate

Definition at line 400 of file grim/actor.h.

bool Grim::Actor::shouldDrawShadow ( int  shadowId  )  [private]

Definition at line 1848 of file grim/actor.cpp.

void Grim::Actor::shutUp (  ) 

Makes the actor discard any subtitle and voice.

See also:
sayLine
isTalking

Definition at line 1315 of file grim/actor.cpp.

bool Grim::Actor::singleTurnTo ( const Math::Vector3d pos  ) 

Turn the actor towards a point in space, by an amount defined by the turn rate.

This function does not make an actor point at the given position, but it makes it rotate towards that.

Parameters:
pos The position the actor should turn to.
Returns:
true if the actor has reached the desired orientation
See also:
turnTo
setRot

Definition at line 573 of file grim/actor.cpp.

void Grim::Actor::stopAllChores ( bool  ignoreLoopingChores = false  ) 

Definition at line 1100 of file grim/actor.cpp.

bool Grim::Actor::stopMumbleChore (  )  [private]

Definition at line 1987 of file grim/actor.cpp.

void Grim::Actor::stopTalking (  )  [private]

Definition at line 1981 of file grim/actor.cpp.

void Grim::Actor::stopTurning (  ) 

Stops the actor from turning.

Definition at line 778 of file grim/actor.cpp.

void Grim::Actor::stopWalking (  )  [inline]

Stops immediately the actor's walk.

See also:
walkTo
isWalking

Definition at line 177 of file grim/actor.h.

void Grim::Actor::turn ( int  dir  ) 

Turns the actor by the given parameter on the z axis.

The actual movement depends also on the turn rate.

Parameters:
dir The quantity of the movement.
See also:
getPitch
getYaw
getRoll
setRot
turnTo
isTurning

Definition at line 1112 of file grim/actor.cpp.

void Grim::Actor::turnTo ( const Math::Vector3d pos,
bool  snap = false 
)

Turn the actor towards a point in space.

The effect is not immediate, the actor will slowly rotate to the destination orientation.

Parameters:
pos The position the actor should turn to.
snap If true tells the actor to increate its turn speed.
See also:
turnTo
setRot

Definition at line 567 of file grim/actor.cpp.

void Grim::Actor::turnTo ( const Math::Angle pitch,
const Math::Angle yaw,
const Math::Angle roll,
bool  snap = false 
)

Sets the rotation of thes actor in the 3D scene.

The effect is not immediate, the actor will slowly rotate to the destination orientation.

Parameters:
pitch The rotation of the x axis
yaw The rotation of the z axis
roll The rotation of the y axis
snap If true tells the actor to increate its turn speed.
See also:
getPitch
getYaw
getRoll
setRot
turn
isTurning

Definition at line 589 of file grim/actor.cpp.

void Grim::Actor::update ( uint  frameTime  ) 

Definition at line 1533 of file grim/actor.cpp.

bool Grim::Actor::updateTalk ( uint  frameTime  ) 

Check if the actor is still talking.

If it is returns true, otherwise false.

Definition at line 1720 of file grim/actor.cpp.

void Grim::Actor::updateWalk (  )  [private]

Definition at line 1502 of file grim/actor.cpp.

void Grim::Actor::walkForward (  ) 

Makes the actor move forward, the lenght of the movement based on the walk rate.

If it is following boxes it will not go into not walkable areas.

See also:
walkTo

Definition at line 808 of file grim/actor.cpp.

void Grim::Actor::walkTo ( const Math::Vector3d position  ) 

Tells the actor to go to the wanted position.

If the actor follows the walkboxes it will find the best route to go there, otherwise it will walk on a straight line.

Parameters:
position The destination position.
See also:
stopWalking
isWalking

Definition at line 600 of file grim/actor.cpp.


Member Data Documentation

Definition at line 679 of file grim/actor.h.

Definition at line 715 of file grim/actor.h.

Definition at line 712 of file grim/actor.h.

Definition at line 714 of file grim/actor.h.

Definition at line 616 of file grim/actor.h.

Definition at line 705 of file grim/actor.h.

Definition at line 706 of file grim/actor.h.

Definition at line 618 of file grim/actor.h.

Definition at line 671 of file grim/actor.h.

Definition at line 636 of file grim/actor.h.

Definition at line 725 of file grim/actor.h.

bool Grim::Actor::_fakeUnbound [private]

Definition at line 724 of file grim/actor.h.

bool Grim::Actor::_followBoxes [private]

Definition at line 607 of file grim/actor.h.

float Grim::Actor::_globalAlpha [private]

Definition at line 716 of file grim/actor.h.

Definition at line 608 of file grim/actor.h.

bool Grim::Actor::_inOverworld [private]

Definition at line 718 of file grim/actor.h.

bool Grim::Actor::_isTalkingBackground = false [static, private]

Definition at line 710 of file grim/actor.h.

Definition at line 671 of file grim/actor.h.

Definition at line 670 of file grim/actor.h.

Definition at line 727 of file grim/actor.h.

Definition at line 617 of file grim/actor.h.

Definition at line 733 of file grim/actor.h.

Definition at line 734 of file grim/actor.h.

Definition at line 713 of file grim/actor.h.

Definition at line 693 of file grim/actor.h.

bool Grim::Actor::_lookingMode [private]

Definition at line 613 of file grim/actor.h.

Definition at line 729 of file grim/actor.h.

Definition at line 629 of file grim/actor.h.

Definition at line 630 of file grim/actor.h.

Definition at line 628 of file grim/actor.h.

Definition at line 676 of file grim/actor.h.

Definition at line 683 of file grim/actor.h.

Definition at line 599 of file grim/actor.h.

Definition at line 703 of file grim/actor.h.

Definition at line 604 of file grim/actor.h.

Definition at line 603 of file grim/actor.h.

bool Grim::Actor::_puckOrient [private]

Definition at line 708 of file grim/actor.h.

Definition at line 609 of file grim/actor.h.

Definition at line 664 of file grim/actor.h.

Definition at line 670 of file grim/actor.h.

Definition at line 604 of file grim/actor.h.

bool Grim::Actor::_running [private]

Definition at line 668 of file grim/actor.h.

Definition at line 681 of file grim/actor.h.

Definition at line 682 of file grim/actor.h.

float Grim::Actor::_scale [private]

Definition at line 611 of file grim/actor.h.

Definition at line 721 of file grim/actor.h.

Definition at line 600 of file grim/actor.h.

Definition at line 678 of file grim/actor.h.

Definition at line 622 of file grim/actor.h.

int Grim::Actor::_sortOrder [private]

Definition at line 720 of file grim/actor.h.

int Grim::Actor::_talkAnim [private]

Definition at line 674 of file grim/actor.h.

Definition at line 673 of file grim/actor.h.

Definition at line 602 of file grim/actor.h.

int Grim::Actor::_talkDelay [private]

Definition at line 711 of file grim/actor.h.

bool Grim::Actor::_talking [private]

Definition at line 615 of file grim/actor.h.

Definition at line 614 of file grim/actor.h.

float Grim::Actor::_timeScale [private]

Definition at line 612 of file grim/actor.h.

bool Grim::Actor::_turning [private]

Definition at line 621 of file grim/actor.h.

float Grim::Actor::_turnRate [private]

Definition at line 605 of file grim/actor.h.

Definition at line 632 of file grim/actor.h.

Definition at line 722 of file grim/actor.h.

bool Grim::Actor::_visible [private]

Definition at line 610 of file grim/actor.h.

Definition at line 666 of file grim/actor.h.

bool Grim::Actor::_walkedCur [private]

Definition at line 667 of file grim/actor.h.

bool Grim::Actor::_walkedLast [private]

Definition at line 667 of file grim/actor.h.

bool Grim::Actor::_walking [private]

Definition at line 635 of file grim/actor.h.

float Grim::Actor::_walkRate [private]

Definition at line 605 of file grim/actor.h.

Definition at line 604 of file grim/actor.h.

const unsigned int Grim::Actor::MAX_LOCAL_ALPHA_VERTICES = 48 [static, private]

Definition at line 732 of file grim/actor.h.


The documentation for this class was generated from the following files:


Generated on Sat Mar 16 2019 05:05:52 for ResidualVM by doxygen 1.7.1
curved edge   curved edge