PeriDyno 1.0.0
Loading...
Searching...
No Matches
RigidMesh.h
Go to the documentation of this file.
1#pragma once
3#include "Topology/TriangleSet.h"
4
5#include "FilePath.h"
6
7namespace dyno
8{
9 template<typename TDataType>
10 class RigidMesh : virtual public RigidBody<TDataType>
11 {
12 DECLARE_TCLASS(RigidMesh, TDataType)
13 public:
14 typedef typename TDataType::Real Real;
15 typedef typename TDataType::Coord Coord;
16 typedef typename TDataType::Matrix Matrix;
17
19 ~RigidMesh() override;
20
21 public:
22 DEF_VAR(FilePath, EnvelopeName, getAssetPath() + "obj/boat_boundary.obj", "");
23
24 DEF_VAR(FilePath, MeshName, getAssetPath() + "obj/boat_mesh.obj", "");
25
26 DEF_VAR(Real, Density, Real(1000), "Density");
27
28 DEF_INSTANCE_STATE(TriangleSet<TDataType>, InitialEnvelope, "Envelope for the mesh");
29 DEF_INSTANCE_STATE(TriangleSet<TDataType>, Envelope, "Envelope for the mesh");
30
31 DEF_INSTANCE_STATE(TriangleSet<TDataType>, InitialMesh, "Initial mesh");
33
34 protected:
35 void resetStates() override;
36
37 void updateStates() override;
38
39 private:
40 void transform();
41 };
42
43 IMPLEMENT_TCLASS(RigidMesh, TDataType)
44}
#define DECLARE_TCLASS(name, T1)
Definition Object.h:87
#define IMPLEMENT_TCLASS(name, T1)
Definition Object.h:103
DEF_VAR(FilePath, EnvelopeName, getAssetPath()+"obj/boat_boundary.obj", "")
TDataType::Real Real
Definition RigidMesh.h:14
void updateStates() override
TDataType::Matrix Matrix
Definition RigidMesh.h:16
TDataType::Coord Coord
Definition RigidMesh.h:15
void resetStates() override
DEF_VAR(FilePath, MeshName, getAssetPath()+"obj/boat_mesh.obj", "")
DEF_INSTANCE_STATE(TriangleSet< TDataType >, InitialEnvelope, "Envelope for the mesh")
DEF_INSTANCE_STATE(TriangleSet< TDataType >, InitialMesh, "Initial mesh")
DEF_INSTANCE_STATE(TriangleSet< TDataType >, Mesh, "Mesh")
~RigidMesh() override
DEF_INSTANCE_STATE(TriangleSet< TDataType >, Envelope, "Envelope for the mesh")
DEF_VAR(Real, Density, Real(1000), "Density")
This is an implementation of AdditiveCCD based on peridyno.
Definition Array.h:25