Welcome to mirror list, hosted at ThFree Co, Russian Federation.

PHY_ICharacter.h « common « Physics « gameengine « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 81c567ef08a0734e21ed9a409478f1cdd73fef4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39

/** \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 ~PHY_ICharacter(){};

	virtual void Jump()= 0;
	virtual bool OnGround()= 0;

	virtual float GetGravity()= 0;
	virtual void SetGravity(float gravity)= 0;
	
	virtual unsigned char GetMaxJumps() = 0;
	virtual void SetMaxJumps(unsigned char maxJumps) = 0;

	virtual unsigned char GetJumpCount() = 0;

	virtual void SetWalkDirection(const class MT_Vector3& dir)=0;
	virtual MT_Vector3 GetWalkDirection()=0;

#ifdef WITH_CXX_GUARDEDALLOC
	MEM_CXX_CLASS_ALLOC_FUNCS("GE:PHY_ICharacter")
#endif
};

#endif //__PHY_ICHARACTER_H__