| Python Script Engine 8.3 GL Studio Editor Python Script API

Public Types | Public Member Functions | Static Public Member Functions | List of all members
GlsOdometer Class Reference
Inheritance diagram for GlsOdometer:

## Public Types
enum | GlsOdometerBehaviorType_e { BEHAVIOR_ANALOG =0 , BEHAVIOR_DIGITAL }
enum | GlsOdometerGeometryType_e { GEOMETRY_2D =0 , GEOMETRY_3D }
Public Types inherited from DisplayObject
enum | MemberAccess_e { PUBLIC , PRIVATE , PROTECTED }
enum | PickableType_e { UNPICKABLE , FIRST_PICK , BEST_PICK , ALWAYS_PICK }
enum | PolygonClose_e { POLY_OPEN , POLY_CLOSED }
enum | PolygonMode_e { POLY_MODE_UNDEFINED , POLY_MODE_POINTS , POLY_MODE_OUTLINE , POLY_MODE_FILLED , POLY_MODE_FILL_AND_OUTLINE }
enum | ShadingType_e { SHADING_FLAT , SHADING_GOURAUD }
enum | TextureMap_e { TEXTURE_MAP_MODULATE , TEXTURE_MAP_DECAL , TEXTURE_MAP_BLEND , TEXTURE_MAP_REPLACE }
enum | TextureFilter_e { TEXTURE_FILTER_NEAREST , TEXTURE_FILTER_LINEAR , TEXTURE_FILTER_NEAREST_MIPMAP_NEAREST , TEXTURE_FILTER_LINEAR_MIPMAP_LINEAR , TEXTURE_FILTER_NEAREST_MIPMAP_LINEAR , TEXTURE_FILTER_LINEAR_MIPMAP_NEAREST }
enum | TessellateType_e { TESSELLATE_UNION , TESSELLATE_INTERSECT , TESSELLATE_DIFFERENCE }
enum | RotationAxis_e { X_AXIS , Y_AXIS , Z_AXIS }
enum | LineStyle_e { SOLID_LINE_STYLE , SMALL_DOTTED_LINE_STYLE , DOTTED_LINE_STYLE , DASHED_LINE_STYLE , DOT_DASHED_LINE_STYLE , SMALL_DASHED_LINE_STYLE }
enum | AlphaMode_e { ALPHA_MODE_UNDEFINED , ALPHA_MODE_OPAQUE , ALPHA_MODE_2_LEVEL , ALPHA_MODE_256_LEVEL }

## Public Member Functions
float | GetInitalValue ()
void | SetInitalValue (float val)
| GlsOdometer ()
| GlsOdometer (DisplayObjectArray *objs)
void | SetMinValue (float val)
float | GetMinValue ()
void | SetMaxValue (float val)
float | GetMaxValue ()
void | SetInitialValue (float val)
float | GetInitialValue ()
void | SetBaseSystem (int val)
int | GetBaseSystem ()
void | BehaviorType (GlsOdometerBehaviorType_e value)
GlsOdometerBehaviorType_e | BehaviorType ()
void | GeometryType (GlsOdometerGeometryType_e value)
GlsOdometerGeometryType_e | GeometryType ()
void | TextureScaleOverride (bool &value)
bool | TextureScaleOverride ()
void | TextureScale (float &value)
float | TextureScale ()
void | DegreesPerDigitOverride (bool &value)
bool | DegreesPerDigitOverride ()
void | DegreesPerDigit (float &value)
float | DegreesPerDigit ()
int | OrderOfMagnitude ()
float | RolloverThreshold ()
int | NumberOfWheels ()
Public Member Functions inherited from Group
| Group ()
| Group (DisplayObjectArray *objs)
void | Ungroup ()
void | InsertObject (DisplayObject *obj, bool reparent=true, bool recalculateBoundingbox=true, int loc=DEFAULT_GROUP_LOCATION, bool renameName=false)
void | InsertObjectAllowDuplicateNames (DisplayObject *obj, bool reparent=true, bool recalculateBoundingbox=true, int loc=DEFAULT_GROUP_LOCATION)
void | MoveObjectToGroup (DisplayObject *obj, bool recalculateBoundingbox=true, int loc=DEFAULT_GROUP_LOCATION, bool renameName=false)
void | MoveObjectToGroupAllowDuplicateNames (DisplayObject *obj, bool recalculateBoundingbox=true, int loc=DEFAULT_GROUP_LOCATION)
void | ReorderObject (unsigned int oldIndex, unsigned int newIndex)
DisplayObjectArray * | GetObjectList ()
DisplayObject * | GetObjectByIndex (unsigned int index)
unsigned int | Count ()
void | CalculateTextureCoordinates (void)
void | SetGroupLocation (Vertex &v)
void | CalculateBoundingBox ()
unsigned int | GetCount ()
Public Member Functions inherited from DisplayObject
bool | isNULL ()
String | GetName ()
String | SetName (String name)
void | SetProtectionMode (DisplayObject::MemberAccess_e mode)
DisplayObject::MemberAccess_e | GetProtectionMode (void)
void | SetLocked (bool val)
bool | GetLocked (void)
bool | GetGenerateMemberVariable ()
void | SetGenerateMemberVariable (bool b)
bool | GetAntiAliasing ()
void | SetAntiAliasing (bool antiAliasing)
bool | GetBlinking ()
void | SetBlinking (bool blinking)
float | GetBlinkRate ()
void | SetBlinkRate (float rate)
int | GetAlphaMode ()
void | SetAlphaMode (int mode)
bool | GetCullBackFaces ()
void | SetCullBackFaces (bool cullFaces)
bool | GetZBufferTestedFlag ()
void | SetZBufferTestedFlag (bool tested)
bool | GetAffectZBufferFlag ()
void | SetAffectZBufferFlag (bool affect)
bool | GetLightingEnabledFlag ()
void | SetLightingEnabledFlag (bool enabled)
DisplayObject::PickableType_e | GetPickMode ()
void | SetPickMode (DisplayObject::PickableType_e mode)
bool | GetVisibilityFlag ()
void | SetVisibilityFlag (bool visible)
PolygonClose_e | GetClosePolygonFlag ()
void | SetClosePolygonFlag (PolygonClose_e closePolygon)
PolygonMode_e | GetPolygonMode ()
void | SetPolygonMode (PolygonMode_e polygonMode)
ShadingType_e | GetShadingMode ()
void | SetShadingMode (ShadingType_e shadingMode)
Vertex | GetLocation ()
void | SetLocation (Vertex loc)
Vertex | GetRotationPoint ()
void | SetRotationPoint (Vertex rotPoint)
GlsMatrixAffine * | GetDcsMatrix ()
void | SetDcsMatrix (GlsMatrixAffine *matrix)
int | GetMaterialIndex ()
void | SetMaterialIndex (int matIndex)
String | GetObjectClassName ()
int | GetTextureIndex ()
void | SetTextureIndex (int texIndex)
TextureMap_e | GetTextureMappingTechnique ()
void | SetTextureMappingTechnique (TextureMap_e mappingTechnique)
bool | GetTextureRepeat ()
void | SetTextureRepeat (bool repeat)
disti::GlsColor | GetBlendingColor ()
void | SetBlendingColor (GlsColor blendColor)
DisplayObject::TextureFilter_e | GetTextureMagnificationFilter ()
void | SetTextureMagnificationFilter (DisplayObject::TextureFilter_e filter)
DisplayObject::TextureFilter_e | GetTextureMinificationFilter ()
void | SetTextureMinificationFilter (DisplayObject::TextureFilter_e filter)
std::vector< Vector > | GetTextureCoordinates ()
void | SetTextureCoordinates (std::vector< Vector > &texVerts)
void | GetTextureCoordinates (VertexArray *texVerts)
void | SetTextureCoordinates (VertexArray &texVerts)
void | GetTexturePoints (VertexArray *texVerts)
void | SetTexturePoints (VertexArray &texVerts)
void | SetTexturePoints (std::vector< Vector > &texVerts)
std::vector< Vector > | GetTexturePoints ()
void | GetVertices (VertexArray *verts)
void | SetVertices (VertexArray &verts)
String | GetInitialization ()
void | SetInitialization (String initCode)
String | GetCallbackCode ()
void | SetCallbackCode (String cbCode)
DisplayObject * | DuplicateObject (Document *doc=NULL)
DisplayObject * | TessellateObject ()
DisplayObject * | ExtrudeObject (float amount)
void | RotateObject (float amount, RotationAxis_e axis)
void | TranslateObject (float x, float y, float z)
void | ScaleObject (float x, float y, float z, Vertex *anchor=NULL)
void | LineWidth (float width)
float | LineWidth ()
LineStyle_e | LineStyle ()
void | LineStyle (LineStyle_e style)
GlsColor | LineColor ()
void | LineColor (GlsColor color)
GlsColor | FillColor ()
void | FillColor (GlsColor color)
void | GetExtents (Vector &min, Vector &max)
bool | HasUserDefinedAttribute (String attribName)
std::map< String, String > | GetUserDefinedAttributes ()
UserDefinedValueAttributeList | GetAllUserDefinedAttributes ()
String | GetUserDefinedAttributeValue (String attribName)
| typemap (check) String attribName
void | SetUserDefinedAttributeValue (String attribName, String value)
DisplayObject * | GetParent ()
Document * | GetDocument ()
String | AlternateClassName ()
void | AlternateClassName (String name)
String | GetAlternateClassHeaderFile ()
void | SetAlternateClassHeaderFile (String name)
String | GetResources ()
String | GetRuntimeResources (bool recursive)
String | GetAttributeType (String attribName)
String | GetAttributeValueString (String attribName)
void | SetAttributeValueString (String attribName, String value)
unsigned int | RegisterObserver (String attribName, PyObject *pyfunc)
void | UnregisterObserver (String attribName, unsigned int id)
std::vector< Vector > | GetNormals ()
void | SetNormals (std::vector< Vector > &normals)
std::vector< CustomAttributeInfo > | GetExtraAttributes ()
DisplayObject * | CloneObject ()
void | CopyProperties (DisplayObject *sourceObj)
void | SetLocation (Vector loc)
GlsMatrixAffine | GetObjectCoordinatesTransform (DisplayObject *targetObject)
void | CalculateParentBoundingBox ()
void | SetOrigin (Vertex &vert)

## Static Public Member Functions
static GlsOdometer * | CastToGlsOdometer (DisplayObject *obj)
Static Public Member Functions inherited from Group
static Group * | CastToGroup (DisplayObject *obj)

## Additional Inherited Members
Static Public Attributes inherited from Group
static int | DEFAULT_GROUP_LOCATION = -1
Static Public Attributes inherited from DisplayObject
static int | TEXTURE_INDEX_NONE = -1

## Detailed Description

Plug-in used to create Odometers in GL Studio.

## Member Enumeration Documentation

## ◆ GlsOdometerBehaviorType_e

enum GlsOdometer::GlsOdometerBehaviorType_e

Enumerator
BEHAVIOR_ANALOG | Wheels will roll between numbers based on the RolloverThreshold
BEHAVIOR_DIGITAL | Wheels will display only whole numbers.

## ◆ GlsOdometerGeometryType_e

enum GlsOdometer::GlsOdometerGeometryType_e

Enumerator
GEOMETRY_2D | Texture is translated on the object based on the TextureScale.
GEOMETRY_3D | The wheels are rotated about the Y-AXIS of the DCS based on the value of DegreesPerDigit.

## Constructor & Destructor Documentation

## ◆ GlsOdometer() [1/2]

GlsOdometer::GlsOdometer | ( |  | ) |

Creates an empty odometer.

## ◆ GlsOdometer() [2/2]

GlsOdometer::GlsOdometer | ( | DisplayObjectArray * | objs | ) |

Creates an odometer using the supplied objects.

Parameters

  objs | Objects to be used to create the odometer

## Member Function Documentation

## ◆ BehaviorType() [1/2]

GlsOdometerBehaviorType_e GlsOdometer::BehaviorType | ( |  | ) |

Get the Behavior Type controls the "Rollover" behavior of the odometer.

Returns
  GlsOdometerBehaviorType_e the current behavior type of the odometer

## ◆ BehaviorType() [2/2]

void GlsOdometer::BehaviorType | ( | GlsOdometerBehaviorType_e | value | ) |

Set the Behavior Type controls the "Rollover" behavior of the odometer.

BEHAVIOR_ANALOG - Wheels will roll between numbers based on the RolloverThreshold BEHAVIOR_DIGITAL - Wheels will display only whole numbers.

Parameters

  value | Behavior Type to be used with this odometer

## ◆ CastToGlsOdometer()

static GlsOdometer * GlsOdometer::CastToGlsOdometer | ( | DisplayObject * | obj | ) |
| static

Casts a DisplayObject to a GlsOdometer NOTE: Be sure to check if the returned class !isNull, to see if the cast was successful.

Parameters

  obj | the DisplayObject to be cast to an Odometer

## ◆ DegreesPerDigit() [1/2]

float GlsOdometer::DegreesPerDigit | ( |  | ) |

Get the current degrees per digit for the odometer.

Returns
  float the current degrees per digit of the odometer

## ◆ DegreesPerDigit() [2/2]

void GlsOdometer::DegreesPerDigit | ( | float & | value | ) |

Set the DegreesPerDigit which is the number of degrees the wheels should be rotated for each digit.

This value is only used when GeometryType == GEOMETRY_3D.

Parameters

  value | degrees per digit to be used with this odometer

## ◆ DegreesPerDigitOverride() [1/2]

bool GlsOdometer::DegreesPerDigitOverride | ( |  | ) |

Get the degrees per digit override flag state of the odometer.

Returns
  bool the degrees per digit override state of the odometer

## ◆ DegreesPerDigitOverride() [2/2]

void GlsOdometer::DegreesPerDigitOverride | ( | bool & | value | ) |

Set the degrees per digit override flag state of the odometer.

Parameters

  value | the new degrees per digit override state of the odometer

## ◆ GeometryType() [1/2]

GlsOdometerGeometryType_e GlsOdometer::GeometryType | ( |  | ) |

Get the GeometryType of the odometer.

Returns
  GlsOdometerGeometryType_e the current geometry type of the odometer

## ◆ GeometryType() [2/2]

void GlsOdometer::GeometryType | ( | GlsOdometerGeometryType_e | value | ) |

Set the GeometryType controls the method used to "move" the wheels.

GEOMETRY_2D - Texture is translated on the object based on the TextureScale. GEOMETRY_3D - The wheels are rotated about the Y-AXIS of the DCS based on the value of DegreesPerDigit.

Parameters

  value | Geometry Type to be used with this odometer

## ◆ GetBaseSystem()

int GlsOdometer::GetBaseSystem | ( |  | ) |

Gets the base system of the odometer.

Returns
  int value of the base system

## ◆ GetInitalValue()

float GlsOdometer::GetInitalValue | ( |  | ) |

Deprecated in favor of GetInitialValue.

This property is here for backwards compatibility.

Returns
  float value of the initial value

Deprecated:
  Use GetInitialValue()

## ◆ GetInitialValue()

float GlsOdometer::GetInitialValue | ( |  | ) |

Gets the initial value of the odometer.

Returns
  float value of the initial value

## ◆ GetMaxValue()

float GlsOdometer::GetMaxValue | ( |  | ) |

Gets the maximum value of the odometer.

Returns
  float value of the maximum value

## ◆ GetMinValue()

float GlsOdometer::GetMinValue | ( |  | ) |

Gets the minimum value of the odometer.

Returns
  float value of the minimum value

## ◆ NumberOfWheels()

int GlsOdometer::NumberOfWheels | ( |  | ) |

Get the current number of wheels for the odometer.

Returns
  int the current number of wheels for the odometer

## ◆ OrderOfMagnitude()

int GlsOdometer::OrderOfMagnitude | ( |  | ) |

Get the current order of magnitude for the odometer.

Returns
  int the current order of magnitude of the odometer

## ◆ RolloverThreshold()

float GlsOdometer::RolloverThreshold | ( |  | ) |

Get the current rollover threshold for the odometer.

Returns
  float the current rollover threshold of the odometer

## ◆ SetBaseSystem()

void GlsOdometer::SetBaseSystem | ( | int | val | ) |

Sets the base system for the odometer.

The default is base 10.

Parameters

  val | value to set as the base system

## ◆ SetInitalValue()

void GlsOdometer::SetInitalValue | ( | float | val | ) |

Deprecated in favor of SetInitialValue.

This property is here for backwards compatibility.

Parameters

  val | value to set as the initial value

Deprecated:
  Use SetInitialValue(float val)

## ◆ SetInitialValue()

void GlsOdometer::SetInitialValue | ( | float | val | ) |

Sets the initial value of the odometer.

Parameters

  val | value to set as the initial value

## ◆ SetMaxValue()

void GlsOdometer::SetMaxValue | ( | float | val | ) |

Sets the maximum value of the odometer.

Parameters

  val | value to set as the maximum value

## ◆ SetMinValue()

void GlsOdometer::SetMinValue | ( | float | val | ) |

Sets the minimum value of the odometer.

Parameters

  val | value to set as the minimum value

## ◆ TextureScale() [1/2]

float GlsOdometer::TextureScale | ( |  | ) |

Get the current TextureScale for the odometer.

Returns
  float the current texture scale of the odometer

## ◆ TextureScale() [2/2]

void GlsOdometer::TextureScale | ( | float & | value | ) |

Set the TextureScale which is the amount that the texture should move for each digit.

The formula to determine this is: (Pixels per digit)/(Texture height). This value is only used when GeometryType == GEOMETRY_2D.

Parameters

  value | Texture scale to be used with this odometer

## ◆ TextureScaleOverride() [1/2]

bool GlsOdometer::TextureScaleOverride | ( |  | ) |

Get the texture scale override flag state of the odometer.

Returns
  bool the texture scale override state of the odometer

## ◆ TextureScaleOverride() [2/2]

void GlsOdometer::TextureScaleOverride | ( | bool & | value | ) |

Set the texture scale override flag state of the odometer.

Parameters

  value | the new texture scale override state of the odometer

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

- GlsOdometer.i