Python Script Engine  8.3
GL Studio Editor Python Script API
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 ()
 
str GetName ()
 
str SetName (str name)
 
None SetProtectionMode (DisplayObject::MemberAccess_e mode)
 
DisplayObject::MemberAccess_e GetProtectionMode (None)
 
None SetLocked (bool val)
 
bool GetLocked (None)
 
bool GetGenerateMemberVariable ()
 
None SetGenerateMemberVariable (bool b)
 
bool GetAntiAliasing ()
 
None SetAntiAliasing (bool antiAliasing)
 
bool GetBlinking ()
 
None SetBlinking (bool blinking)
 
float GetBlinkRate ()
 
None SetBlinkRate (float rate)
 
int GetAlphaMode ()
 
None SetAlphaMode (int mode)
 
bool GetCullBackFaces ()
 
None SetCullBackFaces (bool cullFaces)
 
bool GetZBufferTestedFlag ()
 
None SetZBufferTestedFlag (bool tested)
 
bool GetAffectZBufferFlag ()
 
None SetAffectZBufferFlag (bool affect)
 
bool GetLightingEnabledFlag ()
 
None SetLightingEnabledFlag (bool enabled)
 
DisplayObject::PickableType_e GetPickMode ()
 
None SetPickMode (DisplayObject::PickableType_e mode)
 
bool GetVisibilityFlag ()
 
None SetVisibilityFlag (bool visible)
 
PolygonClose_e GetClosePolygonFlag ()
 
None SetClosePolygonFlag (PolygonClose_e closePolygon)
 
PolygonMode_e GetPolygonMode ()
 
None SetPolygonMode (PolygonMode_e polygonMode)
 
ShadingType_e GetShadingMode ()
 
None SetShadingMode (ShadingType_e shadingMode)
 
Vertex GetLocation ()
 
None SetLocation (Vertex loc)
 
Vertex GetRotationPoint ()
 
None SetRotationPoint (Vertex rotPoint)
 
GlsMatrixAffineGetDcsMatrix ()
 
None SetDcsMatrix (GlsMatrixAffine *matrix)
 
int GetMaterialIndex ()
 
None SetMaterialIndex (int matIndex)
 
str GetObjectClassName ()
 
int GetTextureIndex ()
 
None SetTextureIndex (int texIndex)
 
TextureMap_e GetTextureMappingTechnique ()
 
None SetTextureMappingTechnique (TextureMap_e mappingTechnique)
 
bool GetTextureRepeat ()
 
None SetTextureRepeat (bool repeat)
 
disti::GlsColor GetBlendingColor ()
 
None SetBlendingColor (GlsColor blendColor)
 
DisplayObject::TextureFilter_e GetTextureMagnificationFilter ()
 
None SetTextureMagnificationFilter (DisplayObject::TextureFilter_e filter)
 
DisplayObject::TextureFilter_e GetTextureMinificationFilter ()
 
None SetTextureMinificationFilter (DisplayObject::TextureFilter_e filter)
 
list GetTextureCoordinates ()
 
None SetTextureCoordinates (list &texVerts)
 
None GetTextureCoordinates (VertexArray *texVerts)
 
None SetTextureCoordinates (VertexArray &texVerts)
 
None GetTexturePoints (VertexArray *texVerts)
 
None SetTexturePoints (VertexArray &texVerts)
 
None SetTexturePoints (list &texVerts)
 
list GetTexturePoints ()
 
None GetVertices (VertexArray *verts)
 
None SetVertices (VertexArray &verts)
 
str GetInitialization ()
 
None SetInitialization (str initCode)
 
str GetCallbackCode ()
 
None SetCallbackCode (str cbCode)
 
DisplayObjectDuplicateObject (Document *doc=NULL)
 
DisplayObjectTessellateObject ()
 
DisplayObjectExtrudeObject (float amount)
 
None RotateObject (float amount, RotationAxis_e axis)
 
None TranslateObject (float x, float y, float z)
 
None ScaleObject (float x, float y, float z, Vertex *anchor=NULL)
 
None LineWidth (float width)
 
float LineWidth ()
 
LineStyle_e LineStyle ()
 
None LineStyle (LineStyle_e style)
 
GlsColor LineColor ()
 
None LineColor (GlsColor color)
 
GlsColor FillColor ()
 
None FillColor (GlsColor color)
 
None GetExtents (Vector &min, Vector &max)
 
bool HasUserDefinedAttribute (str attribName)
 
std::map< str, str > GetUserDefinedAttributes ()
 
UserDefinedValueAttributeList GetAllUserDefinedAttributes ()
 
str GetUserDefinedAttributeValue (str attribName)
 
 typemap (check) str attribName
 
None SetUserDefinedAttributeValue (str attribName, str value)
 
DisplayObjectGetParent ()
 
DocumentGetDocument ()
 
str AlternateClassName ()
 
None AlternateClassName (str name)
 
str GetAlternateClassHeaderFile ()
 
None SetAlternateClassHeaderFile (str name)
 
str GetResources ()
 
str GetRuntimeResources (bool recursive)
 
str GetAttributeType (str attribName)
 
str GetAttributeValuestr (str attribName)
 
None SetAttributeValuestr (str attribName, str value)
 
int RegisterObserver (str attribName, PyObject *pyfunc)
 
None UnregisterObserver (str attribName, int id)
 
list GetNormals ()
 
None SetNormals (list &normals)
 
list GetExtraAttributes ()
 
DisplayObjectCloneObject ()
 
None CopyProperties (DisplayObject *sourceObj)
 
None SetLocation (Vector loc)
 
GlsMatrixAffine GetObjectCoordinatesTransform (DisplayObject *targetObject)
 
None CalculateParentBoundingBox ()
 
None 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

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

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

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

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

Enumerator
POLY_OPEN 

Polygon will be drawn open.

POLY_CLOSED 

Polygon will be drawn closed.

◆ 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

Enumerator
X_AXIS 

Rotate around the X Axis.

Y_AXIS 

Rotate around the Y Axis.

Z_AXIS 

Rotate around the Z Axis.

◆ 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

Enumerator
TESSELLATE_UNION 

Union tessellation.

TESSELLATE_INTERSECT 

Intersection tessellation.

TESSELLATE_DIFFERENCE 

Difference tessellation.

◆ 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

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]

str DisplayObject::AlternateClassName ( )

Gets the alternate class name generated for object.

◆ AlternateClassName() [2/2]

None DisplayObject::AlternateClassName ( str  name)

Sets the alternate class name generated for object.

◆ CalculateParentBoundingBox()

None 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()

None DisplayObject::CopyProperties ( DisplayObject sourceObj)

Copies properties from the source object to this object.

Parameters
sourceObjThe object to copy properties from
Since
GL Studio 7.0.1

◆ DuplicateObject()

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

Duplicates the display object.

Parameters
docDocument 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
amountAmount 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]

None DisplayObject::FillColor ( GlsColor  color)

Sets the fill color of the Display Object.

Parameters
colorfill 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()

str 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()

str DisplayObject::GetAttributeType ( str  attribName)
Returns
The underlying type name for a single attribute of the object. e.g. int, GlsColor
Parameters
attribNameThe name of the attribute whose type is to be returned.

◆ GetAttributeValuestr()

str DisplayObject::GetAttributeValuestr ( str  attribName)

Gets the value for a single attribute of the object.

See also
SetAttributeValuestr()
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()

str DisplayObject::GetCallbackCode ( )

Retrieves the display object's callback code.

Returns
str 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()

None DisplayObject::GetExtents ( Vector min,
Vector max 
)

Figure out the static extents for the object.

Parameters
minGets the minimum extents
maxGets the maximum extents

◆ GetExtraAttributes()

list 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()

str DisplayObject::GetInitialization ( )

Retrieves the display object's initialization code.

Returns
str 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 ( None  )

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()

str DisplayObject::GetName ( )

Retrieves the display object's name.

Returns
str containing the name of the object

◆ GetNormals()

list DisplayObject::GetNormals ( )

Returns a list of Vector normals for the DisplayObject.

Since
GL Studio 6.0.1

◆ GetObjectClassName()

str DisplayObject::GetObjectClassName ( )

Retrieves the display object's ObjectClassName.

Returns
str 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
targetObjectthe 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 ( None  )

Get the protection mode for this object.

Returns
The protection mode for this object
See also
MemberAccess_e

◆ GetResources()

str DisplayObject::GetResources ( )

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

See also
GetAttributeValuestr()
SetAttributeValuestr()

◆ GetRotationPoint()

Vertex DisplayObject::GetRotationPoint ( )

Retrieves the display object's rotation point.

Returns
Vertex the object's rotation point

◆ GetRuntimeResources()

str 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
recursivewhether or not to recurse to children
See also
GetAttributeValuestr()
SetAttributeValuestr()
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]

list DisplayObject::GetTextureCoordinates ( )

Retrieves the display object's Texture Coordinates.

Returns
a list of the object's Texture Coordinates

◆ GetTextureCoordinates() [2/2]

None DisplayObject::GetTextureCoordinates ( VertexArray texVerts)

Retrieves the display object's Texture Coordinates.

Parameters
texVertsreturns 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]

list DisplayObject::GetTexturePoints ( )

Retrieves the display object's Texture Points.

Returns
the object's Texture Points
Since
GL Studio 6.0.1

◆ GetTexturePoints() [2/2]

None DisplayObject::GetTexturePoints ( VertexArray texVerts)

Retrieves the display object's Texture Points.

Parameters
texVertsreturns 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< str, str > 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()

str DisplayObject::GetUserDefinedAttributeValue ( str  attribName)

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

Parameters
attribNamename of the attribute for which to find the value
Returns
str value of the attribute, or None if there is no Attribute named attribName

◆ GetVertices()

None DisplayObject::GetVertices ( VertexArray verts)

Retrieves the display object's Vertices.

Parameters
vertsreturns 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 ( str  attribName)

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

Parameters
attribNamename 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]

None DisplayObject::LineColor ( GlsColor  color)

Sets the line color of the Display Object.

Parameters
colorline 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]

None DisplayObject::LineStyle ( LineStyle_e  style)

Sets the line style of the Display Object.

Parameters
styleline 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]

None DisplayObject::LineWidth ( float  width)

Sets the line width of the Display Object.

Parameters
widthline width to be applied to the Display Object

◆ RegisterObserver()

int DisplayObject::RegisterObserver ( str  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
attribNamethe name of the attribute to register with
pyfuncthe 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 GetAttributeValuestr
Returns
The ID of this registration.

◆ RotateObject()

None DisplayObject::RotateObject ( float  amount,
RotationAxis_e  axis 
)

Rotate the object.

Parameters
amountamount to rotate the object
axisaxis of rotation

◆ ScaleObject()

None DisplayObject::ScaleObject ( float  x,
float  y,
float  z,
Vertex anchor = NULL 
)

Scale the object.

Parameters
xValue of the percentage of scale in x-axis
yValue of the percentage of scale in y-axis
zValue of the percentage of scale in z-axis
anchorAnchor from which to scale object relative to, default NULL will anchor at object location

◆ SetAffectZBufferFlag()

None DisplayObject::SetAffectZBufferFlag ( bool  affect)

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

Parameters
affectNew state for the Affect Z-Buffer flag of the object

◆ SetAlphaMode()

None DisplayObject::SetAlphaMode ( int  mode)

Set the alpha mode state for this object.

Parameters
modewhich alpha mode to use when drawing
See also
AlphaMode_e
Since
GL Studio 6.0.1

◆ SetAlternateClassHeaderFile()

None DisplayObject::SetAlternateClassHeaderFile ( str  name)

Sets the alternate class header file for object.

Since
GL Studio 6.0.1

◆ SetAntiAliasing()

None DisplayObject::SetAntiAliasing ( bool  antiAliasing)

Sets the display object's name.

Parameters
antiAliasingNew state for the anti-aliasing flag of the object

◆ SetAttributeValuestr()

None DisplayObject::SetAttributeValuestr ( str  attribName,
str  value 
)

Sets the value for a single attribute of the object.

See also
GetAttributeValuestr()
GetResources()

◆ SetBlendingColor()

None DisplayObject::SetBlendingColor ( GlsColor  blendColor)

Sets the display object's Blending Color.

Parameters
blendColorNew Blending Color of the object

◆ SetBlinking()

None DisplayObject::SetBlinking ( bool  blinking)

Sets the display object's blinking flag.

Parameters
blinkingNew state for the blinking flag of the object

◆ SetBlinkRate()

None DisplayObject::SetBlinkRate ( float  rate)

Sets the display object's blinking rate.

Parameters
rateNew rate for the blink of the object

◆ SetCallbackCode()

None DisplayObject::SetCallbackCode ( str  cbCode)

Sets the display object's callback code.

Parameters
cbCodeNew callback code for the object

◆ SetClosePolygonFlag()

None DisplayObject::SetClosePolygonFlag ( PolygonClose_e  closePolygon)

Sets the display object's Close Polygon flag.

Parameters
closePolygonNew state for the Close Polygon flag of the object

◆ SetCullBackFaces()

None DisplayObject::SetCullBackFaces ( bool  cullFaces)

Sets the display object's Cull Backfaces flag.

Parameters
cullFacesNew state for the Cull Backfaces flag of the object

◆ SetDcsMatrix()

None DisplayObject::SetDcsMatrix ( GlsMatrixAffine matrix)

Sets the display object's DCS matrix.

Parameters
matrixNew DCS matrix to apply to the object

◆ SetGenerateMemberVariable()

None DisplayObject::SetGenerateMemberVariable ( bool  b)

◆ SetInitialization()

None DisplayObject::SetInitialization ( str  initCode)

Sets the display object's initialization code.

Parameters
initCodeNew initialization code for the object

◆ SetLightingEnabledFlag()

None DisplayObject::SetLightingEnabledFlag ( bool  enabled)

Sets the display object's Lighting Enabled flag.

Parameters
enabledNew state for the Lighting Enabled flag of the object

◆ SetLocation() [1/2]

None DisplayObject::SetLocation ( Vector  loc)

Sets the display object's location.

Parameters
locNew location of the object
See also
SetLocation( Vertex )
Since
GL Studio 6.2.1

◆ SetLocation() [2/2]

None DisplayObject::SetLocation ( Vertex  loc)

Sets the display object's location.

Parameters
locNew location of the object
See also
SetLocation( Vector )

◆ SetLocked()

None DisplayObject::SetLocked ( bool  val)

Set the locked status for this object.

Parameters
valSet locked status.

◆ SetMaterialIndex()

None DisplayObject::SetMaterialIndex ( int  matIndex)

Sets the display object's Material Index.

Parameters
matIndexNew Material Index of the object

◆ SetName()

str DisplayObject::SetName ( str  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
nameNew 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
RuntimeErrorIf name is empty
RuntimeErrorIf 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()

None DisplayObject::SetNormals ( list &  normals)

Sets the normal vectors for the DisplayObject.

Parameters
normalsthe list of new normal Vectors for the object
Since
GL Studio 6.0.1

◆ SetOrigin()

None 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
vertThe new origin point for the object
Since
GL Studio 6.3.1

◆ SetPickMode()

None DisplayObject::SetPickMode ( DisplayObject::PickableType_e  mode)

Sets the display object's pick mode.

Parameters
modeNew mode for object's pick mode

◆ SetPolygonMode()

None DisplayObject::SetPolygonMode ( PolygonMode_e  polygonMode)

Sets the display object's PolygonMode.

Parameters
polygonModeNew state for the PolygonMode of the object

◆ SetProtectionMode()

None 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
modeHow the variable will be generated: PUBLIC, PRIVATE, PROTECTED
See also
MemberAccess_e

◆ SetRotationPoint()

None DisplayObject::SetRotationPoint ( Vertex  rotPoint)

Sets the display object's rotation point.

Parameters
rotPointNew location of the object's rotation point

◆ SetShadingMode()

None DisplayObject::SetShadingMode ( ShadingType_e  shadingMode)

Sets the display object's Shading Mode.

Parameters
shadingModeNew Shading Mode of the object

◆ SetTextureCoordinates() [1/2]

None DisplayObject::SetTextureCoordinates ( list &  texVerts)

Sets the display object's Texture Coordinates.

Parameters
texVertsNew Texture Coordinates of the object

◆ SetTextureCoordinates() [2/2]

None DisplayObject::SetTextureCoordinates ( VertexArray texVerts)

Sets the display object's Texture Coordinates.

Parameters
texVertsNew Texture Coordinates of the object
Deprecated:
Use SetTextureCoordinates( list& ) instead.

◆ SetTextureIndex()

None DisplayObject::SetTextureIndex ( int  texIndex)

Sets the display object's Texture Index.

Parameters
texIndexNew Texture Index of the object

◆ SetTextureMagnificationFilter()

None DisplayObject::SetTextureMagnificationFilter ( DisplayObject::TextureFilter_e  filter)

Sets the display object's Texture Magnification Filter.

Parameters
filterNew Texture Magnification Filter of the object; either TEXTURE_FILTER_NEAREST or TEXTURE_FILTER_LINEAR

◆ SetTextureMappingTechnique()

None DisplayObject::SetTextureMappingTechnique ( TextureMap_e  mappingTechnique)

Sets the display object's Texture Mapping Technique.

Parameters
mappingTechniqueNew Texture Mapping Technique of the object

◆ SetTextureMinificationFilter()

None DisplayObject::SetTextureMinificationFilter ( DisplayObject::TextureFilter_e  filter)

Sets the display object's Texture Minification Filter.

Parameters
filterNew Texture Minification Filter of the object

◆ SetTexturePoints() [1/2]

None DisplayObject::SetTexturePoints ( list &  texVerts)

Sets the display object's Texture Points.

Parameters
texVertsNew Texture Points of the object
Since
GL Studio 6.0.1

◆ SetTexturePoints() [2/2]

None DisplayObject::SetTexturePoints ( VertexArray texVerts)

Sets the display object's Texture Points.

Parameters
texVertsNew Texture Points of the object
Deprecated:
Use SetTexturePoints( list& ) instead.

◆ SetTextureRepeat()

None DisplayObject::SetTextureRepeat ( bool  repeat)

Sets the display object's Texture Repeat.

Parameters
repeatNew Texture Repeat of the object

◆ SetUserDefinedAttributeValue()

None DisplayObject::SetUserDefinedAttributeValue ( str  attribName,
str  value 
)

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

Parameters
attribNamename of the attribute for which to set the value
valuevalue to be given to the attribute

◆ SetVertices()

None DisplayObject::SetVertices ( VertexArray verts)

Sets the display object's Vertices.

Parameters
vertsNew vertex list for the object, with at least two vertices

◆ SetVisibilityFlag()

None DisplayObject::SetVisibilityFlag ( bool  visible)

Sets the display object's Visibility flag.

Parameters
visibleNew state for the Visibility flag of the object

◆ SetZBufferTestedFlag()

None DisplayObject::SetZBufferTestedFlag ( bool  tested)

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

Parameters
testedNew 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()

None DisplayObject::TranslateObject ( float  x,
float  y,
float  z 
)

Translate the object.

Parameters
xtranslation amount along the x-axis
ytranslation amount along the y-axis
ztranslation amount along the z-axis

◆ typemap()

DisplayObject::typemap ( check  )

◆ UnregisterObserver()

None DisplayObject::UnregisterObserver ( str  attribName,
int  id 
)

Unregister a previously registered observer.

Parameters
attribNamethe name of the attribute to unregister with
idthe 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: