Package mmLib :: Module Viewer :: Class GLObject
[show private | hide private]
[frames | no frames]

Type GLObject

object --+
         |
        GLObject

Known Subclasses:
GLDrawList, GLViewer

Base class for all OpenGL rendering objects. It combines a composite-style tree structure with a system for setting properties. The properties are used for the specific OpenGL drawing objects to control color, position, line width, etc... Implementing properties requres the GLProperties object which is the access object for the properties.
Method Summary
  __init__(self, **args)
  glo_add_child(self, child)
  glo_add_property(self, prop_desc)
Adds a new property to the GLObject.
  glo_add_update_callback(self, func)
Adds a function which is called whenever property values change.
  glo_append_child(self, child)
Adds a child GLObject to the end of the GLObject's child list.
  glo_count_descendants(self)
Counts all decendant GLObjects.
  glo_get_child(self, gl_object_id)
Returns the child GLObject matching the given gl_object_id.
  glo_get_child_path(self, glo_id_path)
Returns the object at the given path, or None if the object does not exist.
  glo_get_degree(self)
Returns the number of children (degree).
  glo_get_depth(self)
Returns the depth, the root composite is depth 0.
  glo_get_glstructure(self)
Returns the parent GLStructure object, or None if the GLObject is not a child of a GLStructure.
  glo_get_index_path(self)
Returns the tree-path to the GLObject as a list of its integer indexes.
  glo_get_lowest_common_ancestor(self, gl_object)
Returns the lowest common ancesotry of self and argument composite.
  glo_get_parent(self)
Returns the parent GLObject.
  glo_get_parent_list(self)
Returns a list of the parent GLObjects back to the root.
  glo_get_path(self)
Returns the tree-path to the composite as a list of its parent composites.
  glo_get_properties_id(self)
Returns the properties ID of this object.
  glo_get_property_desc(self, name)
Return the property description dictionary for the given property name.
  glo_get_root(self)
Returns the root GLObject.
  glo_init_properties(self, **args)
This is a special form of update which propagates all linked values, not just the changed ones.
  glo_install_properties(self)
Called by GLObject.__init__ to install properties.
  glo_is_descendant_of(self, gl_object)
Returns true if self composite is a decent of argument GLObject.
  glo_iter_children(self)
Iterate immediate children.
  glo_iter_preorder_traversal(self)
Preorder Traversal for GLObject composite.
  glo_iter_property_desc(self)
Iterates over all property descriptions.
  glo_link_child_property(self, name, child_gl_object_id, child_name)
Link the value of the GLObject's property to the value of a child property.
  glo_name(self)
Returns the GLObject name.
  glo_prepend_child(self, child)
Adds a child GLObject to the beginning of the GLObject's child list.
  glo_remove(self)
The GLObject removes itself from its parent.
  glo_remove_child(self, child)
Removes the child GLObject.
  glo_remove_update_callback(self, func)
Removes the update callback.
  glo_set_name(self, name)
Sets the GLObject name.
  glo_set_properties_id(self, gl_object_id)
Set the property name for this GLObject.
  glo_update_properties(self, **args)
Update property values and trigger update callbacks.
  glo_update_properties_path(self, glo_id_path, value)
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Class Variable Summary
GLPropertyDefault PropertyDefault = <mmLib.Viewer.GLPropertyDefault object...

Method Details

glo_add_property(self, prop_desc)

Adds a new property to the GLObject. The prop_desc is a dictionary with attributes describing the property. See comments in source code for a description of the key values for property descriptions.

glo_add_update_callback(self, func)

Adds a function which is called whenever property values change. The function is called with two arguments: a updates dictionary containing all updated properties and the values they were changed to, and a actions list which contains a unique list of action key words forme self.prop_list = [] self.callback_list = [] from the action fields of the updated properties.

glo_append_child(self, child)

Adds a child GLObject to the end of the GLObject's child list.

glo_count_descendants(self)

Counts all decendant GLObjects.

glo_get_child(self, gl_object_id)

Returns the child GLObject matching the given gl_object_id.

glo_get_child_path(self, glo_id_path)

Returns the object at the given path, or None if the object does not exist.

glo_get_degree(self)

Returns the number of children (degree).

glo_get_depth(self)

Returns the depth, the root composite is depth 0.

glo_get_glstructure(self)

Returns the parent GLStructure object, or None if the GLObject is not a child of a GLStructure.

glo_get_index_path(self)

Returns the tree-path to the GLObject as a list of its integer indexes.

glo_get_lowest_common_ancestor(self, gl_object)

Returns the lowest common ancesotry of self and argument composite.

glo_get_parent(self)

Returns the parent GLObject.

glo_get_parent_list(self)

Returns a list of the parent GLObjects back to the root.

glo_get_path(self)

Returns the tree-path to the composite as a list of its parent composites.

glo_get_properties_id(self)

Returns the properties ID of this object.

glo_get_property_desc(self, name)

Return the property description dictionary for the given property name.

glo_get_root(self)

Returns the root GLObject.

glo_init_properties(self, **args)

This is a special form of update which propagates all linked values, not just the changed ones.

glo_install_properties(self)

Called by GLObject.__init__ to install properties.

glo_is_descendant_of(self, gl_object)

Returns true if self composite is a decent of argument GLObject.

glo_iter_children(self)

Iterate immediate children.

glo_iter_preorder_traversal(self)

Preorder Traversal for GLObject composite.

glo_iter_property_desc(self)

Iterates over all property descriptions.

glo_link_child_property(self, name, child_gl_object_id, child_name)

Link the value of the GLObject's property to the value of a child property.

glo_name(self)

Returns the GLObject name.

glo_prepend_child(self, child)

Adds a child GLObject to the beginning of the GLObject's child list.

glo_remove(self)

The GLObject removes itself from its parent.

glo_remove_child(self, child)

Removes the child GLObject.

glo_remove_update_callback(self, func)

Removes the update callback.

glo_set_name(self, name)

Sets the GLObject name.

glo_set_properties_id(self, gl_object_id)

Set the property name for this GLObject.

glo_update_properties(self, **args)

Update property values and trigger update callbacks.

Class Variable Details

PropertyDefault

Type:
GLPropertyDefault
Value:
<mmLib.Viewer.GLPropertyDefault object at 0xb79761ac>                  

Generated by Epydoc 2.1 on Sun Apr 23 22:08:39 2006 http://epydoc.sf.net