2016-04-17 22:38:05 +00:00
|
|
|
#ifndef __URDE_CCOLLISIONPRIMITIVE_HPP__
|
|
|
|
#define __URDE_CCOLLISIONPRIMITIVE_HPP__
|
|
|
|
|
2016-04-22 20:22:45 +00:00
|
|
|
#include "Collision/CMaterialList.hpp"
|
2016-04-23 18:04:49 +00:00
|
|
|
#include <functional>
|
|
|
|
|
2016-04-17 22:38:05 +00:00
|
|
|
namespace urde
|
|
|
|
{
|
|
|
|
|
|
|
|
class CCollisionPrimitive
|
|
|
|
{
|
2016-04-22 20:22:45 +00:00
|
|
|
CMaterialList x8_material;
|
2016-04-17 22:38:05 +00:00
|
|
|
public:
|
2016-04-23 18:04:49 +00:00
|
|
|
class Type
|
2016-04-17 22:38:05 +00:00
|
|
|
{
|
2016-04-23 18:04:49 +00:00
|
|
|
std::function<void(u32)> x0_setter;
|
|
|
|
const char* x4_info;
|
|
|
|
public:
|
|
|
|
Type() = default;
|
|
|
|
Type(std::function<void(unsigned int)> setter, const char * info)
|
|
|
|
: x0_setter(setter),
|
|
|
|
x4_info(info)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
const char* GetInfo() const
|
|
|
|
{
|
|
|
|
return x4_info;
|
|
|
|
}
|
|
|
|
|
|
|
|
std::function<void(u32)> GetSetter() const
|
|
|
|
{
|
|
|
|
return x0_setter;
|
|
|
|
}
|
2016-04-17 22:38:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static void InitBeginTypes();
|
2016-04-23 18:04:49 +00:00
|
|
|
static void InitAddType(const Type& tp);
|
2016-04-17 22:38:05 +00:00
|
|
|
static void InitEndTypes();
|
2016-04-22 20:29:31 +00:00
|
|
|
|
|
|
|
static void InitBeginColliders();
|
2016-04-23 18:04:49 +00:00
|
|
|
static void InitAddCollider(const Type& tp);
|
2016-04-17 22:38:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // __URDE_CCOLLISIONPRIMITIVE_HPP__
|