RigsofRods
Soft-body Physics Simulation
Public Member Functions | Private Member Functions | Private Attributes
RoR::Character Class Reference

#include <Character.h>

+ Collaboration diagram for RoR::Character:

Public Member Functions

 Character (int source=-1, unsigned int streamid=0, Ogre::UTFString playerName="", int color_number=0, bool is_remote=true)
 
 ~Character ()
 
int getSourceID () const
 
bool isRemote () const
 
int GetColorNum () const
 
bool GetIsRemote () const
 
Ogre::UTFString const & GetNetUsername ()
 
const std::string & GetAnimName () const
 
float GetAnimTime () const
 
Ogre::Radian getRotation () const
 
ActorPtr GetActorCoupling ()
 
void setColour (int color)
 
Ogre::Vector3 getPosition ()
 
void setPosition (Ogre::Vector3 position)
 
void setRotation (Ogre::Radian rotation)
 
void move (Ogre::Vector3 offset)
 
void update (float dt)
 
void updateCharacterRotation ()
 
void receiveStreamData (unsigned int &type, int &source, unsigned int &streamid, char *buffer)
 
void SetActorCoupling (bool enabled, ActorPtr actor)
 
GfxCharacterSetupGfx ()
 

Private Member Functions

void ReportError (const char *detail)
 
void SendStreamData ()
 
void SendStreamSetup ()
 
void SetAnimState (std::string mode, float time=0)
 

Private Attributes

ActorPtr m_actor_coupling
 The vehicle or machine which the character occupies. More...
 
Ogre::Radian m_character_rotation
 
float m_character_h_speed
 
float m_character_v_speed
 
Ogre::Vector3 m_character_position
 
Ogre::Vector3 m_prev_position
 
int m_color_number
 
int m_stream_id
 
int m_source_id
 
bool m_can_jump
 
bool m_is_remote
 
std::string m_anim_name
 
float m_anim_time
 
float m_net_last_anim_time
 
float m_driving_anim_length
 
std::string m_instance_name
 
Ogre::UTFString m_net_username
 
Ogre::Timer m_net_timer
 
unsigned long m_net_last_update_time
 
GfxCharacterm_gfx_character
 

Detailed Description

Definition at line 40 of file Character.h.

Constructor & Destructor Documentation

◆ Character()

Character::Character ( int  source = -1,
unsigned int  streamid = 0,
Ogre::UTFString  playerName = "",
int  color_number = 0,
bool  is_remote = true 
)

Definition at line 43 of file Character.cpp.

+ Here is the call graph for this function:

◆ ~Character()

Character::~Character ( )

Definition at line 71 of file Character.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ GetActorCoupling()

ActorPtr Character::GetActorCoupling ( )

Definition at line 547 of file Character.cpp.

+ Here is the caller graph for this function:

◆ GetAnimName()

const std::string& RoR::Character::GetAnimName ( ) const
inline

Definition at line 52 of file Character.h.

◆ GetAnimTime()

float RoR::Character::GetAnimTime ( ) const
inline

Definition at line 53 of file Character.h.

◆ GetColorNum()

int RoR::Character::GetColorNum ( ) const
inline

Definition at line 49 of file Character.h.

◆ GetIsRemote()

bool RoR::Character::GetIsRemote ( ) const
inline

Definition at line 50 of file Character.h.

◆ GetNetUsername()

Ogre::UTFString const& RoR::Character::GetNetUsername ( )
inline

Definition at line 51 of file Character.h.

◆ getPosition()

Vector3 Character::getPosition ( )

Definition at line 92 of file Character.cpp.

+ Here is the caller graph for this function:

◆ getRotation()

Ogre::Radian RoR::Character::getRotation ( ) const
inline

Definition at line 54 of file Character.h.

+ Here is the caller graph for this function:

◆ getSourceID()

int RoR::Character::getSourceID ( ) const
inline

Definition at line 47 of file Character.h.

◆ isRemote()

bool RoR::Character::isRemote ( ) const
inline

Definition at line 48 of file Character.h.

◆ move()

void Character::move ( Ogre::Vector3  offset)

Definition at line 401 of file Character.cpp.

+ Here is the caller graph for this function:

◆ receiveStreamData()

void Character::receiveStreamData ( unsigned int &  type,
int &  source,
unsigned int &  streamid,
char *  buffer 
)

Definition at line 473 of file Character.cpp.

+ Here is the call graph for this function:

◆ ReportError()

void Character::ReportError ( const char *  detail)
private

Definition at line 407 of file Character.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendStreamData()

void Character::SendStreamData ( )
private

Definition at line 446 of file Character.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendStreamSetup()

void Character::SendStreamSetup ( )
private

Definition at line 426 of file Character.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetActorCoupling()

void Character::SetActorCoupling ( bool  enabled,
ActorPtr  actor 
)

Definition at line 523 of file Character.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetAnimState()

void Character::SetAnimState ( std::string  mode,
float  time = 0 
)
private

Definition at line 103 of file Character.cpp.

+ Here is the caller graph for this function:

◆ setColour()

void RoR::Character::setColour ( int  color)
inline

Definition at line 56 of file Character.h.

◆ setPosition()

void Character::setPosition ( Ogre::Vector3  position)

Definition at line 85 of file Character.cpp.

+ Here is the caller graph for this function:

◆ setRotation()

void Character::setRotation ( Ogre::Radian  rotation)

Definition at line 98 of file Character.cpp.

+ Here is the caller graph for this function:

◆ SetupGfx()

GfxCharacter * Character::SetupGfx ( )

Definition at line 552 of file Character.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ update()

void Character::update ( float  dt)

Definition at line 129 of file Character.cpp.

+ Here is the call graph for this function:

◆ updateCharacterRotation()

void Character::updateCharacterRotation ( )

Definition at line 80 of file Character.cpp.

+ Here is the call graph for this function:

Field Documentation

◆ m_actor_coupling

ActorPtr RoR::Character::m_actor_coupling
private

The vehicle or machine which the character occupies.

Definition at line 74 of file Character.h.

◆ m_anim_name

std::string RoR::Character::m_anim_name
private

Definition at line 85 of file Character.h.

◆ m_anim_time

float RoR::Character::m_anim_time
private

Definition at line 86 of file Character.h.

◆ m_can_jump

bool RoR::Character::m_can_jump
private

Definition at line 83 of file Character.h.

◆ m_character_h_speed

float RoR::Character::m_character_h_speed
private

Definition at line 76 of file Character.h.

◆ m_character_position

Ogre::Vector3 RoR::Character::m_character_position
private

Definition at line 78 of file Character.h.

◆ m_character_rotation

Ogre::Radian RoR::Character::m_character_rotation
private

Definition at line 75 of file Character.h.

◆ m_character_v_speed

float RoR::Character::m_character_v_speed
private

Definition at line 77 of file Character.h.

◆ m_color_number

int RoR::Character::m_color_number
private

Definition at line 80 of file Character.h.

◆ m_driving_anim_length

float RoR::Character::m_driving_anim_length
private

Definition at line 88 of file Character.h.

◆ m_gfx_character

GfxCharacter* RoR::Character::m_gfx_character
private

Definition at line 93 of file Character.h.

◆ m_instance_name

std::string RoR::Character::m_instance_name
private

Definition at line 89 of file Character.h.

◆ m_is_remote

bool RoR::Character::m_is_remote
private

Definition at line 84 of file Character.h.

◆ m_net_last_anim_time

float RoR::Character::m_net_last_anim_time
private

Definition at line 87 of file Character.h.

◆ m_net_last_update_time

unsigned long RoR::Character::m_net_last_update_time
private

Definition at line 92 of file Character.h.

◆ m_net_timer

Ogre::Timer RoR::Character::m_net_timer
private

Definition at line 91 of file Character.h.

◆ m_net_username

Ogre::UTFString RoR::Character::m_net_username
private

Definition at line 90 of file Character.h.

◆ m_prev_position

Ogre::Vector3 RoR::Character::m_prev_position
private

Definition at line 79 of file Character.h.

◆ m_source_id

int RoR::Character::m_source_id
private

Definition at line 82 of file Character.h.

◆ m_stream_id

int RoR::Character::m_stream_id
private

Definition at line 81 of file Character.h.


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