TorqueScript Reference

- Main Page
- Related Pages
- Modules
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
ImageAsset Class Reference

Inherits AssetBase.

## Public Member Functions
Boolean | addExplicitCell (int cellOffsetX, int cellOffsetY, int cellWidth, int cellHeight, string cellName)
Boolean | clearExplicitCells ()
Integer | getCellCountX ()
Integer | getCellCountY ()
Integer | getCellHeight ()
Integer | getCellOffsetX ()
Integer | getCellOffsetY ()
Boolean | getCellRowOrder ()
Integer | getCellStrideX ()
Integer | getCellStrideY ()
Integer | getCellWidth ()
Integer | getExplicitCellCount ()
Integer | getExplicitCellHeight (cell)
Integer | getExplicitCellIndex (cellName)
String | getExplicitCellName (cell)
String | getExplicitCellOffset (cell)
Integer | getExplicitCellWidth (cell)
String | getFilterMode ()
Boolean | getForce16Bit ()
Integer | getFrameCount ()
String | getFrameSize (int frame)
String | getImageFile ()
Integer | getImageHeight ()
String | getImageSize ()
Integer | getImageWidth ()
Boolean | getIsImagePOT ()
Boolean | insertExplicitCell (int cellIndex, int cellOffsetX, int cellOffsetY, int cellWidth, int cellHeight, string cellName)
Boolean | 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)
Boolean | setExplicitCell (int cellIndex, int cellOffsetX, int cellOffsetY, int cellWidth, int cellHeight, string cellName)
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
Integer | clone ([copyDynamicFields=false]?)
void | delete ()
Integer | getId ()
void | setName (newName)
String | getName ()
String | getClassNamespace ()
String | getSuperClassNamespace ()
void | setClassNamespace (nameSpace)
void | setSuperClassNamespace ()
Boolean | isMethod (string methodName)
String | call (methodName, [args]*)
void | dumpClassHierarchy ()
void | dump ()
Boolean | isMemberOfClass (string classname)
String | getClassName ()
String | getFieldValue (fieldName)
Boolean | setFieldValue (fieldName, value)
Integer | getDynamicFieldCount ()
String | getDynamicField (index)
Integer | getFieldCount ()
String | getField (int index)
void | setProgenitorFile (file)
String | getProgenitorFile ()
Integer | getType ()
String | getFieldType (fieldName)
void | setInternalName (string InternalName)
String | getInternalName ()
Boolean | isChildOfGroup (groupID)
Integer | getGroup ()
Boolean | startTimer (callbackFunction, float timePeriod, [repeat]?)
void | stopTimer ()
Boolean | isTimerActive ()
Integer | schedule (time, command, [arg]*)
Boolean | save (fileName, [selectedOnly]?)
void | addFieldFilter (fieldName)
void | removeFieldFilter (fieldName)

## Member Function Documentation

Boolean addExplicitCell | ( | int | cellOffsetX,
|  | int | cellOffsetY,
|  | int | cellWidth,
|  | int | cellHeight,
|  | string | cellName
| ) |  |

Add an explicit cell.

Parameters

  cellOffsetX | The offset in the X axis to the top-left of the cell.
  cellOffsetY | The offset in the Y axis to the top-left of the cell.
  cellWidth | The width of the cell.
  cellHeight | The height of the cell.
  cellName | The name of the cell's region. The image asset must be in explicit mode for this operation to succeed.

Returns
  Whether the operation was successful or not.

Boolean 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.

Integer getCellCountX | ( |  | ) |

Gets the CELL count X.

Returns
  The CELL count X.

Integer getCellCountY | ( |  | ) |

Gets the CELL count Y.

Returns
  The CELL count Y.

Integer getCellHeight | ( |  | ) |

Gets the CELL height.

Returns
  The CELL height.

Integer getCellOffsetX | ( |  | ) |

Gets the CELL offset X.

Returns
  The CELL offset X.

Integer getCellOffsetY | ( |  | ) |

Gets the CELL offset Y.

Returns
  The CELL offset Y.

Boolean getCellRowOrder | ( |  | ) |

Gets whether CELL row order should be used or not.

Returns
  Whether CELL row order should be used or not.

Integer getCellStrideX | ( |  | ) |

Gets the CELL stride X.

Returns
  The CELL stride X.

Integer getCellStrideY | ( |  | ) |

Gets the CELL stride Y.

Returns
  The CELL stride Y.

Integer getCellWidth | ( |  | ) |

Gets the CELL width.

Returns
  The CELL width.

Integer getExplicitCellCount | ( |  | ) |

Gets the explicit cell count.

Returns
  The explicit cell count.

Integer getExplicitCellHeight | ( | cell |  | ) |

Gets the CELL height in Explicit Mode.

Parameters

  cell | The cell index or cell name to use to find the specific height.

Returns
  The specified CELL height.

Integer getExplicitCellIndex | ( | cellName |  | ) |

Gets the CELL index number in Explicit Mode.

Parameters

  cellName | The cell name to use to find the specific index.

Returns
  The specified CELL index number.

String getExplicitCellName | ( | cell |  | ) |

Gets the CELL region name in Explicit Mode.

Parameters

  cell | The cell index to use to find the specific name.

Returns
  The specified CELL region name.

String getExplicitCellOffset | ( | cell |  | ) |

Gets the CELL offset in Explicit Mode.

Parameters

  cell | The cell index or cell name to use to find the specific offset.

Returns
  The specified CELL width.

Integer getExplicitCellWidth | ( | cell |  | ) |

Gets the CELL width in Explicit Mode.

Parameters

  cell | The cell index or cell name to use to find the specific width.

Returns
  The specified CELL width.

String getFilterMode | ( |  | ) |

Gets the filter mode.

Returns
  The filter mode.

Boolean getForce16Bit | ( |  | ) |

Gets whether 16-bit image is forced or not.

Returns
  Whether 16-bit image is forced or not.

Integer getFrameCount | ( |  | ) |

Gets the frame count.

Returns
  The frame count.

String getFrameSize | ( | int | frame | ) |

Gets the specified frames size.

Parameters

  frame | The frame number to use.

Returns
  The specified frames size.

String getImageFile | ( |  | ) |

Gets the image file.

Returns
  Returns the bitmap image file.

Integer getImageHeight | ( |  | ) |

Gets the image height.

Returns
  The image width.

String getImageSize | ( |  | ) |

Gets the image size.

Returns
  The image size.

Integer getImageWidth | ( |  | ) |

Gets the image width.

Returns
  The image width.

Boolean 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.

Boolean insertExplicitCell | ( | int | cellIndex,
|  | int | cellOffsetX,
|  | int | cellOffsetY,
|  | int | cellWidth,
|  | int | cellHeight,
|  | string | cellName
| ) |  |

Insert an explicit cell at the specified index.

Parameters

  cellIndex | The 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.
  cellOffsetX | The offset in the X axis to the top-left of the cell.
  cellOffsetY | The offset in the Y axis to the top-left of the cell.
  cellWidth | The width of the cell.
  cellHeight | The height of the cell.
  cellName | The name of the cell's region. The image asset must be in explicit mode for this operation to succeed.

Returns
  Whether the operation was successful or not.

Boolean removeExplicitCell | ( | int | cellIndex | ) |

Remove an explicit cell from the specified index.

Parameters

  cellIndex | The 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.

Boolean setExplicitCell | ( | int | cellIndex,
|  | int | cellOffsetX,
|  | int | cellOffsetY,
|  | int | cellWidth,
|  | int | cellHeight,
|  | string | cellName
| ) |  |

Set an explicit cell at the specified index.

Parameters

  cellIndex | The zero-based index to set the cell.
  cellOffsetX | The offset in the X axis to the top-left of the cell.
  cellOffsetY | The offset in the Y axis to the top-left of the cell.
  cellWidth | The width of the cell.
  cellHeight | The height of the cell.
  cellName | The name of the cell's region. 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.