forked from bartvdbraak/blender
f840bd4a9f
* jump() -- causes the character to jump * onGround -- specifies whether or not the character is on the ground * gravity -- controls the "gravity" that the character physics uses for the character More options could be added (such as jump speed, step height, make fall speed, max slope, etc).
31 lines
535 B
C++
31 lines
535 B
C++
|
|
/** \file PHY_ICharacter.h
|
|
* \ingroup phys
|
|
*/
|
|
|
|
#ifndef __PHY_ICHARACTER_H__
|
|
#define __PHY_ICHARACTER_H__
|
|
|
|
//PHY_ICharacter provides a generic interface for "character" controllers
|
|
|
|
#ifdef WITH_CXX_GUARDEDALLOC
|
|
#include "MEM_guardedalloc.h"
|
|
#endif
|
|
|
|
class PHY_ICharacter
|
|
{
|
|
public:
|
|
|
|
virtual void Jump()= 0;
|
|
virtual bool OnGround()= 0;
|
|
|
|
virtual float GetGravity()= 0;
|
|
virtual void SetGravity(float gravity)= 0;
|
|
|
|
#ifdef WITH_CXX_GUARDEDALLOC
|
|
MEM_CXX_CLASS_ALLOC_FUNCS("GE:PHY_ICharacter")
|
|
#endif
|
|
};
|
|
|
|
#endif //__PHY_ICHARACTER_H__
|