OpenMesh.Core.Geometry.VectorT



struct VectorT (Scalar,int N);
The N values of the template Scalar type are the only data members of the class VectorT . This guarantees 100% compatibility with arrays of type Scalar and size N, allowing us to define the cast operators to and from arrays and array pointers.

In addition, this class will be specialized for Vec4f to be 16 bit aligned, so that aligned SSE instructions can be used on these vectors.

alias value_type ;
the type of the scalar used in this template

alias vector_type ;
type of this vector

size_t size ();
returns dimension of the vector

VectorT opCall ();
default constructor creates uninitialized values.

VectorT opCall (Scalar v);
special constructor -- broadcasts the value to all elements

VectorT opCall (Scalar[] _values);
construct from a dynamic value array

template opAssign (VecType)
copy & cast constructor (explicit)

cast from vector with a different scalar type

void opAssign (VecType _rhs);
copy & cast constructor (explicit)

cast from vector with a different scalar type

Scalar* ptr ();
cast to Scalar array

Scalar opIndex (size_t _i);
cast to const Scalar array

get i'th element read-only

void opIndexAssign (Scalar v, size_t _i);
get i'th element write-only

int opEquals (ref vector_type _rhs);
component-wise comparison

void opMulAssign (Scalar _s);
component-wise self-multiplication with scalar

void opDivAssign (Scalar _s);
component-wise self-division by scalar \attention v *= (1/s) is much faster than this

vector_type opMul (Scalar _s);
component-wise multiplication with scalar

vector_type opDiv (Scalar _s);
component-wise division by with scalar

void opMulAssign (ref vector_type _rhs);
component-wise self-multiplication

void opDivAssign (ref vector_type _rhs);
component-wise self-division

void opSubAssign (ref vector_type _rhs);
vector difference from this

void opAddAssign (ref vector_type _rhs);
vector self-addition

vector_type opMul (ref vector_type _v);
component-wise vector multiplication

vector_type opDiv (ref vector_type _v);
component-wise vector division

vector_type opAdd (ref vector_type _v);
component-wise vector addition

vector_type opSub (ref vector_type _v);
component-wise vector difference

vector_type opNeg ();
unary minus

Scalar dot (ref vector_type _rhs);
compute scalar product

See Also:
OpenMesh. dot

Scalar max ();
return the maximal component

Scalar min ();
return the minimal component

vector_type minimize (ref vector_type _rhs);
minimize values: same as *this = min(*this, rhs), but faster

vector_type maximize (ref vector_type _rhs);
maximize values: same as *this = max(*this, rhs), but faster

vector_type min (ref vector_type _rhs);
component-wise min

vector_type max (ref vector_type _rhs);
component-wise max

template apply (Functor)
component-wise apply function object with Scalar opCall(Scalar).

vector_type apply (Functor _func);
component-wise apply function object with Scalar opCall(Scalar).

void vectorize (Scalar _s);
store the same value in each component (e.g. to clear all entries)

vector_type vectorized (Scalar _s);
store the same value in each component

int opCmp (ref vector_type _rhs);
lexicographical comparison

Scalar dot (Scalar,int N)(ref VectorT!(Scalar,N) _v1, ref VectorT!(Scalar,N) _v2);
\relates OpenMesh.VectorT

symmetric version of the dot product

VectorT!(Scalar,N) cross (Scalar,int N)(ref VectorT!(Scalar,N) _v1, ref VectorT!(Scalar,N) _v2);
\relates OpenMesh.VectorT

symmetric version of the cross product

Scalar cross (Scalar)(ref VectorT!(Scalar,2) _v1, ref VectorT!(Scalar,2) _v2);
\relates OpenMesh.VectorT

symmetric version of the scalar 2d cross product

VectorT!(Scalar,N) lerp (Scalar,int N)(Scalar t, ref VectorT!(Scalar,N) _v1, ref VectorT!(Scalar,N) _v2);
\relates OpenMesh.VectorT

Linear interpolation between v1 and v2.

alias Vec2ub ;
2-ubyte vector

alias Vec2f ;
2-float vector

alias Vec2d ;
2-double vector

alias Vec3ub ;
3-ubyte vector

alias Vec3f ;
3-float vector

alias Vec3d ;
3-double vector

alias Vec4ub ;
4-ubyte vector

alias Vec4f ;
4-float vector

alias Vec4d ;
4-double vector

Page was generated with CanDyDOC on Fri Oct 12 16:12:34 2007