|
template<typename T > |
void | IECore::vecSet (T &v, unsigned int i, typename VectorTraits< T >::BaseType x) |
| Sets the ith component of v to the value x.
|
|
template<typename T > |
void | IECore::vecSetAll (T &v, typename VectorTraits< T >::BaseType x) |
| Sets all components of v to the value x.
|
|
template<typename T > |
VectorTraits< T >::BaseType | IECore::vecGet (const T &v, unsigned int i) |
| Returns the value of the ith component of v.
|
|
template<typename T > |
T | IECore::vecAdd (const T &v1, const T &v2) |
| Adds v1 to v2 returning a new vector.
|
|
template<typename T > |
void | IECore::vecAdd (const T &v1, const T &v2, T &result) |
|
template<typename T > |
T | IECore::vecSub (const T &v1, const T &v2) |
| Subtracts v2 from v1, returning a new vector.
|
|
template<typename T > |
void | IECore::vecSub (const T &v1, const T &v2, T &result) |
|
template<typename T > |
T | IECore::vecMul (const T &v1, typename VectorTraits< T >::BaseType v2) |
| Perform multiplication of v1 by scalar value v2, returning a new vector.
|
|
template<typename T > |
void | IECore::vecMul (const T &v1, typename VectorTraits< T >::BaseType v2, T &result) |
|
template<typename T > |
T | IECore::vecMul (const T &v1, const T &v2) |
| Multiplies v1 by v2, returning a new vector.
|
|
template<typename T > |
void | IECore::vecMul (const T &v1, const T &v2, T &result) |
|
template<typename T > |
T | IECore::vecDiv (const T &v1, typename VectorTraits< T >::BaseType v2) |
| Division by a scalar returning a new vector.
|
|
template<typename T > |
void | IECore::vecDiv (const T &v1, typename VectorTraits< T >::BaseType v2, T &result) |
|
template<typename T > |
T | IECore::vecDiv (const T &v1, const T &v2) |
| Component-wise division of v1 by v2 returning a new vector.
|
|
template<typename T > |
void | IECore::vecDiv (const T &v1, const T &v2, T &result) |
|
template<typename T > |
VectorTraits< T >::BaseType | IECore::vecDot (const T &v1, const T &v2) |
| Returns the dot product of v1 and v2.
|
|
template<typename T > |
VectorTraits< T >::BaseType | IECore::vecLength2 (const T &v) |
| Returns the squared length of v.
|
|
template<typename T > |
VectorTraits< T >::BaseType | IECore::vecLength (const T &v) |
| Returns the length of v.
|
|
template<typename T > |
void | IECore::vecNormalize (T &v) |
| Normalizes v in place. If the length of v is zero then has no effect.
|
|
template<typename T > |
VectorTraits< T >::BaseType | IECore::vecDistance2 (const T &v1, const T &v2) |
| Returns the distance squared between v1 and v2.
|
|
template<typename T > |
VectorTraits< T >::BaseType | IECore::vecDistance (const T &v1, const T &v2) |
| Returns the distance between v1 and v2.
|
|
template<typename T , typename S > |
S | IECore::vecConvert (const T &v) |
| Converts from one vector type to another.
|
|
template<typename T , typename S > |
void | IECore::vecConvert (const T &v1, S &v2) |
| Converts from one vector type to another.
|
|
template<typename T > |
T | IECore::vecConstruct (const typename VectorTraits< T >::BaseType *components) |
|
template<typename T > |
T | IECore::vecCross (const T &v1, const T &v2) |
| Returns the cross product of v1 and v2, which must be 3-dimensional vectors.
|
|
Defines useful functions for dealing with any types which define an appropriate VectorTraits struct. Although it's much prettier to use the built in operators for a typical vector implementation, it's not particularly practical in much templated code as different vector types define different syntax or semantics for such operations. These functions give less intuitive syntax but are compatible with any classes for which a valid VectorTraits specialisation exists.