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.
 
 
 
 

38 lines
673 B

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