V-ARTContributions
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
VART::Human Class Reference

Articulated object for humanoid representation. More...

#include <human.h>

Inheritance diagram for VART::Human:

Classes

class  StepManager
 

Public Member Functions

 Human ()
 Creates an uninitialized humanoid. More...
 
 Human (VART::Human &human)
 
 ~Human ()
 
virtual SceneNode * Copy ()
 
virtual void ComputeBoundingBox ()
 
virtual void TraverseDepthFirst (SNOperator *operatorPtr)
 
virtual void LocateDepthFirst (SNLocator *locatorPtr) const
 
virtual void DrawForPicking () const
 
bool LoadFromFile (const std::string &fileName)
 Loads from a XML file. More...
 
void PutIntoScene (Scene *scenePtr)
 Adds the humanoid to a scene. More...
 
XmlJointAction * LoadAction (const std::string &fileName)
 Loads action from given file name. More...
 
void ModifyActions (DMModifier &modifier)
 Modifies registered actions. More...
 
void ComputeStickPosition (Point4D *resultPtr)
 
void AdjustPosition ()
 
void ComputeTransform (Transform *transPtr)
 
void Move (const Point4D &offset)
 
void ResetPosition ()
 
void RotateOnY (float radians)
 
void Walk (bool status)
 
bool WalkTo (const Point4D &dest, const Point4D &orientation)
 
void SwapLegs ()
 
void StickRightFoot ()
 
void StickLeftFoot ()
 
bool ReachedDestiantion () const
 Returns true if the human has reached its destination. More...
 
Point4D Position () const
 
bool IsWalking () const
 
void ChangeAdjustment (const Point4D &displacement)
 
void ActivateBreatheAction (bool status)
 
void ActivateRestAction (bool status)
 

Protected Member Functions

void ComputeLocalStickPosition (Point4D *resultPtr)
 Computes and returns the position of the right foot front. More...
 
virtual bool DrawInstanceOGL () const
 
float AngleToPosition (const Point4D &pos, float *totalAngle) const
 Builds its internal map of dof movers. More...
 

Protected Attributes

std::list< JointAction * > actionList
 Maps joint names to its noisydofmovers. More...
 
Point4D rfFront
 
Point4D lfFront
 
Point4D rfBack
 
Point4D lfBack
 
Point4D * stickPositionPtr
 
Transform position
 A transform that puts the human at his position and orientation. More...
 
Transform adjustment
 A transform that makes a point on human's geometry to stick at the ground. More...
 
Transform orientation
 A transform that puts the human vertical on Y, scales him to the right size and puts his feet at Y = 0;. More...
 
Joint * hipJointPtr
 
SGPath pathToRFoot
 
SGPath pathToLFoot
 
SGPath * pathToStickPosPtr
 
JointAction * moveLeftLegPtr
 
JointAction * moveRightLegPtr
 
JointAction * restPtr
 
JointAction * breathePtr
 
StepManager stepManager
 
Point4D forward
 A vector that points forward on the floor plane (world coordinates) More...
 
float maxStepRotation
 Maximal rotation (radians) during a single step. More...
 
Point4D destination
 
bool isWalking
 currently walking? More...
 
float anxiety
 
float anger
 
float joy
 
float fear
 
float disgust
 
float surprise
 

Friends

class StepManager
 

Detailed Description

Articulated object for humanoid representation.

A human object is an articulated object that can be included in the scene graph.

Definition at line 28 of file human.h.

Constructor & Destructor Documentation

VART::Human::Human ( )

Creates an uninitialized humanoid.

Definition at line 46 of file human.cpp.

References adjustment, orientation, and position.

VART::Human::Human ( VART::Human human)

Definition at line 62 of file human.cpp.

References orientation, and position.

VART::Human::~Human ( )

Definition at line 75 of file human.cpp.

Member Function Documentation

void VART::Human::ActivateBreatheAction ( bool  status)

Definition at line 255 of file human.cpp.

void VART::Human::ActivateRestAction ( bool  status)

Definition at line 266 of file human.cpp.

void VART::Human::AdjustPosition ( )

Definition at line 371 of file human.cpp.

float VART::Human::AngleToPosition ( const Point4D &  pos,
float *  totalAngle 
) const
protected

Builds its internal map of dof movers.

Computes signed angle to given position

Parameters
[in]posposition
[out]totalAngletotal angle to position

Returns a signed parcial angle to given position, as computed from human position (center – not foot support position). If you do not want the total angle, pass NULL.

Definition at line 79 of file human.cpp.

void VART::Human::ChangeAdjustment ( const Point4D &  displacement)

Definition at line 112 of file human.cpp.

void VART::Human::ComputeBoundingBox ( )
virtual

Definition at line 125 of file human.cpp.

void VART::Human::ComputeLocalStickPosition ( Point4D *  resultPtr)
protected

Computes and returns the position of the right foot front.

Definition at line 356 of file human.cpp.

void VART::Human::ComputeStickPosition ( Point4D *  resultPtr)

Definition at line 364 of file human.cpp.

void VART::Human::ComputeTransform ( Transform *  transPtr)

Definition at line 381 of file human.cpp.

VART::SceneNode * VART::Human::Copy ( )
virtual

Definition at line 119 of file human.cpp.

void VART::Human::DrawForPicking ( ) const
virtual

Definition at line 179 of file human.cpp.

bool VART::Human::DrawInstanceOGL ( ) const
protectedvirtual

Definition at line 246 of file human.cpp.

bool VART::Human::IsWalking ( ) const
inline

Definition at line 98 of file human.h.

References isWalking.

VART::XmlJointAction * VART::Human::LoadAction ( const std::string &  fileName)

Loads action from given file name.

Definition at line 328 of file human.cpp.

bool VART::Human::LoadFromFile ( const std::string &  fileName)

Loads from a XML file.

Loads an articulated humanoid from an xml file. The newly createad human will have two active actions: rest and breathe.

Definition at line 187 of file human.cpp.

void VART::Human::LocateDepthFirst ( SNLocator *  locatorPtr) const
virtual

Definition at line 170 of file human.cpp.

void VART::Human::ModifyActions ( DMModifier &  modifier)

Modifies registered actions.

Definition at line 424 of file human.cpp.

void VART::Human::Move ( const Point4D &  offset)

Definition at line 277 of file human.cpp.

VART::Point4D VART::Human::Position ( ) const

Definition at line 318 of file human.cpp.

void VART::Human::PutIntoScene ( Scene *  scenePtr)

Adds the humanoid to a scene.

Definition at line 323 of file human.cpp.

bool VART::Human::ReachedDestiantion ( ) const

Returns true if the human has reached its destination.

Definition at line 296 of file human.cpp.

void VART::Human::ResetPosition ( )

Definition at line 308 of file human.cpp.

void VART::Human::RotateOnY ( float  radians)

Definition at line 284 of file human.cpp.

void VART::Human::StickLeftFoot ( )

Definition at line 146 of file human.cpp.

void VART::Human::StickRightFoot ( )

Definition at line 130 of file human.cpp.

void VART::Human::SwapLegs ( )
void VART::Human::TraverseDepthFirst ( SNOperator *  operatorPtr)
virtual

Definition at line 163 of file human.cpp.

void VART::Human::Walk ( bool  status)

Definition at line 386 of file human.cpp.

bool VART::Human::WalkTo ( const Point4D &  dest,
const Point4D &  orientation 
)

Definition at line 415 of file human.cpp.

Friends And Related Function Documentation

friend class StepManager
friend

Definition at line 30 of file human.h.

Member Data Documentation

std::list<JointAction*> VART::Human::actionList
protected

Maps joint names to its noisydofmovers.

Definition at line 131 of file human.h.

Transform VART::Human::adjustment
protected

A transform that makes a point on human's geometry to stick at the ground.

Definition at line 140 of file human.h.

Referenced by Human().

float VART::Human::anger
protected

Definition at line 162 of file human.h.

float VART::Human::anxiety
protected

Definition at line 161 of file human.h.

JointAction* VART::Human::breathePtr
protected

Definition at line 151 of file human.h.

Point4D VART::Human::destination
protected

Definition at line 157 of file human.h.

float VART::Human::disgust
protected

Definition at line 165 of file human.h.

float VART::Human::fear
protected

Definition at line 164 of file human.h.

Point4D VART::Human::forward
protected

A vector that points forward on the floor plane (world coordinates)

Definition at line 154 of file human.h.

Joint* VART::Human::hipJointPtr
protected

Definition at line 144 of file human.h.

bool VART::Human::isWalking
protected

currently walking?

Definition at line 159 of file human.h.

Referenced by IsWalking().

float VART::Human::joy
protected

Definition at line 163 of file human.h.

Point4D VART::Human::lfBack
protected

Definition at line 135 of file human.h.

Point4D VART::Human::lfFront
protected

Definition at line 133 of file human.h.

float VART::Human::maxStepRotation
protected

Maximal rotation (radians) during a single step.

Definition at line 156 of file human.h.

JointAction* VART::Human::moveLeftLegPtr
protected

Definition at line 148 of file human.h.

JointAction* VART::Human::moveRightLegPtr
protected

Definition at line 149 of file human.h.

Transform VART::Human::orientation
protected

A transform that puts the human vertical on Y, scales him to the right size and puts his feet at Y = 0;.

Definition at line 143 of file human.h.

Referenced by Human().

SGPath VART::Human::pathToLFoot
protected

Definition at line 146 of file human.h.

SGPath VART::Human::pathToRFoot
protected

Definition at line 145 of file human.h.

SGPath* VART::Human::pathToStickPosPtr
protected

Definition at line 147 of file human.h.

Transform VART::Human::position
protected

A transform that puts the human at his position and orientation.

Definition at line 138 of file human.h.

Referenced by Human().

JointAction* VART::Human::restPtr
protected

Definition at line 150 of file human.h.

Point4D VART::Human::rfBack
protected

Definition at line 134 of file human.h.

Point4D VART::Human::rfFront
protected

Definition at line 132 of file human.h.

StepManager VART::Human::stepManager
protected

Definition at line 152 of file human.h.

Point4D* VART::Human::stickPositionPtr
protected

Definition at line 136 of file human.h.

float VART::Human::surprise
protected

Definition at line 166 of file human.h.


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