| Python Script Engine 8.3 GL Studio Editor Python Script API

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

## Public Member Functions
| 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 Group * | CastToGroup (DisplayObject *obj)

## Static Public Attributes
static int | DEFAULT_GROUP_LOCATION = -1
Static Public Attributes inherited from DisplayObject
static int | TEXTURE_INDEX_NONE = -1

## Additional Inherited Members
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 }

## Detailed Description

Python Script Editor interface for Group editor objects.

## Constructor & Destructor Documentation

## ◆ Group() [1/2]

Group::Group | ( |  | ) |

Constructs an empty group.

## ◆ Group() [2/2]

Group::Group | ( | DisplayObjectArray * | objs | ) |

Creates a group with the specified objects.

Parameters

  objs | The array of display objects

Note
  Reparents the objects if needed.

## Member Function Documentation

## ◆ CalculateBoundingBox()

void Group::CalculateBoundingBox | ( |  | ) |

Calculates the vertices to form the bounding box containing all child objects.

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

Since
  GL Studio 6.3.1

## ◆ CalculateTextureCoordinates()

void Group::CalculateTextureCoordinates | ( | void |  | ) |

Recalculates the texture coordinates for the object based on the TexturePoints.

Precondition
  !isNULL()

Exceptions

  CEIException |

## ◆ CastToGroup()

static Group * Group::CastToGroup | ( | DisplayObject * | obj | ) |
| static

Casts a DisplayObject to a Group (returns null on failure to cast)

Parameters

  obj | The display object to cast.

## ◆ Count()

unsigned int Group::Count | ( |  | ) |

the number of objects within the group

Precondition
  !isNULL()

Exceptions

  CEIException |

Returns
  unsigned int the number of the objects within the group

## ◆ GetCount()

unsigned int Group::GetCount | ( |  | ) |

Alias of Group::Count() for consistency with the rest of the Python API.

Since
  GL Studio 6.2.1

## ◆ GetObjectByIndex()

DisplayObject * Group::GetObjectByIndex | ( | unsigned int | index | ) |

Returns an item based on index.

Precondition
  !isNULL()

Parameters

  index | the index of the item to be returned (zero-based indexing)

Returns
  DisplayObject the item at the given index

Exceptions

  CEIException |

## ◆ GetObjectList()

DisplayObjectArray * Group::GetObjectList | ( |  | ) |

Returns a list of the objects in order.

Precondition
  !isNULL()

Returns
  DisplayObjectArray the array containing the objects of the group

Exceptions

  CEIException |

## ◆ InsertObject()

void Group::InsertObject | ( | DisplayObject * | obj,
|  | bool | reparent = `true`,
|  | bool | recalculateBoundingbox = `true`,
|  | int | loc = `DEFAULT_GROUP_LOCATION`,
|  | bool | renameName = `false`
| ) |  |

Inserts an object into the group.

Precondition
  !isNULL()

Exceptions

  CEIException |

Parameters

  obj | object to be added
  reparent | reparent the object after it is added, default True
  recalculateBoundingbox | recalculate the bounding box of the group after the object is added, default True
  loc | Location of the object within the group, default DEFAULT_GROUP_LOCATION - the end of the list
  renameName | Allows the object name to be altered if a duplicate name is found, otherwise the function throws an exception if a duplicate name is found, default False

## ◆ InsertObjectAllowDuplicateNames()

void Group::InsertObjectAllowDuplicateNames | ( | DisplayObject * | obj,
|  | bool | reparent = `true`,
|  | bool | recalculateBoundingbox = `true`,
|  | int | loc = `DEFAULT_GROUP_LOCATION`
| ) |  |

Inserts an object into the group.

Does not rename object or throw if the object name is a duplicate. Should only be used in cases where the object name will be made unique later (e.g. in a catalyzer)

Precondition
  !isNULL()

Exceptions

  CEIException |

Parameters

  obj | object to be added
  reparent | reparent the object after it is added, default True
  recalculateBoundingbox | recalculate the bounding box of the group after the object is added, default True
  loc | Location of the object within the group, default DEFAULT_GROUP_LOCATION - the end of the list

## ◆ MoveObjectToGroup()

void Group::MoveObjectToGroup | ( | DisplayObject * | obj,
|  | bool | recalculateBoundingbox = `true`,
|  | int | loc = `DEFAULT_GROUP_LOCATION`,
|  | bool | renameName = `false`
| ) |  |

Moves an object from its current group into this group.

Precondition
  !isNULL()

Exceptions

  CEIException |

Parameters

  obj | object to be moved
  recalculateBoundingbox | recalculate the bounding box of the groups after the object is moved, default True
  loc | Location of the object within the group, default DEFAULT_GROUP_LOCATION - the end of the list
  renameName | Allows the object name to be altered if a duplicate name is found, otherwise the function throws an exception if a duplicate name is found, default False

## ◆ MoveObjectToGroupAllowDuplicateNames()

void Group::MoveObjectToGroupAllowDuplicateNames | ( | DisplayObject * | obj,
|  | bool | recalculateBoundingbox = `true`,
|  | int | loc = `DEFAULT_GROUP_LOCATION`
| ) |  |

Moves an object from its current group into this group.

Does not rename object or throw if the object name is a duplicate. Should only be used in cases where the object name will be made unique later (e.g. in a catalyzer)

Precondition
  !isNULL()

Exceptions

  CEIException |

Parameters

  obj | object to be moved
  recalculateBoundingbox | recalculate the bounding box of the groups after the object is moved, default True
  loc | Location of the object within the group, default DEFAULT_GROUP_LOCATION - the end of the list

## ◆ ReorderObject()

void Group::ReorderObject | ( | unsigned int | oldIndex,
|  | unsigned int | newIndex
| ) |  |

Reorders the object from oldIndex to newIndex.

Precondition
  !isNULL()

Exceptions

  CEIException |

Parameters

  oldIndex | the old index of the object
  newIndex | the index the object will be moved to

## ◆ SetGroupLocation()

void Group::SetGroupLocation | ( | Vertex & | v | ) |

Copies the given vertex data into the group's location vertex thereby moving the group's location member without affecting its child objects.

Parameters

  v | Given vertex

Since
  GL Studio 6.3.1

## ◆ Ungroup()

void Group::Ungroup | ( |  | ) |

Destroys a group, and places all of the contained objects into the group's parent group.

## Member Data Documentation

## ◆ DEFAULT_GROUP_LOCATION

int Group::DEFAULT_GROUP_LOCATION = -1
| static

Default group location.

This specifies the end of the list.

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

- Group.i