Python Script Engine  1.0
GL Studio Editor Python Script API
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)
 
DisplayObjectArrayGetObjectList ()
 
DisplayObjectGetObjectByIndex (unsigned int index)
 
unsigned int Count (void)
 
virtual void CalculateTextureCoordinates (void)
 
- Public Member Functions inherited from DisplayObject
bool isNULL (void)
 
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)
 
GlsMatrixAffineGetDcsMatrix ()
 
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< VectorGetTextureCoordinates ()
 
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< VectorGetTexturePoints ()
 
void GetVertices (VertexArray *verts)
 
void SetVertices (VertexArray &verts)
 
String GetInitialization ()
 
void SetInitialization (String initCode)
 
String GetCallbackCode ()
 
void SetCallbackCode (String cbCode)
 
DisplayObjectDuplicateObject (Document *doc=NULL)
 
DisplayObjectTessellateObject ()
 
DisplayObjectExtrudeObject (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 ()
 
String GetUserDefinedAttributeValue (String attribName)
 
 typemap (check) String attribName
 
void SetUserDefinedAttributeValue (String attribName, String value)
 
DisplayObjectGetParent ()
 
DocumentGetDocument ()
 
String AlternateClassName ()
 
void AlternateClassName (String name)
 
String GetAlternateClassHeaderFile ()
 
void SetAlternateClassHeaderFile (String name)
 
String GetResources ()
 
String GetRuntimeResources (bool recursive)
 
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< VectorGetNormals ()
 
void SetNormals (std::vector< Vector > normals)
 
std::vector< CustomAttributeInfoGetExtraAttributes ()
 
DisplayObjectCloneObject ()
 

Static Public Member Functions

static GlsOdometerCastToGlsOdometer (DisplayObject *obj)
 
- Static Public Member Functions inherited from Group
static GroupCastToGroup (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

Enumerator
BEHAVIOR_ANALOG 
  • Wheels will roll between numbers based on the RolloverThreshold
BEHAVIOR_DIGITAL 
  • Wheels will display only whole numbers.
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::GlsOdometer ( )

Creates an empty odometer.

GlsOdometer::GlsOdometer ( DisplayObjectArray objs)

Creates an odometer using the supplied objects.

Parameters
objsObjects to be used to create the odometer

Member Function Documentation

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
valueBehavior Type to be used with this odometer
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
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
objthe DisplayObject to be cast to an Odometer
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
valuedegrees per digit to be used with this odometer
float GlsOdometer::DegreesPerDigit ( )

Get the current degrees per digit for the odometer.

Returns
float the current degrees per digit of the odometer
void GlsOdometer::DegreesPerDigitOverride ( bool &  value)

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

Parameters
valuethe new degrees per digit override state of the odometer
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
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
valueGeometry Type to be used with this odometer
GlsOdometerGeometryType_e GlsOdometer::GeometryType ( )

Get the GeometryType of the odometer.

Returns
GlsOdometerGeometryType_e the current geometry type of the odometer
int GlsOdometer::GetBaseSystem ( )

Gets the base system of the odometer.

Returns
int value of the base system
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()
float GlsOdometer::GetInitialValue ( )

Gets the initial value of the odometer.

Returns
float value of the initial value
float GlsOdometer::GetMaxValue ( )

Gets the maximum value of the odometer.

Returns
float value of the maximum value
float GlsOdometer::GetMinValue ( )

Gets the minimum value of the odometer.

Returns
float value of the minimum value
int GlsOdometer::NumberOfWheels ( )

Get the current number of wheels for the odometer.

Returns
int the current number of wheels for the odometer
int GlsOdometer::OrderOfMagnitude ( )

Get the current order of magnitude for the odometer.

Returns
int the current order of magnitude of the odometer
float GlsOdometer::RolloverThreshold ( )

Get the current rollover threshold for the odometer.

Returns
float the current rollover threshold of the odometer
void GlsOdometer::SetBaseSystem ( int  val)

Sets the base system for the odometer.

The default is base 10.

Parameters
valvalue to set as the base system
void GlsOdometer::SetInitalValue ( float  val)

Deprecated in favor of SetInitialValue.

This property is here for backwards compatibility.

Parameters
valvalue to set as the initial value
Deprecated:
Use SetInitialValue(float val)
void GlsOdometer::SetInitialValue ( float  val)

Sets the initial value of the odometer.

Parameters
valvalue to set as the initial value
void GlsOdometer::SetMaxValue ( float  val)

Sets the maximum value of the odometer.

Parameters
valvalue to set as the maximum value
void GlsOdometer::SetMinValue ( float  val)

Sets the minimum value of the odometer.

Parameters
valvalue to set as the minimum value
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
valueTexture scale to be used with this odometer
float GlsOdometer::TextureScale ( )

Get the current TextureScale for the odometer.

Returns
float the current texture scale of the odometer
void GlsOdometer::TextureScaleOverride ( bool &  value)

Set the texture scale override flag state of the odometer.

Parameters
valuethe new texture scale override state of the odometer
bool GlsOdometer::TextureScaleOverride ( )

Get the texture scale override flag state of the odometer.

Returns
bool the texture scale override state of the odometer

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