TorqueScript Reference
Public Member Functions | List of all members
ImageAsset Class Reference

Inherits AssetBase.

Public Member Functions

bool addExplicitCell (int cellOffsetX, int cellOffsetY, int cellWidth, int cellHeight)
 
bool clearExplicitCells ()
 
int getCellCountX ()
 
int getCellCountY ()
 
int getCellHeight ()
 
int getCellOffsetX ()
 
int getCellOffsetY ()
 
bool getCellRowOrder ()
 
int getCellStrideX ()
 
int getCellStrideY ()
 
int getCellWidth ()
 
int getExplicitCellCount ()
 
string getFilterMode ()
 
bool getForce16Bit ()
 
int getFrameCount ()
 
string getFrameSize (int frame)
 
string getImageFile ()
 
int getImageHeight ()
 
string getImageSize ()
 
int getImageWidth ()
 
bool getIsImagePOT ()
 
bool insertExplicitCell (int cellIndex, int cellOffsetX, int cellOffsetY, int cellWidth, int cellHeight)
 
bool removeExplicitCell (int cellIndex)
 
void setCellCountX (countX)
 
void setCellCountY (countY)
 
void setCellHeight (Height)
 
void setCellOffsetX (offsetX)
 
void setCellOffsetY (offsetY)
 
void setCellRowOrder (rowOrder?)
 
void setCellStrideX (strideX)
 
void setCellStrideY (strideY)
 
void setCellWidth (Width)
 
bool setExplicitCell (int cellIndex, int cellOffsetX, int cellOffsetY, int cellWidth, int cellHeight)
 
void setFilterMode (mode)
 
void setForce16Bit (force16Bit?)
 
void setImageFile (ImageFile)
 
- Public Member Functions inherited from AssetBase
string getAssetId ()
 
void refreshAsset ()
 
- Public Member Functions inherited from SimObject
string call (functionName,[args]*)
 
int clone ([bool copyDynamicFields?=false]?)
 
void delete ()
 
void dump ()
 
void dumpClassHierarchy ()
 
const char * getClassName ()
 
string getClassNamespace ()
 
string getDynamicField (index)
 
int getDynamicFieldCount ()
 
string getField (int index)
 
int getFieldCount ()
 
const char * getFieldType (fieldName)
 
const char * getFieldValue (fieldName)
 
int getGroup ()
 
int getId ()
 
string getInternalName ()
 
const char * getName ()
 
string getProgenitorFile ()
 
string getSuperClassNamespace ()
 
int getType ()
 
bool isChildOfGroup ()
 
bool isMemberOfClass (string classname)
 
bool isMethod (const char *methodName)
 
bool isMethod (string method name)
 
bool isTimerActive ()
 
bool save (fileName,[selectedOnly]?)
 
int schedule (time, command,[arg]*)
 
void setClassNamespace ()
 
bool setFieldValue (fieldName, value)
 
void setInternalName (string InternalName)
 
void setName (newName)
 
void setProgenitorFile (file)
 
void setSuperClassNamespace ()
 
bool startTimer (callbackFunction, float timePeriod,[repeat]?)
 
void stopTimer ()
 

Additional Inherited Members

- Static Public Member Functions inherited from SimObject
static S32 QSORT_CALLBACK compareFields (const void *a, const void *b)
 

Member Function Documentation

bool addExplicitCell ( int  cellOffsetX,
int  cellOffsetY,
int  cellWidth,
int  cellHeight 
)

Add an explicit cell.

Parameters
cellOffsetXThe offset in the X axis to the top-left of the cell.
cellOffsetYThe offset in the Y axis to the top-left of the cell.
cellWidthThe width of the cell.
cellHeightThe height of the cell. The image asset must be in explicit mode for this operation to succeed.
Returns
Whether the operation was successful or not.
bool clearExplicitCells ( )

Clears all explicit cells. The image asset stays in explicit mode however with no explicit cells a single full-frame cell becomes default.

Returns
Whether the operation was successful or not.
int getCellCountX ( )

Gets the CELL count X.

Returns
The CELL count X.
int getCellCountY ( )

Gets the CELL count Y.

Returns
The CELL count Y.
int getCellHeight ( )

Gets the CELL height.

Returns
The CELL height.
int getCellOffsetX ( )

Gets the CELL offset X.

Returns
The CELL offset X.
int getCellOffsetY ( )

Gets the CELL offset Y.

Returns
The CELL offset Y.
bool getCellRowOrder ( )

Gets whether CELL row order should be used or not.

Returns
Whether CELL row order should be used or not.
int getCellStrideX ( )

Gets the CELL stride X.

Returns
The CELL stride X.
int getCellStrideY ( )

Gets the CELL stride Y.

Returns
The CELL stride Y.
int getCellWidth ( )

Gets the CELL width.

Returns
The CELL width.
int getExplicitCellCount ( )

Gets the explicit cell count.

Returns
The explicit cell count.
string getFilterMode ( )

Gets the filter mode.

Returns
The filter mode.
bool getForce16Bit ( )

Gets whether 16-bit image is forced or not.

Returns
Whether 16-bit image is forced or not.
int getFrameCount ( )

Gets the frame count.

Returns
The frame count.
string getFrameSize ( int  frame)

Gets the specified frames size.

Parameters
frameThe frame number to use.
Returns
The specified frames size.
string getImageFile ( )

Gets the image file.

Returns
Returns the bitmap image file.
int getImageHeight ( )

Gets the image height.

Returns
The image width.
string getImageSize ( )

Gets the image size.

Returns
The image size.
int getImageWidth ( )

Gets the image width.

Returns
The image width.
bool getIsImagePOT ( )

Gets whether the image has a power-of-two dimensions or not.

Returns
Whether the image has a power-of-two dimensions or not.
bool insertExplicitCell ( int  cellIndex,
int  cellOffsetX,
int  cellOffsetY,
int  cellWidth,
int  cellHeight 
)

Insert an explicit cell at the specified index.

Parameters
cellIndexThe zero-based index to insert the cell. This will work when no cells are present. If the index is beyond the cell count then the cell is simply added.
cellOffsetXThe offset in the X axis to the top-left of the cell.
cellOffsetYThe offset in the Y axis to the top-left of the cell.
cellWidthThe width of the cell.
cellHeightThe height of the cell. The image asset must be in explicit mode for this operation to succeed.
Returns
Whether the operation was successful or not.
bool removeExplicitCell ( int  cellIndex)

Remove an explicit cell from the specified index.

Parameters
cellIndexThe zero-based index to remove the cell from.
Returns
Whether the operation was successful or not.
void setCellCountX ( countX  )

Sets the CELL count X.

Returns
No return value.
void setCellCountY ( countY  )

Sets the CELL count Y.

Returns
No return value.
void setCellHeight ( Height  )

Sets the CELL height.

Returns
No return value.
void setCellOffsetX ( offsetX  )

Sets the CELL offset X.

Returns
No return value.
void setCellOffsetY ( offsetY  )

Sets the CELL offset Y.

Returns
No return value.
void setCellRowOrder ( rowOrder?  )

Sets whether CELL row order should be used or not.

Returns
No return value.
void setCellStrideX ( strideX  )

Sets the CELL stride X.

Returns
No return value.
void setCellStrideY ( strideY  )

Sets the CELL stride Y.

Returns
No return value.
void setCellWidth ( Width  )

Sets the CELL width.

Returns
No return value.
bool setExplicitCell ( int  cellIndex,
int  cellOffsetX,
int  cellOffsetY,
int  cellWidth,
int  cellHeight 
)

Set an explicit cell at the specified index.

Parameters
cellIndexThe zero-based index to insert the cell. This will work when no cells are present. If the index is beyond the cell count then the cell is simply added.
cellOffsetXThe offset in the X axis to the top-left of the cell.
cellOffsetYThe offset in the Y axis to the top-left of the cell.
cellWidthThe width of the cell.
cellHeightThe height of the cell. The image asset must be in explicit mode for this operation to succeed.
Returns
Whether the operation was successful or not.
void setFilterMode ( mode  )

Sets the filter mode.

Returns
No return value.
void setForce16Bit ( force16Bit?  )

Sets whether 16-bit image is forced or not.

Returns
No return value.
void setImageFile ( ImageFile  )

Sets the image file (bitmap file).

Returns
No return value.