Lumiverse  2.5
A framework for creating lighting control applications
Public Member Functions | Private Attributes | List of all members
Lumiverse::ArnoldParameterVector< D, T > Class Template Reference

Defines a vector type for Arnold parameters, like color, vector etc. More...

#include <ArnoldParameterVector.h>

Public Member Functions

 ArnoldParameterVector (T *val=NULL)
 Constructs a vector with the values passed as an array. More...
 
 ArnoldParameterVector (ArnoldParameterVector *other)
 Constructs a vector with the contents of a different vector. More...
 
 ~ArnoldParameterVector ()
 Destroys the vector.
 
string getTypeName ()
 Says that this object is a vector for a arnold parameter. More...
 
void operator= (ArnoldParameterVector val)
 
ArnoldParameterVectoroperator+= (ArnoldParameterVector val)
 
ArnoldParameterVectoroperator-= (ArnoldParameterVector val)
 
ArnoldParameterVectoroperator*= (float val)
 
ArnoldParameterVectoroperator*= (ArnoldParameterVector val)
 
ArnoldParameterVectoroperator/= (float val)
 
ArnoldParameterVectoroperator/= (ArnoldParameterVector val)
 
T & operator[] (size_t i)
 
size_t getDimension ()
 Returns the dimension of this vector. More...
 
void resize (size_t dim)
 Resizes the vector to a specific dimension. More...
 
getElement (size_t i)
 Gets the nth element. More...
 
T * getElements ()
 Gets the pointer to corresponding array. More...
 
void setElement (size_t i, T val)
 Sets the value of a element. More...
 

Private Attributes

m_elements [D]
 The actual array contains the elements.
 
std::string m_arnoldTypeName
 The type name of arnold parameter.
 

Detailed Description

template<size_t D, typename T>
class Lumiverse::ArnoldParameterVector< D, T >

Defines a vector type for Arnold parameters, like color, vector etc.

This class is used by ArnoldInterface to temporarily contain value and the corresponding arnold parameter name.

Template Parameters
DDimension
TValue type
See also
ArnoldInterface

Constructor & Destructor Documentation

template<size_t D, typename T >
Lumiverse::ArnoldParameterVector< D, T >::ArnoldParameterVector ( T *  val = NULL)

Constructs a vector with the values passed as an array.

If the pointer is NULL, uses 0 to fill the D-dimensional vector.

Parameters
valA pointer to an array
See also
reset()
template<size_t D, typename T >
Lumiverse::ArnoldParameterVector< D, T >::ArnoldParameterVector ( ArnoldParameterVector< D, T > *  other)

Constructs a vector with the contents of a different vector.

If the other vector has a dimension less than D, then only part of this vector would get rewritten.

Parameters
otherThe other object to copy from

Member Function Documentation

template<size_t D, typename T>
size_t Lumiverse::ArnoldParameterVector< D, T >::getDimension ( )
inline

Returns the dimension of this vector.

Returns
The dimension
template<size_t D, typename T>
T Lumiverse::ArnoldParameterVector< D, T >::getElement ( size_t  i)
inline

Gets the nth element.

Parameters
iThe n
Returns
Value of the element
template<size_t D, typename T>
T* Lumiverse::ArnoldParameterVector< D, T >::getElements ( )
inline

Gets the pointer to corresponding array.

Returns
The pointer to the value array.
template<size_t D, typename T>
string Lumiverse::ArnoldParameterVector< D, T >::getTypeName ( )
inline

Says that this object is a vector for a arnold parameter.

Returns
String with contents: "arnold type name" + "dimension"
template<size_t D, typename T>
void Lumiverse::ArnoldParameterVector< D, T >::resize ( size_t  dim)
inline

Resizes the vector to a specific dimension.

Parameters
dimThe dimension
template<size_t D, typename T>
void Lumiverse::ArnoldParameterVector< D, T >::setElement ( size_t  i,
val 
)
inline

Sets the value of a element.

Parameters
iA specific dimension
valNew value

The documentation for this class was generated from the following file: