mantaflow
0.10
A framework for fluid simulation
|
Basic inlined vector class. More...
#include <randomstream.h>
Public Member Functions | |
Vector3D () | |
Constructor. | |
Vector3D (const Vector3D< S > &v) | |
Copy-Constructor. | |
Vector3D (const float *v) | |
Copy-Constructor. | |
Vector3D (const double *v) | |
Copy-Constructor. | |
Vector3D (S v) | |
Construct a vector from one S. | |
Vector3D (S vx, S vy, S vz) | |
Construct a vector from three Ss. | |
const Vector3D< S > & | operator= (const Vector3D< S > &v) |
Assignment operator. | |
const Vector3D< S > & | operator= (S s) |
Assignment operator. | |
const Vector3D< S > & | operator+= (const Vector3D< S > &v) |
Assign and add operator. | |
const Vector3D< S > & | operator+= (S s) |
Assign and add operator. | |
const Vector3D< S > & | operator-= (const Vector3D< S > &v) |
Assign and sub operator. | |
const Vector3D< S > & | operator-= (S s) |
Assign and sub operator. | |
const Vector3D< S > & | operator*= (const Vector3D< S > &v) |
Assign and mult operator. | |
const Vector3D< S > & | operator*= (S s) |
Assign and mult operator. | |
const Vector3D< S > & | operator/= (const Vector3D< S > &v) |
Assign and div operator. | |
const Vector3D< S > & | operator/= (S s) |
Assign and div operator. | |
Vector3D< S > | operator- () const |
Negation operator. | |
S | min () const |
Get smallest component. | |
S | max () const |
Get biggest component. | |
bool | empty () |
Test if all components are zero. | |
S & | operator[] (unsigned int i) |
access operator | |
const S & | operator[] (unsigned int i) const |
constant access operator | |
std::string | toString () const |
debug output vector to a string More... | |
bool | isValid () const |
test if nans are present | |
Vector3D (S vx, S vy, S vz, S vDummy) | |
For compatibility with 4d vectors (discards 4th comp) | |
template<> | |
std::string | toString () const |
Public Attributes | |
union { | |
S value [3] | |
struct { | |
S x | |
S y | |
S z | |
} | |
struct { | |
S X | |
S Y | |
S Z | |
} | |
}; | |
actual values | |
Static Public Attributes | |
static const Vector3D< S > | Zero |
zero element | |
static const Vector3D< S > | Invalid |
Basic inlined vector class.
std::string Manta::Vector3D< S >::toString | ( | ) | const |
debug output vector to a string
Outputs the object in human readable form as string.