| Python Script Engine 8.3 GL Studio Editor Python Script API

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

## Public Types
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
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 Attributes
static int | TEXTURE_INDEX_NONE = -1

## Detailed Description

Python extension for the DisplayObject Base Class.

This is the base class for all graphical objects. It is an abstract class. Each object drawn in the editor will have a corresponding object. All drawn objects are derived from this class.

## Member Enumeration Documentation

## ◆ AlphaMode_e

enum DisplayObject::AlphaMode_e

Enumeration for Alpha Blending/Testing mode.

Enumerator
ALPHA_MODE_UNDEFINED | Alpha mode is not defined. Used by the properties page
ALPHA_MODE_OPAQUE | Alpha testing and blending are disabled.
ALPHA_MODE_2_LEVEL | Alpha testing with a threshold of 0.5 is enabled, alpha blending is enabled.
ALPHA_MODE_256_LEVEL | Alpha blending is enabled, alpha testing is disabled.

## ◆ LineStyle_e

enum DisplayObject::LineStyle_e

Line Style enumeration.

Passed into Line Style calls

Enumerator
SOLID_LINE_STYLE | Solid line style.
SMALL_DOTTED_LINE_STYLE | Small dotted line style.
DOTTED_LINE_STYLE | Dotted line style.
DASHED_LINE_STYLE | Dashed line style.
DOT_DASHED_LINE_STYLE | Dot Dashed line style.
SMALL_DASHED_LINE_STYLE | Small dashed line style.

## ◆ MemberAccess_e

enum DisplayObject::MemberAccess_e

Enumerator
PUBLIC | The object will be C++ public status
PRIVATE | The object will be C++ private status
PROTECTED | The object will be C++ protected status.

## ◆ PickableType_e

enum DisplayObject::PickableType_e

Enumerator
UNPICKABLE | Picking will be disabled for this object and all children.
FIRST_PICK | Picking will be based on draw order only. The first geometry hit wins.
BEST_PICK | Picking will find the best geometry hit of all available children.
ALWAYS_PICK | Picking will ignore geometry of this object, and always return a pick as if hit. This is still only found through normal draw order traversal.

## ◆ PolygonClose_e

enum DisplayObject::PolygonClose_e

Enumerator
POLY_OPEN | Polygon will be drawn open.
POLY_CLOSED | Polygon will be drawn closed.

## ◆ PolygonMode_e

enum DisplayObject::PolygonMode_e

Enumerator
POLY_MODE_UNDEFINED | Polygon draw style is not defined; not a drawable type. Used with the properties page
POLY_MODE_POINTS | Polygon will be rendered with a point at each vertex.
POLY_MODE_OUTLINE | Polygon will be rendered as an outline.
POLY_MODE_FILLED | Polygon will be rendered filled-in.
POLY_MODE_FILL_AND_OUTLINE | Polygon will be rendered filled-in and with an outline.

## ◆ RotationAxis_e

enum DisplayObject::RotationAxis_e

Enumerator
X_AXIS | Rotate around the X Axis.
Y_AXIS | Rotate around the Y Axis.
Z_AXIS | Rotate around the Z Axis.

## ◆ ShadingType_e

enum DisplayObject::ShadingType_e

Enumerator
SHADING_FLAT | The object will be drawn with flat shading (monochromatic)
SHADING_GOURAUD | The object will be drawn with gouraud shading (linear color interpolation)

## ◆ TessellateType_e

enum DisplayObject::TessellateType_e

Enumerator
TESSELLATE_UNION | Union tessellation.
TESSELLATE_INTERSECT | Intersection tessellation.
TESSELLATE_DIFFERENCE | Difference tessellation.

## ◆ TextureFilter_e

enum DisplayObject::TextureFilter_e

Enumerator
TEXTURE_FILTER_NEAREST | Nearest pixel filtering.
TEXTURE_FILTER_LINEAR | Bilinear interpolation filtering.
TEXTURE_FILTER_NEAREST_MIPMAP_NEAREST | Selects nearest pixel in the nearest mipmap.
TEXTURE_FILTER_LINEAR_MIPMAP_LINEAR | Linearly interpolates in two mipmaps then linearly interpolates between them.
TEXTURE_FILTER_NEAREST_MIPMAP_LINEAR | Selects nearest pixel in two mipmaps then linearly interpolates between them.
TEXTURE_FILTER_LINEAR_MIPMAP_NEAREST | Linearly interpolates in the nearest mipmap.

## ◆ TextureMap_e

enum DisplayObject::TextureMap_e

Enumerator
TEXTURE_MAP_MODULATE | Texture color and alpha are modulated with polygon color and alpha.
TEXTURE_MAP_DECAL | Texture color is blended with polygon color.
TEXTURE_MAP_BLEND | Texture color is blended with polygon color, texture alpha is modulated with polygon alpha.
TEXTURE_MAP_REPLACE | Texture color and alpha replace polygon color and alpha.

## Member Function Documentation

## ◆ AlternateClassName() [1/2]

String DisplayObject::AlternateClassName | ( |  | ) |

Gets the alternate class name generated for object.

## ◆ AlternateClassName() [2/2]

void DisplayObject::AlternateClassName | ( | String | name | ) |

Sets the alternate class name generated for object.

## ◆ CalculateParentBoundingBox()

void DisplayObject::CalculateParentBoundingBox | ( |  | ) |

Calculates the bounding box of the parent group object.

Note
  Needed if the object's extents or location is changed by the user.

Since
  GL Studio 6.3.1

## ◆ CloneObject()

DisplayObject * DisplayObject::CloneObject | ( |  | ) |

Returns a clone of the DisplayObject.

Since
  GL Studio 6.0.1

## ◆ CopyProperties()

void DisplayObject::CopyProperties | ( | DisplayObject * | sourceObj | ) |

Copies properties from the source object to this object.

Parameters

  sourceObj | The object to copy properties from

Since
  GL Studio 7.0.1

## ◆ DuplicateObject()

DisplayObject * DisplayObject::DuplicateObject | ( | Document * | doc = `NULL` | ) |

Duplicates the display object.

Parameters

  doc | Document to perform the action in, default NULL will use the parent of the object

Returns
  DisplayObject * pointer to the new display object

## ◆ ExtrudeObject()

DisplayObject * DisplayObject::ExtrudeObject | ( | float | amount | ) |

Extrudes the object.

Parameters

  amount | Amount to extrude the object

Returns
  DisplayObject * pointer to the new extruded object group

## ◆ FillColor() [1/2]

GlsColor DisplayObject::FillColor | ( |  | ) |

Gets the fill color of the Display Object.

Returns
  GlsColor fill color of the Display Object

## ◆ FillColor() [2/2]

void DisplayObject::FillColor | ( | GlsColor | color | ) |

Sets the fill color of the Display Object.

Parameters

  color | fill color to be applied to the Display Object

## ◆ GetAffectZBufferFlag()

bool DisplayObject::GetAffectZBufferFlag | ( |  | ) |

Retrieves the display object's Affect Z-Buffer flag.

Returns
  bool containing the state of the object's Affect Z-Buffer flag

## ◆ GetAllUserDefinedAttributes()

UserDefinedValueAttributeList DisplayObject::GetAllUserDefinedAttributes | ( |  | ) |

Retrieves the user defined value attributes for the Display Object.

Returns
  UserDefinedValueAttributeList containing the user defined attributes

## ◆ GetAlphaMode()

int DisplayObject::GetAlphaMode | ( |  | ) |

Get the alpha mode for this object.

Returns
  Whether or not alpha testing or blending is enabled when drawing

See also
  AlphaMode_e

Since
  GL Studio 6.0.1

## ◆ GetAlternateClassHeaderFile()

String DisplayObject::GetAlternateClassHeaderFile | ( |  | ) |

Gets the alternate class header file for object.

Since
  GL Studio 6.0.1

## ◆ GetAntiAliasing()

bool DisplayObject::GetAntiAliasing | ( |  | ) |

Retrieves the display object's Anti-Aliasing flag.

Returns
  bool containing the state of the object's anti-aliasing flag

## ◆ GetAttributeType()

String DisplayObject::GetAttributeType | ( | String | attribName | ) |

Returns
  The underlying type name for a single attribute of the object. e.g. int, GlsColor

Parameters

  attribName | The name of the attribute whose type is to be returned.

## ◆ GetAttributeValueString()

String DisplayObject::GetAttributeValueString | ( | String | attribName | ) |

Gets the value for a single attribute of the object.

See also
  SetAttributeValueString()
  GetResources()

## ◆ GetBlendingColor()

disti::GlsColor DisplayObject::GetBlendingColor | ( |  | ) |

Retrieves the display object's Blending Color.

Returns
  GlsColor the object's Blending Color

## ◆ GetBlinking()

bool DisplayObject::GetBlinking | ( |  | ) |

Retrieves the display object's blinking flag.

Returns
  bool containing the state of the object's blinking flag

## ◆ GetBlinkRate()

float DisplayObject::GetBlinkRate | ( |  | ) |

Retrieves the display object's blink rate.

Returns
  float containing the rate of the object's blinking

## ◆ GetCallbackCode()

String DisplayObject::GetCallbackCode | ( |  | ) |

Retrieves the display object's callback code.

Returns
  String the object's callback code

## ◆ GetClosePolygonFlag()

PolygonClose_e DisplayObject::GetClosePolygonFlag | ( |  | ) |

Retrieves the display object's Close Polygon flag.

Returns
  PolygonClose_e containing the state of the object's Close Polygon flag

## ◆ GetCullBackFaces()

bool DisplayObject::GetCullBackFaces | ( |  | ) |

Retrieves the display object's Cull Backfaces flag.

Returns
  bool containing the state of the object's Cull Backfaces flag

## ◆ GetDcsMatrix()

GlsMatrixAffine * DisplayObject::GetDcsMatrix | ( |  | ) |

Retrieves the display object's DCS matrix.

Returns
  GlsMatrixAffine the object's DCS matrix

## ◆ GetDocument()

Document * DisplayObject::GetDocument | ( |  | ) |

Retrieves the display object's document.

Returns
  Document * the object's document

## ◆ GetExtents()

void DisplayObject::GetExtents | ( | Vector & | min,
|  | Vector & | max
| ) |  |

Figure out the static extents for the object.

Parameters

  min | Gets the minimum extents
  max | Gets the maximum extents

## ◆ GetExtraAttributes()

std::vector< CustomAttributeInfo > DisplayObject::GetExtraAttributes | ( |  | ) |

Gets the properties added by Alternate Class Headers, Catalyzers, and Components.

Intended to support only Python-based code generation.

Returns
  the properties in a tuple, where each property has the following attributes: attributeName, displayName, groupName, className, description, propType, prevVal, shouldDisplay, and propSource

Since
  GL Studio 6.0.1

## ◆ GetGenerateMemberVariable()

bool DisplayObject::GetGenerateMemberVariable | ( |  | ) |

## ◆ GetInitialization()

String DisplayObject::GetInitialization | ( |  | ) |

Retrieves the display object's initialization code.

Returns
  String the object's initialization code

## ◆ GetLightingEnabledFlag()

bool DisplayObject::GetLightingEnabledFlag | ( |  | ) |

Retrieves the display object's Lighting Enabled flag.

Returns
  bool containing the state of the object's Lighting Enabled flag

## ◆ GetLocation()

Vertex DisplayObject::GetLocation | ( |  | ) |

Retrieves the display object's location.

Returns
  Vertex the object's location

## ◆ GetLocked()

bool DisplayObject::GetLocked | ( | void |  | ) |

Get the locked status for this object.

Returns
  If this object is locked

## ◆ GetMaterialIndex()

int DisplayObject::GetMaterialIndex | ( |  | ) |

Retrieves the display object's Material Index.

Returns
  int the object's Material Index

## ◆ GetName()

String DisplayObject::GetName | ( |  | ) |

Retrieves the display object's name.

Returns
  String containing the name of the object

## ◆ GetNormals()

std::vector< Vector > DisplayObject::GetNormals | ( |  | ) |

Returns a list of Vector normals for the DisplayObject.

Since
  GL Studio 6.0.1

## ◆ GetObjectClassName()

String DisplayObject::GetObjectClassName | ( |  | ) |

Retrieves the display object's ObjectClassName.

Returns
  String the name of the ObjectClass

## ◆ GetObjectCoordinatesTransform()

GlsMatrixAffine DisplayObject::GetObjectCoordinatesTransform | ( | DisplayObject * | targetObject | ) |

Gets the transform matrix necessary to convert points from the targetObject to that of this object's coordinate space.

Parameters

  targetObject | the target object

Returns
  transform matrix between the target object and this object

Since
  GL Studio 6.3.1

## ◆ GetParent()

DisplayObject * DisplayObject::GetParent | ( |  | ) |

Retrieves the display object's parent.

Returns
  DisplayObject * the object's parent object

## ◆ GetPickMode()

DisplayObject::PickableType_e DisplayObject::GetPickMode | ( |  | ) |

Retrieves the display object's pick mode.

Returns
  DisplayObject::PickableType_e containing the pick mode of the object

## ◆ GetPolygonMode()

PolygonMode_e DisplayObject::GetPolygonMode | ( |  | ) |

Retrieves the display object's PolygonMode.

Returns
  PolygonMode_e the object's PolygonMode

## ◆ GetProtectionMode()

DisplayObject::MemberAccess_e DisplayObject::GetProtectionMode | ( | void |  | ) |

Get the protection mode for this object.

Returns
  The protection mode for this object

See also
  MemberAccess_e

## ◆ GetResources()

String DisplayObject::GetResources | ( |  | ) |

Gets all of the resources (AKA, attributes) at the object tree rooted at this object.

See also
  GetAttributeValueString()
  SetAttributeValueString()

## ◆ GetRotationPoint()

Vertex DisplayObject::GetRotationPoint | ( |  | ) |

Retrieves the display object's rotation point.

Returns
  Vertex the object's rotation point

## ◆ GetRuntimeResources()

String DisplayObject::GetRuntimeResources | ( | bool | recursive | ) |

Gets all of the resources (AKA, attributes) at the object tree rooted at this object.

Only Gets resources that are available at runtime.

Parameters

  recursive | whether or not to recurse to children

See also
  GetAttributeValueString()
  SetAttributeValueString()

Since
  GL Studio 6.0.1

## ◆ GetShadingMode()

ShadingType_e DisplayObject::GetShadingMode | ( |  | ) |

Retrieves the display object's Shading Mode.

Returns
  ShadingType_e the object's Shading Mode

## ◆ GetTextureCoordinates() [1/2]

std::vector< Vector > DisplayObject::GetTextureCoordinates | ( |  | ) |

Retrieves the display object's Texture Coordinates.

Returns
  a list of the object's Texture Coordinates

## ◆ GetTextureCoordinates() [2/2]

void DisplayObject::GetTextureCoordinates | ( | VertexArray * | texVerts | ) |

Retrieves the display object's Texture Coordinates.

Parameters

  texVerts | returns the object's Texture Coordinates

Deprecated:
  Use GetTextureCoordinates() instead.

## ◆ GetTextureIndex()

int DisplayObject::GetTextureIndex | ( |  | ) |

Retrieves the display object's Texture Index.

Returns
  int the object's Texture Index

## ◆ GetTextureMagnificationFilter()

DisplayObject::TextureFilter_e DisplayObject::GetTextureMagnificationFilter | ( |  | ) |

Retrieves the display object's Texture Magnification Filter.

Returns
  DisplayObject::TextureFilter_e the object's Texture Magnification Filter

## ◆ GetTextureMappingTechnique()

TextureMap_e DisplayObject::GetTextureMappingTechnique | ( |  | ) |

Retrieves the display object's Texture Mapping Technique.

Returns
  TextureMap_e the object's Texture Mapping Technique

## ◆ GetTextureMinificationFilter()

DisplayObject::TextureFilter_e DisplayObject::GetTextureMinificationFilter | ( |  | ) |

Retrieves the display object's Texture Minification Filter.

Returns
  DisplayObject::TextureFilter_e the object's Texture Minification Filter

## ◆ GetTexturePoints() [1/2]

std::vector< Vector > DisplayObject::GetTexturePoints | ( |  | ) |

Retrieves the display object's Texture Points.

Returns
  the object's Texture Points

Since
  GL Studio 6.0.1

## ◆ GetTexturePoints() [2/2]

void DisplayObject::GetTexturePoints | ( | VertexArray * | texVerts | ) |

Retrieves the display object's Texture Points.

Parameters

  texVerts | returns the object's Texture Points

Deprecated:
  Use GetTexturePoints() instead.

## ◆ GetTextureRepeat()

bool DisplayObject::GetTextureRepeat | ( |  | ) |

Retrieves the display object's Texture Repeat.

Returns
  bool if the object has Texture Repeat on

## ◆ GetUserDefinedAttributes()

std::map< String, String > DisplayObject::GetUserDefinedAttributes | ( |  | ) |

Gets a read-only dict of all user defined attributes for the Display Object.

# Example usage accessing the dictionary
attribs = polygon.GetUserDefinedAttributes()
if 'attribName' in attribs:
attribValue = attribs['attribName']
# The following code will *not* change the object it was retrieved from:
attribs['attribName'] = 'This Assignment changes Nothing'

Returns
  READ-ONLY dictionary of all user defined attributes for an object. Do not use the returned dictionary to set values, they will not be saved!

Since
  GL Studio 6.0.1

## ◆ GetUserDefinedAttributeValue()

String DisplayObject::GetUserDefinedAttributeValue | ( | String | attribName | ) |

Gets the value of the user defined attribute for the Display Object.

Parameters

  attribName | name of the attribute for which to find the value

Returns
  String value of the attribute, or None if there is no Attribute named `attribName`

## ◆ GetVertices()

void DisplayObject::GetVertices | ( | VertexArray * | verts | ) |

Retrieves the display object's Vertices.

Parameters

  verts | returns the object's Vertices

## ◆ GetVisibilityFlag()

bool DisplayObject::GetVisibilityFlag | ( |  | ) |

Retrieves the display object's Visibility flag.

Returns
  bool containing the state of the object's Visibility flag

## ◆ GetZBufferTestedFlag()

bool DisplayObject::GetZBufferTestedFlag | ( |  | ) |

Retrieves the display object's Z-Buffer Tested flag.

Returns
  bool containing the state of the object's Z-Buffer Tested flag

## ◆ HasUserDefinedAttribute()

bool DisplayObject::HasUserDefinedAttribute | ( | String | attribName | ) |

Checks the value of the user defined attribute for the Display Object.

Parameters

  attribName | name of the attribute for which to find the value

Returns
  bool if the attribute exists or not

Since
  GL Studio 6.0.1

## ◆ isNULL()

bool DisplayObject::isNULL | ( |  | ) |

Determine if wrapped display object does not exist.

Returns
  true if wrapped display object does not exist, else false

Deprecated:
  Refer to the Truth Value Checking page

## ◆ LineColor() [1/2]

GlsColor DisplayObject::LineColor | ( |  | ) |

Gets the line color of the Display Object.

Returns
  GlsColor line color of the Display Object

## ◆ LineColor() [2/2]

void DisplayObject::LineColor | ( | GlsColor | color | ) |

Sets the line color of the Display Object.

Parameters

  color | line color to be applied to the Display Object

## ◆ LineStyle() [1/2]

LineStyle_e DisplayObject::LineStyle | ( |  | ) |

Gets the line style of the Display Object.

Returns
  LineStyle_e line style of the Display Object

## ◆ LineStyle() [2/2]

void DisplayObject::LineStyle | ( | LineStyle_e | style | ) |

Sets the line style of the Display Object.

Parameters

  style | line style to be applied to the Display Object

## ◆ LineWidth() [1/2]

float DisplayObject::LineWidth | ( |  | ) |

Gets the line width of the Display Object.

Returns
  float line width of the Display Object

## ◆ LineWidth() [2/2]

void DisplayObject::LineWidth | ( | float | width | ) |

Sets the line width of the Display Object.

Parameters

  width | line width to be applied to the Display Object

## ◆ RegisterObserver()

unsigned int DisplayObject::RegisterObserver | ( | String | attribName,
|  | PyObject * | pyfunc
| ) |  |

Register a python function to be called when the specified attribute changes value.

This function does not take ownership of the python function, so it must persist in order to be called. When the python function goes away, it will be automatically unregistered.

Parameters

  attribName | the name of the attribute to register with
  pyfunc | the python function to call when the attribute is changed is changed. It takes a single paramater, which is the string value of the attribute, as would be normally returned with a call to GetAttributeValueString

Returns
  The ID of this registration.

## ◆ RotateObject()

void DisplayObject::RotateObject | ( | float | amount,
|  | RotationAxis_e | axis
| ) |  |

Rotate the object.

Parameters

  amount | amount to rotate the object
  axis | axis of rotation

## ◆ ScaleObject()

void DisplayObject::ScaleObject | ( | float | x,
|  | float | y,
|  | float | z,
|  | Vertex * | anchor = `NULL`
| ) |  |

Scale the object.

Parameters

  x | Value of the percentage of scale in x-axis
  y | Value of the percentage of scale in y-axis
  z | Value of the percentage of scale in z-axis
  anchor | Anchor from which to scale object relative to, default NULL will anchor at object location

## ◆ SetAffectZBufferFlag()

void DisplayObject::SetAffectZBufferFlag | ( | bool | affect | ) |

Sets the display object's Affect Z-Buffer flag.

Parameters

  affect | New state for the Affect Z-Buffer flag of the object

## ◆ SetAlphaMode()

void DisplayObject::SetAlphaMode | ( | int | mode | ) |

Set the alpha mode state for this object.

Parameters

  mode | which alpha mode to use when drawing

See also
  AlphaMode_e

Since
  GL Studio 6.0.1

## ◆ SetAlternateClassHeaderFile()

void DisplayObject::SetAlternateClassHeaderFile | ( | String | name | ) |

Sets the alternate class header file for object.

Since
  GL Studio 6.0.1

## ◆ SetAntiAliasing()

void DisplayObject::SetAntiAliasing | ( | bool | antiAliasing | ) |

Sets the display object's name.

Parameters

  antiAliasing | New state for the anti-aliasing flag of the object

## ◆ SetAttributeValueString()

void DisplayObject::SetAttributeValueString | ( | String | attribName,
|  | String | value
| ) |  |

Sets the value for a single attribute of the object.

See also
  GetAttributeValueString()
  GetResources()

## ◆ SetBlendingColor()

void DisplayObject::SetBlendingColor | ( | GlsColor | blendColor | ) |

Sets the display object's Blending Color.

Parameters

  blendColor | New Blending Color of the object

## ◆ SetBlinking()

void DisplayObject::SetBlinking | ( | bool | blinking | ) |

Sets the display object's blinking flag.

Parameters

  blinking | New state for the blinking flag of the object

## ◆ SetBlinkRate()

void DisplayObject::SetBlinkRate | ( | float | rate | ) |

Sets the display object's blinking rate.

Parameters

  rate | New rate for the blink of the object

## ◆ SetCallbackCode()

void DisplayObject::SetCallbackCode | ( | String | cbCode | ) |

Sets the display object's callback code.

Parameters

  cbCode | New callback code for the object

## ◆ SetClosePolygonFlag()

void DisplayObject::SetClosePolygonFlag | ( | PolygonClose_e | closePolygon | ) |

Sets the display object's Close Polygon flag.

Parameters

  closePolygon | New state for the Close Polygon flag of the object

## ◆ SetCullBackFaces()

void DisplayObject::SetCullBackFaces | ( | bool | cullFaces | ) |

Sets the display object's Cull Backfaces flag.

Parameters

  cullFaces | New state for the Cull Backfaces flag of the object

## ◆ SetDcsMatrix()

void DisplayObject::SetDcsMatrix | ( | GlsMatrixAffine * | matrix | ) |

Sets the display object's DCS matrix.

Parameters

  matrix | New DCS matrix to apply to the object

## ◆ SetGenerateMemberVariable()

void DisplayObject::SetGenerateMemberVariable | ( | bool | b | ) |

## ◆ SetInitialization()

void DisplayObject::SetInitialization | ( | String | initCode | ) |

Sets the display object's initialization code.

Parameters

  initCode | New initialization code for the object

## ◆ SetLightingEnabledFlag()

void DisplayObject::SetLightingEnabledFlag | ( | bool | enabled | ) |

Sets the display object's Lighting Enabled flag.

Parameters

  enabled | New state for the Lighting Enabled flag of the object

## ◆ SetLocation() [1/2]

void DisplayObject::SetLocation | ( | Vector | loc | ) |

Sets the display object's location.

Parameters

  loc | New location of the object

See also
  SetLocation( Vertex )

Since
  GL Studio 6.2.1

## ◆ SetLocation() [2/2]

void DisplayObject::SetLocation | ( | Vertex | loc | ) |

Sets the display object's location.

Parameters

  loc | New location of the object

See also
  SetLocation( Vector )

## ◆ SetLocked()

void DisplayObject::SetLocked | ( | bool | val | ) |

Set the locked status for this object.

Parameters

  val | Set locked status.

## ◆ SetMaterialIndex()

void DisplayObject::SetMaterialIndex | ( | int | matIndex | ) |

Sets the display object's Material Index.

Parameters

  matIndex | New Material Index of the object

## ◆ SetName()

String DisplayObject::SetName | ( | String | name | ) |

Sets the display object's name.

If `name` is not a valid C++ identifier, it will attempt to make it one. If it is unable to set it after fixing, it will throw an exception. If an object with the same name already exists, will throw an exception.

Parameters

  name | New name of object

Returns
  The name the object was set to. If `name` was not a valid C++ identifier, the returned name will be a valid identifier.
  objName = "invalid name"
  objName = obj.SetName( objName )
  print objName
  > "invalid_name"

Exceptions

  RuntimeError | If `name` is empty
  RuntimeError | If `name` cannot be made into a valid C++ identifier

Since
  GL Studio 6.0.1 - Fixes up invalid names and returns the name the object was set to.

## ◆ SetNormals()

void DisplayObject::SetNormals | ( | std::vector< Vector > & | normals | ) |

Sets the normal vectors for the DisplayObject.

Parameters

  normals | the list of new normal Vectors for the object

Since
  GL Studio 6.0.1

## ◆ SetOrigin()

void DisplayObject::SetOrigin | ( | Vertex & | vert | ) |

Redefines the frame of reference for the object.

Since the vertices in the object are specified relative to the _location member, this routine allows you to specify the absolute coordinate for _location and then recalculates the vertices to be relative to that new location

Parameters

  vert | The new origin point for the object

Since
  GL Studio 6.3.1

## ◆ SetPickMode()

void DisplayObject::SetPickMode | ( | DisplayObject::PickableType_e | mode | ) |

Sets the display object's pick mode.

Parameters

  mode | New mode for object's pick mode

## ◆ SetPolygonMode()

void DisplayObject::SetPolygonMode | ( | PolygonMode_e | polygonMode | ) |

Sets the display object's PolygonMode.

Parameters

  polygonMode | New state for the PolygonMode of the object

## ◆ SetProtectionMode()

void DisplayObject::SetProtectionMode | ( | DisplayObject::MemberAccess_e | mode | ) |

Set the protection mode for this object.

i.e., will the object be generated as a pubic, private, or protected member variable?

Parameters

  mode | How the variable will be generated: PUBLIC, PRIVATE, PROTECTED

See also
  MemberAccess_e

## ◆ SetRotationPoint()

void DisplayObject::SetRotationPoint | ( | Vertex | rotPoint | ) |

Sets the display object's rotation point.

Parameters

  rotPoint | New location of the object's rotation point

## ◆ SetShadingMode()

void DisplayObject::SetShadingMode | ( | ShadingType_e | shadingMode | ) |

Sets the display object's Shading Mode.

Parameters

  shadingMode | New Shading Mode of the object

## ◆ SetTextureCoordinates() [1/2]

void DisplayObject::SetTextureCoordinates | ( | std::vector< Vector > & | texVerts | ) |

Sets the display object's Texture Coordinates.

Parameters

  texVerts | New Texture Coordinates of the object

## ◆ SetTextureCoordinates() [2/2]

void DisplayObject::SetTextureCoordinates | ( | VertexArray & | texVerts | ) |

Sets the display object's Texture Coordinates.

Parameters

  texVerts | New Texture Coordinates of the object

Deprecated:
  Use SetTextureCoordinates( std::vector<Vector>& ) instead.

## ◆ SetTextureIndex()

void DisplayObject::SetTextureIndex | ( | int | texIndex | ) |

Sets the display object's Texture Index.

Parameters

  texIndex | New Texture Index of the object

## ◆ SetTextureMagnificationFilter()

void DisplayObject::SetTextureMagnificationFilter | ( | DisplayObject::TextureFilter_e | filter | ) |

Sets the display object's Texture Magnification Filter.

Parameters

  filter | New Texture Magnification Filter of the object; either TEXTURE_FILTER_NEAREST or TEXTURE_FILTER_LINEAR

## ◆ SetTextureMappingTechnique()

void DisplayObject::SetTextureMappingTechnique | ( | TextureMap_e | mappingTechnique | ) |

Sets the display object's Texture Mapping Technique.

Parameters

  mappingTechnique | New Texture Mapping Technique of the object

## ◆ SetTextureMinificationFilter()

void DisplayObject::SetTextureMinificationFilter | ( | DisplayObject::TextureFilter_e | filter | ) |

Sets the display object's Texture Minification Filter.

Parameters

  filter | New Texture Minification Filter of the object

## ◆ SetTexturePoints() [1/2]

void DisplayObject::SetTexturePoints | ( | std::vector< Vector > & | texVerts | ) |

Sets the display object's Texture Points.

Parameters

  texVerts | New Texture Points of the object

Since
  GL Studio 6.0.1

## ◆ SetTexturePoints() [2/2]

void DisplayObject::SetTexturePoints | ( | VertexArray & | texVerts | ) |

Sets the display object's Texture Points.

Parameters

  texVerts | New Texture Points of the object

Deprecated:
  Use SetTexturePoints( std::vector<Vector>& ) instead.

## ◆ SetTextureRepeat()

void DisplayObject::SetTextureRepeat | ( | bool | repeat | ) |

Sets the display object's Texture Repeat.

Parameters

  repeat | New Texture Repeat of the object

## ◆ SetUserDefinedAttributeValue()

void DisplayObject::SetUserDefinedAttributeValue | ( | String | attribName,
|  | String | value
| ) |  |

Sets the value of the user defined attribute for the Display Object.

Parameters

  attribName | name of the attribute for which to set the value
  value | value to be given to the attribute

## ◆ SetVertices()

void DisplayObject::SetVertices | ( | VertexArray & | verts | ) |

Sets the display object's Vertices.

Parameters

  verts | New vertex list for the object, with at least two vertices

## ◆ SetVisibilityFlag()

void DisplayObject::SetVisibilityFlag | ( | bool | visible | ) |

Sets the display object's Visibility flag.

Parameters

  visible | New state for the Visibility flag of the object

## ◆ SetZBufferTestedFlag()

void DisplayObject::SetZBufferTestedFlag | ( | bool | tested | ) |

Sets the display object's Z-Buffer Tested flag.

Parameters

  tested | New state for the Z-Buffer Tested flag of the object

## ◆ TessellateObject()

DisplayObject * DisplayObject::TessellateObject | ( |  | ) |

Tessellates the object.

Returns
  DisplayObject * pointer to the new tessellated object group

## ◆ TranslateObject()

void DisplayObject::TranslateObject | ( | float | x,
|  | float | y,
|  | float | z
| ) |  |

Translate the object.

Parameters

  x | translation amount along the x-axis
  y | translation amount along the y-axis
  z | translation amount along the z-axis

## ◆ typemap()

DisplayObject::typemap | ( | check |  | ) |

## ◆ UnregisterObserver()

void DisplayObject::UnregisterObserver | ( | String | attribName,
|  | unsigned int | id
| ) |  |

Unregister a previously registered observer.

Parameters

  attribName | the name of the attribute to unregister with
  id | the id that was returned from the call to RegisterObserver

## Member Data Documentation

## ◆ TEXTURE_INDEX_NONE

int DisplayObject::TEXTURE_INDEX_NONE = -1
| static

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

- DisplayObject.i