PeriDyno 1.0.0
Loading...
Searching...
No Matches
SimpleVechicleDriver.cpp
Go to the documentation of this file.
2
3namespace dyno
4{
6
11
16
18 {
20 tms.assign(this->inInstanceTransform()->constData());
21
22 for (uint i = 0; i < tms.size(); i++)
23 {
24 Transform3f& t = tms[i][0];
25 t.translation() += Vec3f(0, 0, 0.01);
26
27 if (i == 0 || i == 1 || i == 2 || i == 3)
28 {
29 t.rotation() = Quat1f(theta, Vec3f(1, 0, 0)).toMatrix3x3();
30 }
31 }
32
33 auto instantanceTransform = this->inInstanceTransform()->getDataPtr();
34 instantanceTransform->assign(tms);
35
36 theta += 0.01 * M_PI;
37
38 tms.clear();
39 }
40}
#define IMPLEMENT_CLASS(name)
Definition Object.h:79
#define M_PI
Definition Typedef.inl:36
DYN_FUNC SquareMatrix< Real, 3 > toMatrix3x3() const
Definition Quat.inl:275
This is an implementation of AdditiveCCD based on peridyno.
Definition Array.h:25
ArrayList< T, DeviceType::CPU > CArrayList
Definition ArrayList.h:207
Quat< float > Quat1f
Definition Quat.h:136
Transform< float, 3 > Transform3f
Vector< float, 3 > Vec3f
Definition Vector3D.h:93
unsigned int uint
Definition VkProgram.h:14