 |
 |
 |
Python Computer Graphics Kit |
 |
 |
 |
The ASFReader class reads Acclaim Skeleton Files (ASF) and
calls appropriate methods which have to be implemented in a derived class.
| class ASFReader( |
filename) |
-
filename is the name of the ASF file that should be read.
-
Read the entire file.
-
This method is called when the file format version is encountered.
version is a float containing the version number.
-
This method is called when the skeleton name is read.
-
This method is called when the units section was read. units
is a dictionary that contains all definitions that were present in the
units section of the input file. The key is the unit name (such as
mass, length and angle) and the value is the
corresponding value. If possible the value was cast to float, otherwise
it's still a string.
-
This method is called when the file documentation was read. doc
contains the documentation (which may contain several lines).
-
This method is called when the root section was read. This section contains
information about the root of the skeleton. data is a dictionary
that contains all the key-value pairs in the root section. The value
is always a tuple (even when it's only one single value).
-
This method is called after the entire bone data was read. bones
is a list of bone definitions. Each definition is a data dictionary
containing the key-value pairs in the respective bone section. All values
are tuples (even when it's only one single value). An exception to this
is the
limits attribute which is a list of (min, max)
tuples that contain the minumum and maximum limits as floats (or as the
special strings "-inf" and "inf").
-
This method is called after the hierarchy section was read. links
is a list of 2-tuples (parent, children) where parent
is the name of the parent bone and children is a list of children
bone names.
Release 2.0.0alpha8, documentation updated on February 24, 2008.