2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2017-03-01 03:42:06 +00:00
|
|
|
|
|
|
|
#include "Character/CSegId.hpp"
|
|
|
|
#include "zeus/CAABox.hpp"
|
|
|
|
|
|
|
|
namespace urde
|
|
|
|
{
|
|
|
|
class CJointCollisionDescription
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
enum class ECollisionType
|
|
|
|
{
|
2017-04-22 11:04:07 +00:00
|
|
|
Sphere,
|
|
|
|
SphereSubdivide,
|
|
|
|
AABox,
|
|
|
|
OBBAutoSize,
|
|
|
|
OBB,
|
2017-03-01 03:42:06 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
enum class EOrientationType
|
|
|
|
{
|
2017-04-22 11:04:07 +00:00
|
|
|
Zero,
|
2018-11-10 02:47:07 +00:00
|
|
|
One
|
2017-03-01 03:42:06 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
private:
|
2017-04-22 11:04:07 +00:00
|
|
|
ECollisionType x0_colType;
|
|
|
|
EOrientationType x4_orientType;
|
2018-11-13 09:20:11 +00:00
|
|
|
CSegId x8_pivotId;
|
|
|
|
CSegId x9_nextId;
|
|
|
|
zeus::CVector3f xc_bounds;
|
|
|
|
zeus::CVector3f x18_pivotPoint;
|
|
|
|
float x24_radius;
|
|
|
|
float x28_maxSeparation;
|
2017-03-26 04:12:06 +00:00
|
|
|
std::string x2c_name;
|
2017-04-22 11:04:07 +00:00
|
|
|
TUniqueId x3c_actorId = kInvalidUniqueId;
|
2018-11-13 09:20:11 +00:00
|
|
|
float x40_mass;
|
2017-03-26 04:12:06 +00:00
|
|
|
|
2017-03-01 03:42:06 +00:00
|
|
|
public:
|
|
|
|
CJointCollisionDescription(ECollisionType, CSegId, CSegId, const zeus::CVector3f&, const zeus::CVector3f&, float,
|
2017-11-13 06:19:18 +00:00
|
|
|
float, EOrientationType, std::string_view, float);
|
2018-11-13 09:20:11 +00:00
|
|
|
static CJointCollisionDescription SphereSubdivideCollision(CSegId pivotId, CSegId nextId, float radius,
|
|
|
|
float maxSeparation, EOrientationType orientType,
|
|
|
|
std::string_view name, float mass);
|
|
|
|
static CJointCollisionDescription SphereCollision(CSegId pivotId, float radius, std::string_view name, float mass);
|
|
|
|
static CJointCollisionDescription AABoxCollision(CSegId pivotId, const zeus::CVector3f& bounds,
|
|
|
|
std::string_view name, float mass);
|
|
|
|
static CJointCollisionDescription OBBAutoSizeCollision(CSegId pivotId, CSegId nextId, const zeus::CVector3f& bounds,
|
|
|
|
EOrientationType orientType, std::string_view, float mass);
|
|
|
|
static CJointCollisionDescription OBBCollision(CSegId pivotId, const zeus::CVector3f& bounds,
|
|
|
|
const zeus::CVector3f& pivotPoint, std::string_view name, float mass);
|
2017-11-13 06:19:18 +00:00
|
|
|
std::string_view GetName() const { return x2c_name; }
|
2017-03-26 04:12:06 +00:00
|
|
|
TUniqueId GetCollisionActorId() const { return x3c_actorId; }
|
2018-11-13 09:20:11 +00:00
|
|
|
void SetCollisionActorId(TUniqueId id) { x3c_actorId = id; }
|
|
|
|
const zeus::CVector3f& GetBounds() const { return xc_bounds; }
|
|
|
|
float GetRadius() const { return x24_radius; }
|
|
|
|
float GetMaxSeparation() const { return x28_maxSeparation; }
|
2017-05-07 06:55:01 +00:00
|
|
|
EOrientationType GetOrientationType() const { return x4_orientType; }
|
2018-11-13 09:20:11 +00:00
|
|
|
float GetMass() const { return x40_mass; }
|
|
|
|
const zeus::CVector3f& GetPivotPoint() const { return x18_pivotPoint; }
|
|
|
|
ECollisionType GetType() const { return x0_colType; }
|
|
|
|
CSegId GetNextId() const { return x9_nextId; }
|
|
|
|
CSegId GetPivotId() const { return x8_pivotId; }
|
|
|
|
void ScaleAllBounds(const zeus::CVector3f& scale);
|
2017-03-01 03:42:06 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|