You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
627 B

4 months ago
#pragma once
#include <cstdint>
#include <string>
#include <vector>
4 months ago
#include <glm/vec3.hpp>
4 months ago
using std::vector;
4 months ago
struct Vertex;
struct Edge;
struct Triangle;
struct Face;
struct Tetrahedron;
class Mesh;
4 months ago
class SoftBody {
public:
4 months ago
explicit SoftBody(Mesh* mesh, float compliance);
4 months ago
uint32_t firstIndex = 0;
int32_t vertexOffset = 0;
4 months ago
uint32_t partitionCount = 0;
float compliance;
vector<Vertex> vertices;
vector<Edge> edges;
vector<Triangle> triangles;
vector<Face> faces;
vector<Tetrahedron> tetrahedra;
4 months ago
void applyOffset(const glm::vec3& offset);
4 months ago
SoftBody& operator =(const SoftBody& other) = delete;
private:
4 months ago
};