3.3 Data Transfer between (Numerical) Python and Open Inventor
The classes
- SoMFColor,
- SoMFFloat,
- SoMFInt32,
- SoMFRotation,
- SoMFUInt32,
- SoMFVec2f,
- SoMFVec3d,
- SoMFVec3f, and
- SoMFVec4f
have constructors which accept 1- or 2-dimensional Python data structures as
arguments.
The data structures can be Python lists, Python tuples or the array classes
provided by the Numerical Python extensions.
Depending on which Numerical Python extensions have been installed during the
build of IVuPy those classes provided methods to return the data in a
Numerical Python array:
-
Returns a NumPy array.
-
Returns a Numeric array.
-
Returns a numarray array.
Note:
The unit tests in Tests/test_to_numerical.py show how to transfer data
between Open Inventor and Numerical Python.
The classes
- SbColor,
- SbVec2d,
- SbVec2f,
- SbVec2s,
- SbVec3d,
- SbVec3f,
- SbVec3s,
- SbVec4d,
- SbVec4f,
- SoSFVec2f,
- SoSFVec2s,
- SoSFVec3d,
- SoSFVec3f,
- SoSFVec3s, and
- SoSFVec4f
have constructors which accept 1-dimensional Python sequences as arguments.
The sequences (with a length of 2, 3, or 4) can be Python lists, Python tuples
or the array classes provided by the Numerical Python extensions.
Those classes also have a method setValue() taking the same sequences
as argument.
Release cvs, documentation updated on April 5, 2006. Hosted on