Skip to content

Commit

Permalink
#391 more docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tanzfisch committed Dec 22, 2023
1 parent c784d81 commit 80f97e9
Show file tree
Hide file tree
Showing 2 changed files with 212 additions and 30 deletions.
57 changes: 28 additions & 29 deletions examples/12_CharacterController/src/CharacterController.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
using namespace igor;

/*! character controller
*/
*/
class CharacterController
{

Expand All @@ -56,7 +56,7 @@ class CharacterController
CharacterController(iNodePtr parent, int64 materiaID, const iaMatrixd &matrix);

/*! cleanup
*/
*/
virtual ~CharacterController();

/*! sets a force to be applied next tick
Expand All @@ -66,105 +66,104 @@ class CharacterController
void setForce(const iaVector3d &force);

/*! \returns the force to be applied next tick
*/
*/
iaVector3d getForce() const;

/*! \returns root transform node of character
*/
*/
iNodeTransform *getRootNode() const;

/*! \returns heading transform node of character
*/
*/
iNodeTransform *getHeadingTransform() const;

/*! \returns pitch transform node of character
*/
*/
iNodeTransform *getPitchTransform() const;

/*! \returns head transform node of character
*/
*/
iNodeTransform *getHeadTransform() const;

/*! \returns left shoulder transform node of character
*/
*/
iNodeTransform *getLeftShoulderTransform() const;

/*! \returns right shoulder transform node of character
*/
*/
iNodeTransform *getRightShoulderTransform() const;

/*! \returns current state od character
*/
*/
State getState() const;

private:

/*! the height of the character
*/
*/
float64 _characterHeight = 1.8;

/*! the radius of the character
*/
*/
float64 _characterRadius = 0.3;

/*! the height of a step that character can walk without jumping
*/
*/
float64 _stepHeight = 0.3;

/*! target height
*/
*/
float64 _targetHeight = _stepHeight + 0.1;

/*! head height
*/
*/
float64 _headHeight = 1.8;

/*! mass of body
*/
*/
float64 _mass = 100;

/*! state of character
*/
*/
State _state = State::Air;

/*! force to be applied next tick
*/
*/
iaVector3d _navigationForce;

/*! physics body handle
*/
*/
uint64 _bodyID = iPhysicsBody::INVALID_PHYSICSBODY_ID;

/*! collision caster
*/
*/
iPhysicsCollision *_collisionCast = nullptr;

/*! root transform node physics handle
*/
*/
uint32 _physicsTransformNodeID = iNode::INVALID_NODE_ID;

/*! upper body physics handle
*/
*/
uint32 _upperBodyTransformNodeID = iNode::INVALID_NODE_ID;

/*! heading transform node physics handle
*/
*/
uint32 _headingTransformNodeID = iNode::INVALID_NODE_ID;

/*! pitch transform node physics handle
*/
*/
uint32 _pitchTransformNodeID = iNode::INVALID_NODE_ID;

/*! head transform node physics handle
*/
*/
uint32 _headTransformNodeID = iNode::INVALID_NODE_ID;

/*! left shoulder transform node physics handle
*/
*/
uint32 _leftShoulderTransformNodeID = iNode::INVALID_NODE_ID;

/*! right shoulder transform node physics handle
*/
*/
uint32 _rightShoulderTransformNodeID = iNode::INVALID_NODE_ID;

/*! gets floor contact point
Expand All @@ -176,7 +175,7 @@ class CharacterController
float64 getFloorContactPoint(iaVector3d &point, iaVector3d &normal);

/*! helper to filter out bodies
*/
*/
unsigned onRayPreFilter(iPhysicsBody *body, iPhysicsCollision *collision, const void *userData);

/*! apply force and torque per tick
Expand Down
Loading

0 comments on commit 80f97e9

Please sign in to comment.