Open topic with navigation
Matrix transform basics
Transforms are objects that embody generic position and orientation
data. Vizard
uses them internally for all its operations. You
can use these to:
- create complex motions not possible with standard
methods
- operate directly on 4x4 homogenous matrices
- utilize many handy matrix math functions available
Creating Transforms
mat = viz.Matrix()
# Create a fresh
matrix object
mat.postTrans([0,1.8,0]) # Post
multiply it by a translation matrix
Applying to 3D objects
mat = viz.Matrix()
mat.setPosition([0, 1.8, 0])
myObject = viz.add('beachball.osgb')
myObject.setMatrix(mat)
See also
In this section:
Combining Transforms
Quaternions
Matrix Transforms command
table
Other sections:
3D model transforms basics
Example scripts:
Matrix transformations