PeriDyno 1.0.0
Loading...
Searching...
No Matches
SplineConstraint.h
Go to the documentation of this file.
1#pragma once
2#include "ModelEditing.h"
3#include "Topology/TriangleSet.h"
4#include "Field.h"
5#include "FilePath.h"
6
7namespace dyno
8{
9 template <typename TDataType> class TriangleSet;
17 template<typename TDataType>
18 class SplineConstraint : public ModelEditing<TDataType>
19 {
21 public:
22
23 typedef typename TDataType::Real Real;
24 typedef typename TDataType::Coord Coord;
25 typedef typename TDataType::Matrix Matrix;
26
27 typedef typename ::dyno::Quat<Real> TQuat;
28
30
31 //void update() override;
32 public:
33
36
37 //DEF_INSTANCE_OUT(TriangleSet<TDataType>, TriangleSet, "");
38
39 DEF_VAR(Real, Velocity, 10, "");
40 DEF_VAR(Real, Offest, 0, "");
41
42 DEF_VAR(bool, Accelerate, false, "");
43
44 DEF_VAR(Real, AcceleratedSpeed, 0, "");
45
46 //DEF_VAR(Coord, AngularVelocity, Coord(0), "");
47
48 DEF_INSTANCE_STATE(TopologyModule, Topology, "Topology");
49
50 protected:
51 void resetStates() override;
52 void updateStates() override;
54 void SLerp(Quat<Real> a, Quat<Real> b, double t, Quat<Real>& out);
57
58
59 private:
60
61
64
66
69 int totalIndex = 0;
70 float tempLength = 0;
71 int currentIndex = 0;
73
74 float CurrentVelocity = 0;
75
76 //Real PI = 3.1415926535;
77 };
78}
#define DECLARE_TCLASS(name, T1)
Definition Object.h:87
A PointSet stores the coordinates for a set of independent points.
Definition PointSet.h:8
DEF_INSTANCE_IN(TriangleSet< TDataType >, TriangleSet, "")
DEF_VAR(Real, AcceleratedSpeed, 0, "")
TDataType::Matrix Matrix
DEF_INSTANCE_STATE(TopologyModule, Topology, "Topology")
void SLerp(Quat< Real > a, Quat< Real > b, double t, Quat< Real > &out)
void getQuatFromVector(Vec3f va, Vec3f vb, Quat< Real > &q)
DEF_VAR(Real, Velocity, 10, "")
void resetStates() override
DEF_VAR(bool, Accelerate, false, "")
::dyno::Quat< Real > TQuat
DEF_VAR(Real, Offest, 0, "")
void updateStates() override
DEF_INSTANCE_IN(PointSet< TDataType >, Spline, "")
This is an implementation of AdditiveCCD based on peridyno.
Definition Array.h:25
Array< T, DeviceType::GPU > DArray
Definition Array.inl:89
Vector< float, 3 > Vec3f
Definition Vector3D.h:93