PeriDyno 1.0.0
Loading...
Searching...
No Matches
Transform3x3.h
Go to the documentation of this file.
1#pragma once
2#include "Quat.h"
3#include "Matrix3x3.h"
4namespace dyno {
5
6 template <typename T, int Dim> class Vector;
7
8 /*
9 * SquareMatrix<T,3> are defined for C++ fundamental integers types and floating-point types
10 */
11 template <typename T>
12 class Transform<T, 3>
13 {
14 public:
15 typedef T VarType;
16
17 DYN_FUNC Transform();
18 DYN_FUNC Transform(const Vector<T, 3>& t, const SquareMatrix<T, 3>& M, const Vector<T, 3>& s = Vector<T, 3>(1));
19
20 DYN_FUNC Transform(const Transform<T, 3>&);
21 DYN_FUNC ~Transform();
22
23 DYN_FUNC static unsigned int rows() { return 3; }
24 DYN_FUNC static unsigned int cols() { return 3; }
25
26 DYN_FUNC inline SquareMatrix<T, 3>& rotation() { return mRotation; }
27 DYN_FUNC inline const SquareMatrix<T, 3> rotation() const { return mRotation; }
28
29 DYN_FUNC inline Vector<T, 3>& translation() { return mTranslation; }
30 DYN_FUNC inline const Vector<T, 3> translation() const { return mTranslation; }
31
32 DYN_FUNC inline Vector<T, 3>& scale() { return mScale; }
33 DYN_FUNC inline const Vector<T, 3> scale() const { return mScale; }
34
35 DYN_FUNC const Vector<T, 3> operator* (const Vector<T, 3> &) const;
36
37 protected:
38 Vector<T, 3> mTranslation; //default: zero matrix
41 };
42
43 template class Transform<float, 3>;
44 template class Transform<double, 3>;
45 //convenient typedefs
48} //end of namespace dyno
49
50#include "Transform3x3.inl"
Implementation of quaternion.
SquareMatrix< T, 3 > mRotation
static DYN_FUNC unsigned int rows()
static DYN_FUNC unsigned int cols()
DYN_FUNC const SquareMatrix< T, 3 > rotation() const
Vector< T, 3 > mTranslation
Vector< T, 3 > mScale
DYN_FUNC Vector< T, 3 > & scale()
DYN_FUNC const Vector< T, 3 > scale() const
DYN_FUNC const Vector< T, 3 > translation() const
DYN_FUNC Vector< T, 3 > & translation()
DYN_FUNC SquareMatrix< T, 3 > & rotation()
#define T(t)
This is an implementation of AdditiveCCD based on peridyno.
Definition Array.h:25
Transform< float, 3 > Transform3f
DYN_FUNC const Complex< T > operator*(S scale, const Complex< T > &complex)
Definition Complex.inl:247
Transform< double, 3 > Transform3d
#define M(X, Y)
Definition vgMath.h:291