Files
Seele/src/Engine/Component/ShapeBase.h
T

25 lines
592 B
C++
Raw Normal View History

2022-11-29 16:34:42 +01:00
#pragma once
#include "Containers/Array.h"
#include "Transform.h"
2023-01-21 18:43:21 +01:00
#include "Graphics/DebugVertex.h"
2022-11-29 16:34:42 +01:00
namespace Seele
{
namespace Component
{
struct ShapeBase
{
2023-01-21 18:43:21 +01:00
ShapeBase();
ShapeBase(Array<Vector> vertices, Array<uint32> indices);
2022-11-29 16:34:42 +01:00
ShapeBase transform(const Component::Transform& transform) const;
2023-01-21 18:43:21 +01:00
void addCollider(Array<Vector> vertices, Array<uint32> indices, Matrix4 matrix);
void visualize() const;
Vector centerOfMass;
2022-11-29 16:34:42 +01:00
float mass;
2023-01-21 18:43:21 +01:00
Matrix3 bodyInertia;
Array<Vector> vertices;
2022-11-29 16:34:42 +01:00
Array<uint32> indices;
};
} // namespace Component
} // namespace Seele