MScriptUtil Class Reference
[OpenMaya - API module for common classes]

#include <MScriptUtil.h>

Collaboration diagram for MScriptUtil:

Collaboration graph
[legend]

List of all members.


Detailed Description

Utility class for working with pointers and references.

Utility class for working with pointers to basic types such as int, float and arrays of these types. Class is more applicable for script programming rather than C++. C++ pointers and references have no equivalent in script so this class provides utility methods for working with these type of parameters and return values.

References are treated as pointers in script. This class allows creating data and then acquiring a pointer to the data so that information can be passed to class methods requiring references.

Common scenarios:

  1. A reference to an integer is required for a parameter: create the MScriptUtil object with the integer create() method, acquire a pointer using asIntPtr(), pass that pointer to the method requiring the reference, create another MScriptUtil object using the int pointer that was returned, query the integer return value using asInt().

  2. A pointer to a list of floats are required for a parameter: create the MScriptUtil object with createFromList(), call asFloatPointer() and pass that to the method.

  3. Several static methods are available for converting python lists to matrices and integer/float arrays.

This class is cumbersome to use but it provides a way of building parameters and accessing return values for methods which would normally not be scriptable.

Public Member Functions

 MScriptUtil ()
 ~MScriptUtil ()
 MScriptUtil (int &value)
 MScriptUtil (short &value)
 MScriptUtil (float &value)
 MScriptUtil (double &value)
 MScriptUtil (unsigned int &value)
 MScriptUtil (bool &value)
 MScriptUtil (MIntArray &array)
 MScriptUtil (MDoubleArray &array)
 MScriptUtil (MUintArray &array)
 MScriptUtil (MUint64Array &array)
void createFromInt (int x, int y=0, int z=0, int w=0)
void createFromDouble (double x, double y=0, double z=0, double w=0)
int asInt ()
short asShort ()
float asFloat ()
double asDouble ()
unsigned int asUint ()
bool asBool ()
int * asIntPtr ()
short * asShortPtr ()
float * asFloatPtr ()
double * asDoublePtr ()
unsigned int * asUintPtr ()
bool * asBoolPtr ()
char * asCharPtr ()
unsigned char * asUcharPtr ()
Mint2 * asInt2Ptr ()
Mint3 * asInt3Ptr ()
Mint4 * asInt4Ptr ()
Mshort2 * asShort2Ptr ()
Mshort3 * asShort3Ptr ()
Mshort4 * asShort4Ptr ()
Mfloat2 * asFloat2Ptr ()
Mfloat3 * asFloat3Ptr ()
Mfloat4 * asFloat4Ptr ()
Mdouble2 * asDouble2Ptr ()
Mdouble3 * asDouble3Ptr ()
Mdouble4 * asDouble4Ptr ()
Muint2 * asUint2Ptr ()
Muint3 * asUint3Ptr ()
Muint4 * asUint4Ptr ()

Static Public Member Functions

static void setInt (int &var, int value)
static void setShort (short &var, int value)
static void setFloat (float &var, double value)
static void setDouble (double &var, double value)
static void setUint (unsigned int &var, int value)
static void setBool (bool &var, int value)
static void setChar (char &var, int value)
static void setUchar (unsigned char &var, int value)
static int getInt (int &var)
static int getShort (short &var)
static double getFloat (float &var)
static double getDouble (double &var)
static int getUint (unsigned int &var)
static int getBool (bool &var)
static int getChar (char &var)
static int getUchar (unsigned char &var)
static bool setIntArray (int *var, unsigned int index, int value)
static bool setShortArray (short *var, unsigned int index, int value)
static bool setFloatArray (float *var, unsigned int index, double value)
static bool setDoubleArray (double *var, unsigned int index, double value)
static bool setUintArray (unsigned int *var, unsigned int index, int value)
static bool setBoolArray (bool *var, unsigned int index, int value)
static bool setCharArray (char *var, unsigned int index, int value)
static bool setUcharArray (unsigned char *var, unsigned int index, int value)
static int getIntArrayItem (int *var, unsigned int index)
static int getShortArrayItem (short *var, unsigned int index)
static double getFloatArrayItem (float *var, unsigned int index)
static double getDoubleArrayItem (double *var, unsigned int index)
static int getUintArrayItem (unsigned int *var, unsigned int index)
static int getBoolArrayItem (bool *var, unsigned int index)
static int getCharArrayItem (char *var, unsigned int index)
static int getUcharArrayItem (unsigned char *var, unsigned int index)
static int getInt2ArrayItem (int(*var)[2], unsigned int r, unsigned int c)
static bool setInt2ArrayItem (int(*var)[2], unsigned int r, unsigned int c, int value)
static int getInt3ArrayItem (int(*var)[3], unsigned int r, unsigned int c)
static bool setInt3ArrayItem (int(*var)[3], unsigned int r, unsigned int c, int value)
static int getInt4ArrayItem (int(*var)[4], unsigned int r, unsigned int c)
static bool setInt4ArrayItem (int(*var)[4], unsigned int r, unsigned int c, int value)
static short getShort2ArrayItem (short(*var)[2], unsigned int r, unsigned int c)
static bool setShort2ArrayItem (short(*var)[2], unsigned int r, unsigned int c, short value)
static short getShort3ArrayItem (short(*var)[3], unsigned int r, unsigned int c)
static bool setShort3ArrayItem (short(*var)[3], unsigned int r, unsigned int c, short value)
static short getShort4ArrayItem (short(*var)[4], unsigned int r, unsigned int c)
static bool setShort4ArrayItem (short(*var)[4], unsigned int r, unsigned int c, short value)
static float getFloat2ArrayItem (float(*var)[2], unsigned int r, unsigned int c)
static bool setFloat2ArrayItem (float(*var)[2], unsigned int r, unsigned int c, float value)
static float getFloat3ArrayItem (float(*var)[3], unsigned int r, unsigned int c)
static bool setFloat3ArrayItem (float(*var)[3], unsigned int r, unsigned int c, float value)
static float getFloat4ArrayItem (float(*var)[4], unsigned int r, unsigned int c)
static bool setFloat4ArrayItem (float(*var)[4], unsigned int r, unsigned int c, float value)
static double getDouble2ArrayItem (double(*var)[2], unsigned int r, unsigned int c)
static bool setDouble2ArrayItem (double(*var)[2], unsigned int r, unsigned int c, double value)
static double getDouble3ArrayItem (double(*var)[3], unsigned int r, unsigned int c)
static bool setDouble3ArrayItem (double(*var)[3], unsigned int r, unsigned int c, double value)
static double getDouble4ArrayItem (double(*var)[4], unsigned int r, unsigned int c)
static bool setDouble4ArrayItem (double(*var)[4], unsigned int r, unsigned int c, double value)
static unsigned int getUint2ArrayItem (unsigned int(*var)[2], unsigned int r, unsigned int c)
static bool setUint2ArrayItem (unsigned int(*var)[2], unsigned int r, unsigned int c, unsigned int value)
static unsigned int getUint3ArrayItem (unsigned int(*var)[3], unsigned int r, unsigned int c)
static bool setUint3ArrayItem (unsigned int(*var)[3], unsigned int r, unsigned int c, unsigned int value)
static unsigned int getUint4ArrayItem (unsigned int(*var)[4], unsigned int r, unsigned int c)
static bool setUint4ArrayItem (unsigned int(*var)[4], unsigned int r, unsigned int c, unsigned int value)


Constructor & Destructor Documentation

MScriptUtil::MScriptUtil (  ) 

Default constructor. The instance is set to contain no elements.

MScriptUtil::~MScriptUtil (  ) 

Destructor.

MScriptUtil::MScriptUtil ( int &  value  ) 

Instantiate class with an int reference.

Parameters:
[in] value Reference to the value.

MScriptUtil::MScriptUtil ( short &  value  ) 

Instantiate class with an short reference.

Parameters:
[in] value Reference to the value.

MScriptUtil::MScriptUtil ( float &  value  ) 

Instantiate class with an float reference.

Parameters:
[in] value Reference to the value.

MScriptUtil::MScriptUtil ( double &  value  ) 

Instantiate class with an double reference.

Parameters:
[in] value Reference to the value.

MScriptUtil::MScriptUtil ( unsigned int &  value  ) 

Instantiate class with an unsigned int reference.

Parameters:
[in] value Reference to the value.

MScriptUtil::MScriptUtil ( bool &  value  ) 

Instantiate class with an bool reference.

Parameters:
[in] value Reference to the value.

MScriptUtil::MScriptUtil ( MIntArray array  ) 

Instantiate class with an integer array.

Parameters:
[in] array Reference to the array.

MScriptUtil::MScriptUtil ( MDoubleArray array  ) 

Instantiate class with an double array.

Parameters:
[in] array Reference to the array.

MScriptUtil::MScriptUtil ( MUintArray array  ) 

Instantiate class with an unsigned integer array.

Parameters:
[in] array Reference to the array.

MScriptUtil::MScriptUtil ( MUint64Array array  ) 

Instantiate class with an unsigned integer array.

Parameters:
[in] array Reference to the array.


Member Function Documentation

void MScriptUtil::createFromInt ( int  x,
int  y = 0,
int  z = 0,
int  w = 0 
)

Create this object from 4 integers. Data already stored in this class will be cleared.

Parameters:
[in] x First integer value.
[in] y Second integer value.
[in] z Third integer value.
[in] w Fourth integer value.

void MScriptUtil::createFromDouble ( double  x,
double  y = 0,
double  z = 0,
double  w = 0 
)

Create this object from 4 doubles. Data already stored in this class will be cleared.

Parameters:
[in] x First double value.
[in] y Second double value.
[in] z Third double value.
[in] w Fourth double value.

int MScriptUtil::asInt (  ) 

Return the first item added to this object as an integer.

short MScriptUtil::asShort (  ) 

Return the first item added to this object as a short.

float MScriptUtil::asFloat (  ) 

Return the first item added to this object as a float.

double MScriptUtil::asDouble (  ) 

Return the first item added to this object as a double.

unsigned int MScriptUtil::asUint (  ) 

Return the first item added to this object as a unsigned integer.

bool MScriptUtil::asBool (  ) 

Return the first item added to this object as a bool.

int * MScriptUtil::asIntPtr (  ) 

Return an integer pointer to the data of this class.

NOTE: any previous pointer information returned by this object will be deleted.

short * MScriptUtil::asShortPtr (  ) 

Return a short pointer to the data of this class.

NOTE: any previous pointer information returned by this object will be deleted.

float * MScriptUtil::asFloatPtr (  ) 

Return a float pointer to the data of this class.

NOTE: any previous pointer information returned by this object will be deleted.

double * MScriptUtil::asDoublePtr (  ) 

Return a double pointer to the data of this class.

NOTE: any previous pointer information returned by this object will be deleted.

unsigned int * MScriptUtil::asUintPtr (  ) 

Return an unsigned integer pointer to the data of this class.

NOTE: any previous pointer information returned by this object will be deleted.

bool * MScriptUtil::asBoolPtr (  ) 

Return a bool pointer to the data of this class.

NOTE: any previous pointer information returned by this object will be deleted.

char * MScriptUtil::asCharPtr (  ) 

Return a char pointer to the data of this class.

NOTE: any previous pointer information returned by this object will be deleted.

unsigned char * MScriptUtil::asUcharPtr (  ) 

Return a unsigned char pointer to the data of this class.

NOTE: any previous pointer information returned by this object will be deleted.

Mint2 * MScriptUtil::asInt2Ptr (  ) 

Copy the data to a temporary array of the right type and return its address. Ensure that this object has been created with sufficient data.

Warning:
The data pointed to is only valid until the next call to any of the similar asType[234]Ptr methods.
Returns:
A pointer to an array of 2 int.

Mint3 * MScriptUtil::asInt3Ptr (  ) 

Copy the data to a temporary array of the right type and return its address. Ensure that this object has been created with sufficient data.

Warning:
The data pointed to is only valid until the next call to any of the similar asType[234]Ptr methods.
Returns:
A pointer to an array of 3 int.

Mint4 * MScriptUtil::asInt4Ptr (  ) 

Copy the data to a temporary array of the right type and return its address. Ensure that this object has been created with sufficient data.

Warning:
The data pointed to is only valid until the next call to any of the similar asType[234]Ptr methods.
Returns:
A pointer to an array of 4 int.

Mshort2 * MScriptUtil::asShort2Ptr (  ) 

Copy the data to a temporary array of the right type and return its address. Ensure that this object has been created with sufficient data.

Warning:
The data pointed to is only valid until the next call to any of the similar asType[234]Ptr methods.
Returns:
A pointer to an array of 2 short.

Mshort3 * MScriptUtil::asShort3Ptr (  ) 

Copy the data to a temporary array of the right type and return its address. Ensure that this object has been created with sufficient data.

Warning:
The data pointed to is only valid until the next call to any of the similar asType[234]Ptr methods.
Returns:
A pointer to an array of 3 short.

Mshort4 * MScriptUtil::asShort4Ptr (  ) 

Copy the data to a temporary array of the right type and return its address. Ensure that this object has been created with sufficient data.

Warning:
The data pointed to is only valid until the next call to any of the similar asType[234]Ptr methods.
Returns:
A pointer to an array of 4 short.

Mfloat2 * MScriptUtil::asFloat2Ptr (  ) 

Copy the data to a temporary array of the right type and return its address. Ensure that this object has been created with sufficient data.

Warning:
The data pointed to is only valid until the next call to any of the similar asType[234]Ptr methods.
Returns:
A pointer to an array of 2 float.

Mfloat3 * MScriptUtil::asFloat3Ptr (  ) 

Copy the data to a temporary array of the right type and return its address. Ensure that this object has been created with sufficient data.

Warning:
The data pointed to is only valid until the next call to any of the similar asType[234]Ptr methods.
Returns:
A pointer to an array of 3 float.

Mfloat4 * MScriptUtil::asFloat4Ptr (  ) 

Copy the data to a temporary array of the right type and return its address. Ensure that this object has been created with sufficient data.

Warning:
The data pointed to is only valid until the next call to any of the similar asType[234]Ptr methods.
Returns:
A pointer to an array of 4 float.

Mdouble2 * MScriptUtil::asDouble2Ptr (  ) 

Copy the data to a temporary array of the right type and return its address. Ensure that this object has been created with sufficient data.

Warning:
The data pointed to is only valid until the next call to any of the similar asType[234]Ptr methods.
Returns:
A pointer to an array of 2 double.

Mdouble3 * MScriptUtil::asDouble3Ptr (  ) 

Copy the data to a temporary array of the right type and return its address. Ensure that this object has been created with sufficient data.

Warning:
The data pointed to is only valid until the next call to any of the similar asType[234]Ptr methods.
Returns:
A pointer to an array of 3 double.

Mdouble4 * MScriptUtil::asDouble4Ptr (  ) 

Copy the data to a temporary array of the right type and return its address. Ensure that this object has been created with sufficient data.

Warning:
The data pointed to is only valid until the next call to any of the similar asType[234]Ptr methods.
Returns:
A pointer to an array of 4 double.

Muint2 * MScriptUtil::asUint2Ptr (  ) 

Copy the data to a temporary array of the right type and return its address. Ensure that this object has been created with sufficient data.

Warning:
The data pointed to is only valid until the next call to any of the similar asType[234]Ptr methods.
Returns:
A pointer to an array of 2 unsigned int.

Muint3 * MScriptUtil::asUint3Ptr (  ) 

Copy the data to a temporary array of the right type and return its address. Ensure that this object has been created with sufficient data.

Warning:
The data pointed to is only valid until the next call to any of the similar asType[234]Ptr methods.
Returns:
A pointer to an array of 3 unsigned int.

Muint4 * MScriptUtil::asUint4Ptr (  ) 

Copy the data to a temporary array of the right type and return its address. Ensure that this object has been created with sufficient data.

Warning:
The data pointed to is only valid until the next call to any of the similar asType[234]Ptr methods.
Returns:
A pointer to an array of 4 unsigned int.

void MScriptUtil::setInt ( int &  var,
int  value 
) [static]

Set an integer reference value.

Parameters:
[out] var Reference to the variable to be assigned.
[in] value Value to assign

void MScriptUtil::setShort ( short &  var,
int  value 
) [static]

Set a short reference value.

Parameters:
[out] var Reference to the variable to be assigned.
[in] value Value to assign

void MScriptUtil::setFloat ( float &  var,
double  value 
) [static]

Set a float reference value.

Parameters:
[out] var Reference to the variable to be assigned.
[in] value Value to assign

void MScriptUtil::setDouble ( double &  var,
double  value 
) [static]

Set a double reference value.

Parameters:
[out] var Reference to the variable to be assigned.
[in] value Value to assign

void MScriptUtil::setUint ( unsigned int &  var,
int  value 
) [static]

Set an unsigned integer reference value.

Parameters:
[out] var Reference to the variable to be assigned.
[in] value Value to assign

void MScriptUtil::setBool ( bool &  var,
int  value 
) [static]

Set a bool reference value.

Parameters:
[out] var Reference to the variable to be assigned.
[in] value Value to assign

void MScriptUtil::setChar ( char &  var,
int  value 
) [static]

Set a char reference value.

Parameters:
[out] var Reference to the variable to be assigned.
[in] value Value to assign

void MScriptUtil::setUchar ( unsigned char &  var,
int  value 
) [static]

Set an unsigned char reference value.

Parameters:
[out] var Reference to the variable to be assigned.
[in] value Value to assign

int MScriptUtil::getInt ( int &  var  )  [static]

Get the value of an integer reference.

Parameters:
[in] var Reference to the variable to return.

int MScriptUtil::getShort ( short &  var  )  [static]

Get the value of a short reference.

Parameters:
[in] var Reference to the variable to return.

double MScriptUtil::getFloat ( float &  var  )  [static]

Get the values of a float reference.

Parameters:
[in] var Reference to the variable to return.

double MScriptUtil::getDouble ( double &  var  )  [static]

Get the value of a double reference.

Parameters:
[in] var Reference to the variable to return.

int MScriptUtil::getUint ( unsigned int &  var  )  [static]

Get the values of an unsigned int reference.

Parameters:
[in] var Reference to the variable to return.

int MScriptUtil::getBool ( bool &  var  )  [static]

Get the value of a bool reference.

int MScriptUtil::getChar ( char &  var  )  [static]

Get the value of a char reference.

Parameters:
[in] var Reference to the variable to return.

int MScriptUtil::getUchar ( unsigned char &  var  )  [static]

Get the value of an unsigned char reference.

Parameters:
[in] var Reference to the variable to return.

bool MScriptUtil::setIntArray ( int *  var,
unsigned int  index,
int  value 
) [static]

Set an integer value in an array. Ensure that index is valid before calling this method.

Parameters:
[out] var Array to assign to.
[in] index Index of the element to be modified.
[in] value New value to be assigned.
Returns:
True on success, false otherwise.

bool MScriptUtil::setShortArray ( short *  var,
unsigned int  index,
int  value 
) [static]

Set a short value in an array. Ensure that index is valid before calling this method.

Parameters:
[out] var Array to assign to.
[in] index Index of the element to be modified.
[in] value New value to be assigned.
Returns:
True on success, false otherwise.

bool MScriptUtil::setFloatArray ( float *  var,
unsigned int  index,
double  value 
) [static]

Set a float value in an array. Ensure that index is valid before calling this method.

Parameters:
[out] var Array to assign to.
[in] index Index of the element to be modified.
[in] value New value to be assigned.
Returns:
True on success, false otherwise.

bool MScriptUtil::setDoubleArray ( double *  var,
unsigned int  index,
double  value 
) [static]

Set a double value in an array. Ensure that index is valid before calling this method.

Parameters:
[out] var Array to assign to.
[in] index Index of the element to be modified.
[in] value New value to be assigned.
Returns:
True on success, false otherwise.

bool MScriptUtil::setUintArray ( unsigned int *  var,
unsigned int  index,
int  value 
) [static]

Set an unsigned integer value in an array. Ensure that index is valid before calling this method.

Parameters:
[out] var Array to assign to.
[in] index Index of the element to be modified.
[in] value New value to be assigned.
Returns:
True on success, false otherwise.

bool MScriptUtil::setBoolArray ( bool *  var,
unsigned int  index,
int  value 
) [static]

Set a bool value in an array. Ensure that index is valid before calling this method.

Parameters:
[out] var Array to assign to.
[in] index Index of the element to be modified.
[in] value New value to be assigned.
Returns:
True on success, false otherwise.

bool MScriptUtil::setCharArray ( char *  var,
unsigned int  index,
int  value 
) [static]

Set a char value in an array. Ensure that index is valid before calling this method.

Parameters:
[out] var Array to assign to.
[in] index Index of the element to be modified.
[in] value New value to be assigned.
Returns:
True on success, false otherwise.

bool MScriptUtil::setUcharArray ( unsigned char *  var,
unsigned int  index,
int  value 
) [static]

Set an unsigned char value in an array. Ensure that index is valid before calling this method.

Parameters:
[out] var Array to assign to.
[in] index Index of the element to be modified.
[in] value New value to be assigned.
Returns:
True on success, false otherwise.

int MScriptUtil::getIntArrayItem ( int *  var,
unsigned int  index 
) [static]

Get a int value from an array. Ensure that index is valid before calling this method.

Parameters:
[in] var Array to read from.
[in] index Index of the element to be returned.
Returns:
Value of the element.

int MScriptUtil::getShortArrayItem ( short *  var,
unsigned int  index 
) [static]

Get a short value from an array. Ensure that index is valid before calling this method.

Parameters:
[in] var Array to read from.
[in] index Index of the element to be returned.
Returns:
Value of the element.

double MScriptUtil::getFloatArrayItem ( float *  var,
unsigned int  index 
) [static]

Get a float value from an array. Ensure that index is valid before calling this method.

Parameters:
[in] var Array to read from.
[in] index Index of the element to be returned.
Returns:
Value of the element.

double MScriptUtil::getDoubleArrayItem ( double *  var,
unsigned int  index 
) [static]

Get a double value from an array. Ensure that index is valid before calling this method.

Parameters:
[in] var Array to read from.
[in] index Index of the element to be returned.
Returns:
Value of the element.

int MScriptUtil::getUintArrayItem ( unsigned int *  var,
unsigned int  index 
) [static]

Get an unsigned value from an array. Ensure that index is valid before calling this method.

Parameters:
[in] var Array to read from.
[in] index Index of the element to be returned.
Returns:
Value of the element.

int MScriptUtil::getBoolArrayItem ( bool *  var,
unsigned int  index 
) [static]

Get a bool value from an array. Ensure that index is valid before calling this method.

Parameters:
[in] var Array to read from.
[in] index Index of the element to be returned.
Returns:
Value of the element.

int MScriptUtil::getCharArrayItem ( char *  var,
unsigned int  index 
) [static]

Get a char value from an array. Ensure that index is valid before calling this method.

Parameters:
[in] var Array to read from.
[in] index Index of the element to be returned.
Returns:
Value of the element.

int MScriptUtil::getUcharArrayItem ( unsigned char *  var,
unsigned int  index 
) [static]

Get an unsigned char value from an array. Ensure that index is valid before calling this method.

Parameters:
[in] var Array to read from.
[in] index Index of the element to be returned.
Returns:
Value of the element.

int MScriptUtil::getInt2ArrayItem ( int(*)  var[2],
unsigned int  r,
unsigned int  c 
) [static]

Get a value from the two dimensional array. Ensure that indicies are valid before calling this method.

Parameters:
[in] var Array to read from.
[in] r First index in the array.
[in] c Second index in the array.
Returns:
Value of the element: var[r][c]

bool MScriptUtil::setInt2ArrayItem ( int(*)  var[2],
unsigned int  r,
unsigned int  c,
int  value 
) [static]

Set a value in the two dimensional array. Ensure that indices are valid before calling this method.

Parameters:
[in] var Array to assign to.
[in] r First index in the array.
[in] c Second index in the array.
Returns:
True on success, false otherwise.

int MScriptUtil::getInt3ArrayItem ( int(*)  var[3],
unsigned int  r,
unsigned int  c 
) [static]

Get a value from the three dimensional array. Ensure that indicies are valid before calling this method.

Parameters:
[in] var Array to read from.
[in] r First index in the array.
[in] c Second index in the array.
Returns:
Value of the element: var[r][c]

bool MScriptUtil::setInt3ArrayItem ( int(*)  var[3],
unsigned int  r,
unsigned int  c,
int  value 
) [static]

Set a value in the three dimensional array. Ensure that indices are valid before calling this method.

Parameters:
[in] var Array to assign to.
[in] r First index in the array.
[in] c Second index in the array.
Returns:
True on success, false otherwise.

int MScriptUtil::getInt4ArrayItem ( int(*)  var[4],
unsigned int  r,
unsigned int  c 
) [static]

Get a value from the four dimensional array. Ensure that indicies are valid before calling this method.

Parameters:
[in] var Array to read from.
[in] r First index in the array.
[in] c Second index in the array.
Returns:
Value of the element: var[r][c]

bool MScriptUtil::setInt4ArrayItem ( int(*)  var[4],
unsigned int  r,
unsigned int  c,
int  value 
) [static]

Set a value in the four dimensional array. Ensure that indices are valid before calling this method.

Parameters:
[in] var Array to assign to.
[in] r First index in the array.
[in] c Second index in the array.
Returns:
True on success, false otherwise.

short MScriptUtil::getShort2ArrayItem ( short(*)  var[2],
unsigned int  r,
unsigned int  c 
) [static]

Get a value from the two dimensional array. Ensure that indicies are valid before calling this method.

Parameters:
[in] var Array to read from.
[in] r First index in the array.
[in] c Second index in the array.
Returns:
Value of the element: var[r][c]

bool MScriptUtil::setShort2ArrayItem ( short(*)  var[2],
unsigned int  r,
unsigned int  c,
short  value 
) [static]

Set a value in the two dimensional array. Ensure that indices are valid before calling this method.

Parameters:
[in] var Array to assign to.
[in] r First index in the array.
[in] c Second index in the array.
Returns:
True on success, false otherwise.

short MScriptUtil::getShort3ArrayItem ( short(*)  var[3],
unsigned int  r,
unsigned int  c 
) [static]

Get a value from the three dimensional array. Ensure that indicies are valid before calling this method.

Parameters:
[in] var Array to read from.
[in] r First index in the array.
[in] c Second index in the array.
Returns:
Value of the element: var[r][c]

bool MScriptUtil::setShort3ArrayItem ( short(*)  var[3],
unsigned int  r,
unsigned int  c,
short  value 
) [static]

Set a value in the three dimensional array. Ensure that indices are valid before calling this method.

Parameters:
[in] var Array to assign to.
[in] r First index in the array.
[in] c Second index in the array.
Returns:
True on success, false otherwise.

short MScriptUtil::getShort4ArrayItem ( short(*)  var[4],
unsigned int  r,
unsigned int  c 
) [static]

Get a value from the four dimensional array. Ensure that indicies are valid before calling this method.

Parameters:
[in] var Array to read from.
[in] r First index in the array.
[in] c Second index in the array.
Returns:
Value of the element: var[r][c]

bool MScriptUtil::setShort4ArrayItem ( short(*)  var[4],
unsigned int  r,
unsigned int  c,
short  value 
) [static]

Set a value in the two dimensional array. Ensure that indices are valid before calling this method.

Parameters:
[in] var Array to assign to.
[in] r First index in the array.
[in] c Second index in the array.
Returns:
True on success, false otherwise.

float MScriptUtil::getFloat2ArrayItem ( float(*)  var[2],
unsigned int  r,
unsigned int  c 
) [static]

Get a value from the two dimensional array. Ensure that indicies are valid before calling this method.

Parameters:
[in] var Array to read from.
[in] r First index in the array.
[in] c Second index in the array.
Returns:
Value of the element: var[r][c]

bool MScriptUtil::setFloat2ArrayItem ( float(*)  var[2],
unsigned int  r,
unsigned int  c,
float  value 
) [static]

Set a value in the two dimensional array. Ensure that indices are valid before calling this method.

Parameters:
[in] var Array to assign to.
[in] r First index in the array.
[in] c Second index in the array.
Returns:
True on success, false otherwise.

float MScriptUtil::getFloat3ArrayItem ( float(*)  var[3],
unsigned int  r,
unsigned int  c 
) [static]

Get a value from the three dimensional array. Ensure that indicies are valid before calling this method.

Parameters:
[in] var Array to read from.
[in] r First index in the array.
[in] c Second index in the array.
Returns:
Value of the element: var[r][c]

bool MScriptUtil::setFloat3ArrayItem ( float(*)  var[3],
unsigned int  r,
unsigned int  c,
float  value 
) [static]

Set a value in the three dimensional array. Ensure that indices are valid before calling this method.

Parameters:
[in] var Array to assign to.
[in] r First index in the array.
[in] c Second index in the array.
Returns:
True on success, false otherwise.

float MScriptUtil::getFloat4ArrayItem ( float(*)  var[4],
unsigned int  r,
unsigned int  c 
) [static]

Get a value from the four dimensional array. Ensure that indicies are valid before calling this method.

Parameters:
[in] var Array to read from.
[in] r First index in the array.
[in] c Second index in the array.
Returns:
Value of the element: var[r][c]

bool MScriptUtil::setFloat4ArrayItem ( float(*)  var[4],
unsigned int  r,
unsigned int  c,
float  value 
) [static]

Set a value in the four dimensional array. Ensure that indices are valid before calling this method.

Parameters:
[in] var Array to assign to.
[in] r First index in the array.
[in] c Second index in the array.
Returns:
True on success, false otherwise.

double MScriptUtil::getDouble2ArrayItem ( double(*)  var[2],
unsigned int  r,
unsigned int  c 
) [static]

Get a value from the two dimensional array. Ensure that indicies are valid before calling this method.

Parameters:
[in] var Array to read from.
[in] r First index in the array.
[in] c Second index in the array.
Returns:
Value of the element: var[r][c]

bool MScriptUtil::setDouble2ArrayItem ( double(*)  var[2],
unsigned int  r,
unsigned int  c,
double  value 
) [static]

Set a value in the two dimensional array. Ensure that indices are valid before calling this method.

Parameters:
[in] var Array to assign to.
[in] r First index in the array.
[in] c Second index in the array.
Returns:
True on success, false otherwise.

double MScriptUtil::getDouble3ArrayItem ( double(*)  var[3],
unsigned int  r,
unsigned int  c 
) [static]

Get a value from the three dimensional array. Ensure that indicies are valid before calling this method.

Parameters:
[in] var Array to read from.
[in] r First index in the array.
[in] c Second index in the array.
Returns:
Value of the element: var[r][c]

bool MScriptUtil::setDouble3ArrayItem ( double(*)  var[3],
unsigned int  r,
unsigned int  c,
double  value 
) [static]

Set a value in the three dimensional array. Ensure that indices are valid before calling this method.

Parameters:
[in] var Array to assign to.
[in] r First index in the array.
[in] c Second index in the array.
Returns:
True on success, false otherwise.

double MScriptUtil::getDouble4ArrayItem ( double(*)  var[4],
unsigned int  r,
unsigned int  c 
) [static]

Get a value from the four dimensional array. Ensure that indicies are valid before calling this method.

Parameters:
[in] var Array to read from.
[in] r First index in the array.
[in] c Second index in the array.
Returns:
Value of the element: var[r][c]

bool MScriptUtil::setDouble4ArrayItem ( double(*)  var[4],
unsigned int  r,
unsigned int  c,
double  value 
) [static]

Set a value in the four dimensional array. Ensure that indices are valid before calling this method.

Parameters:
[in] var Array to assign to.
[in] r First index in the array.
[in] c Second index in the array.
Returns:
True on success, false otherwise.

unsigned int MScriptUtil::getUint2ArrayItem ( unsigned int(*)  var[2],
unsigned int  r,
unsigned int  c 
) [static]

Get a value from the two dimensional array. Ensure that indicies are valid before calling this method.

Parameters:
[in] var Array to read from.
[in] r First index in the array.
[in] c Second index in the array.
Returns:
Value of the element: var[r][c]

bool MScriptUtil::setUint2ArrayItem ( unsigned int(*)  var[2],
unsigned int  r,
unsigned int  c,
unsigned int  value 
) [static]

Set a value in the two dimensional array. Ensure that indices are valid before calling this method.

Parameters:
[in] var Array to assign to.
[in] r First index in the array.
[in] c Second index in the array.
Returns:
True on success, false otherwise.

unsigned int MScriptUtil::getUint3ArrayItem ( unsigned int(*)  var[3],
unsigned int  r,
unsigned int  c 
) [static]

Get a value from the three dimensional array. Ensure that indicies are valid before calling this method.

Parameters:
[in] var Array to read from.
[in] r First index in the array.
[in] c Second index in the array.
Returns:
Value of the element: var[r][c]

bool MScriptUtil::setUint3ArrayItem ( unsigned int(*)  var[3],
unsigned int  r,
unsigned int  c,
unsigned int  value 
) [static]

Set a value in the three dimensional array. Ensure that indices are valid before calling this method.

Parameters:
[in] var Array to assign to.
[in] r First index in the array.
[in] c Second index in the array.
Returns:
True on success, false otherwise.

unsigned int MScriptUtil::getUint4ArrayItem ( unsigned int(*)  var[4],
unsigned int  r,
unsigned int  c 
) [static]

Get a value from the four dimensional array. Ensure that indicies are valid before calling this method.

Parameters:
[in] var Array to read from.
[in] r First index in the array.
[in] c Second index in the array.
Returns:
Value of the element: var[r][c]

bool MScriptUtil::setUint4ArrayItem ( unsigned int(*)  var[4],
unsigned int  r,
unsigned int  c,
unsigned int  value 
) [static]

Set a value in the four dimensional array. Ensure that indices are valid before calling this method.

Parameters:
[in] var Array to assign to.
[in] r First index in the array.
[in] c Second index in the array.
Returns:
True on success, false otherwise.


Autodesk® Maya® 2009 © 1997-2008 Autodesk, Inc. All rights reserved. Generated with doxygen 1.5.6