vrml.fieldtypes
Definitions of the standard VRML97 field-types
These are all of the "low-level" field-types
(i.e. not nodes) defined by VRML97. Each has
a canonical in-memory storage format so that
code can rely on that format when dealing with
the field values.
We use Numeric Python arrays whereever possible.
Functions
_collapse(
inlist
,
isinstance
= <built-in function isinstance>
,
ltype
= <type 'list'>
,
maxint
= 9223372036854775807
)
Destructively flatten a list hierarchy to a single level.
Non-recursive, and (as far as I can see, doesn't have any
glaring loopholes).
Further speedups and obfuscations by Tim Peters :)
Classes
class _MFFloat32(
_MFFloat
):
32-BIT floating-point type
class _MFMatrix3d(
_MFVec
):
3x3 matrix-set field/event type base-class
class _MFMatrix3f(
_MFVec32
):
3x3 matrix-set field/event type base-class
class _MFMatrix4d(
_MFVec
):
4x4 matrix-set field/event type base-class
class _MFMatrix4f(
_MFVec32
):
4x4 matrix-set field/event type base-class
class _MFRotation(
_MFVec
):
MFRotation field/event type base-class
MFVecXX field/event type base-class
Stored as x * self.length Numeric Python double array
length
Base class which holds a single array-type value (can be arbitrarily spec'd numpy array)
class _SFArray32(
_SFArray
):
32-bit version of SFArrays
SFImage field/event type base-class
SFImage = MFInt32, should do something more
intelligent, such as auto-compiling those to
mip-mapped images, or at least storing them
efficiently.
class _SFMatrix3d(
_SFVec
):
3x3 matrix field/event type base-class
class _SFMatrix3f(
_SFVec32
):
class _SFMatrix4d(
_SFVec
):
4x4 matrix field/event type base-class
class _SFMatrix4f(
_SFVec32
):
class _SFRotation(
_SFVec32
):
SFRotation field/event type base-class
SFString field/event type base-class
coerce(
self
,
value
)
Coerce the given value to our type
Allowable types:
simple string -> unchanged
unicode string -> utf-8 encoded
sequence of length == 1 where first element is a string -> returns first element
sequence of length > 1 where all elements are strings -> returns string.join( value, '')
SFVecXX field/event type base-class
Stored as a Numeric-python double array of self.length
length
MFColor Event class
MFFloat32 Field class
MFFloat32 Event class
MFFloat Event class
MFInt32 Event class
MFMatrix3d Field class
MFMatrix3d Field class
MFMatrix3f Field class
MFMatrix3f Field class
MFMatrix4d Field class
MFMatrix3d Field class
MFMatrix4f Field class
MFMatrix4f Field class
MFRotation Field class
MFRotation Event class
MFString Event class
MFUInt32 Event class
MFVec2d Event class
MFVec2f Event class
MFVec3d Event class
MFVec3f Event class
MFVec4d Event class
MFVec4f Event class
SFArray32 Field class
SFArray32 Event class
SFArray Event class
SFColor Event class
SFFloat Event class
SFImage Event class
SFInt32 Event class
SFMatrix3d Field class
SFMatrix3d Field class
SFMatrix3f Field class
SFMatrix3f Field class
SFMatrix4d Field class
SFMatrix3d Field class
SFMatrix4f Field class
SFMatrix4f Field class
SFRotation Field class
SFRotation Event class
SFString Event class
SFInt32 Event class
SFVec2d Event class
SFVec2f Event class
SFVec3d Event class
SFVec3f Event class
SFVec4f Event class
SFVec4f Event class