#include <SIM_DerVector3.h>
By performing a sequence of arithmetic operations on this vector class after initializing its derivative appropriately, you can easily keep track of the effect of those operations on the derivative. Independent variables can be included in an equation using the conventional UT_Vector3 and fpreal types, and dependent variables can use the SIM_DerVector3 and SIM_DerScalar types.
It is inspired by Eitan Grinspun's class for the same purpose, described in his 2003 SCA paper on Discrete Shells.
Definition at line 40 of file SIM_DerVector3.h.
| SIM_DerVector3::SIM_DerVector3 | ( | ) | [inline] |
Definition at line 43 of file SIM_DerVector3.h.
| SIM_DerVector3::SIM_DerVector3 | ( | const UT_Vector3 & | v | ) | [inline, explicit] |
Initialize to a constant vector, with no derivative.
Definition at line 45 of file SIM_DerVector3.h.
| SIM_DerVector3::SIM_DerVector3 | ( | const UT_Vector3 & | v, | |
| const UT_Matrix3 & | D | |||
| ) | [inline] |
Initialize to a vector with a derivative. This is particularly useful for initializing the variables themselves, where D=I.
Definition at line 49 of file SIM_DerVector3.h.
| SIM_DerVector3 SIM_DerVector3::cross | ( | const UT_Vector3 & | rhs | ) | const [inline] |
Definition at line 214 of file SIM_DerVector3.h.
| SIM_DerVector3 SIM_DerVector3::cross | ( | const SIM_DerVector3 & | rhs | ) | const [inline] |
Definition at line 204 of file SIM_DerVector3.h.
| const UT_Matrix3& SIM_DerVector3::D | ( | ) | const [inline] |
Derivative matrix, dv/dx. The entries of the matrix are laid out like a typical Jacobian:
[ dv1/dx1 dv1/dx2 dv1/dx3 ] [ dv2/dx1 dv2/dx2 dv2/dx3 ] [ dv3/dx1 dv3/dx2 dv3/dx3 ]
[ dv1/dx ] = [ dv2/dx ] [ dv3/dx ]
= [ dv/dx1 dv/dx2 dv/dx3 ]
Definition at line 72 of file SIM_DerVector3.h.
| SIM_DerScalar SIM_DerVector3::dot | ( | const UT_Vector3 & | rhs | ) | const [inline] |
Definition at line 194 of file SIM_DerVector3.h.
| SIM_DerScalar SIM_DerVector3::dot | ( | const SIM_DerVector3 & | rhs | ) | const [inline] |
Definition at line 184 of file SIM_DerVector3.h.
| SIM_DerScalar SIM_DerVector3::length | ( | ) | const [inline] |
Definition at line 236 of file SIM_DerVector3.h.
| SIM_DerScalar SIM_DerVector3::length2 | ( | ) | const [inline] |
Definition at line 222 of file SIM_DerVector3.h.
| SIM_DerVector3 SIM_DerVector3::normalize | ( | ) | const [inline] |
Definition at line 247 of file SIM_DerVector3.h.
| SIM_DerVector3 SIM_DerVector3::operator* | ( | fpreal | scalar | ) | const [inline] |
Definition at line 101 of file SIM_DerVector3.h.
| SIM_DerVector3 SIM_DerVector3::operator* | ( | const SIM_DerScalar & | rhs | ) | const [inline] |
Definition at line 173 of file SIM_DerVector3.h.
| SIM_DerVector3& SIM_DerVector3::operator*= | ( | const fpreal | rhs | ) | [inline] |
Definition at line 116 of file SIM_DerVector3.h.
| SIM_DerVector3& SIM_DerVector3::operator*= | ( | const SIM_DerScalar & | rhs | ) | [inline] |
Definition at line 114 of file SIM_DerVector3.h.
| SIM_DerVector3 SIM_DerVector3::operator+ | ( | const UT_Vector3 & | rhs | ) | const [inline] |
Definition at line 87 of file SIM_DerVector3.h.
| SIM_DerVector3 SIM_DerVector3::operator+ | ( | const SIM_DerVector3 & | rhs | ) | const [inline] |
Definition at line 82 of file SIM_DerVector3.h.
| SIM_DerVector3& SIM_DerVector3::operator+= | ( | const UT_Vector3 & | rhs | ) | [inline] |
Definition at line 108 of file SIM_DerVector3.h.
| SIM_DerVector3& SIM_DerVector3::operator+= | ( | const SIM_DerVector3 & | rhs | ) | [inline] |
Definition at line 106 of file SIM_DerVector3.h.
| SIM_DerVector3 SIM_DerVector3::operator- | ( | const UT_Vector3 & | rhs | ) | const [inline] |
Definition at line 96 of file SIM_DerVector3.h.
| SIM_DerVector3 SIM_DerVector3::operator- | ( | const SIM_DerVector3 & | rhs | ) | const [inline] |
Definition at line 91 of file SIM_DerVector3.h.
| SIM_DerVector3 SIM_DerVector3::operator- | ( | ) | const [inline] |
Definition at line 78 of file SIM_DerVector3.h.
| SIM_DerVector3& SIM_DerVector3::operator-= | ( | const UT_Vector3 & | rhs | ) | [inline] |
Definition at line 112 of file SIM_DerVector3.h.
| SIM_DerVector3& SIM_DerVector3::operator-= | ( | const SIM_DerVector3 & | rhs | ) | [inline] |
Definition at line 110 of file SIM_DerVector3.h.
| static UT_Matrix3 SIM_DerVector3::S | ( | const UT_Vector3 & | v | ) | [inline, static] |
Definition at line 131 of file SIM_DerVector3.h.
| const UT_Vector3& SIM_DerVector3::v | ( | ) | const [inline] |
1.5.9