1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168
|
Usage
vtkGeneralTransform is like vtkTransform and
vtkPerspectiveTransform, but it will work with any
vtkAbstractTransform as input. It is not as efficient as the
other two, however, because arbitrary transformations cannot
be concatenated by matrix multiplication. Transform
concatenation is simulated by passing each input point
through each transform in turn.
To create an instance of class vtkGeneralTransform, simply
invoke its constructor as follows
obj = vtkGeneralTransform
Methods
The class vtkGeneralTransform has several methods that can
be used. They are listed below. Note that the documentation
is translated automatically from the VTK sources, and may
not be completely intelligible. When in doubt, consult the
VTK website. In the methods listed below, obj is an instance
of the vtkGeneralTransform class.
* string = obj.GetClassName ()
* int = obj.IsA (string name)
* vtkGeneralTransform = obj.NewInstance ()
* vtkGeneralTransform = obj.SafeDownCast (vtkObject o)
* obj.Identity () - Set this transformation to the identity
transformation. If the transform has an Input, then the
transformation will be reset so that it is the same as the
Input.
* obj.Inverse () - Invert the transformation. This will also
set a flag so that the transformation will use the inverse
of its Input, if an Input has been set.
* obj.Translate (double x, double y, double z) - Create a
translation matrix and concatenate it with the current
transformation according to PreMultiply or PostMultiply
semantics.
* obj.Translate (double x[3]) - Create a translation matrix
and concatenate it with the current transformation
according to PreMultiply or PostMultiply semantics.
* obj.Translate (float x[3]) - Create a translation matrix
and concatenate it with the current transformation
according to PreMultiply or PostMultiply semantics.
* obj.RotateWXYZ (double angle, double x, double y, double
z) - Create a rotation matrix and concatenate it with the
current transformation according to PreMultiply or
PostMultiply semantics. The angle is in degrees, and
(x,y,z) specifies the axis that the rotation will be
performed around.
* obj.RotateWXYZ (double angle, double axis[3]) - Create a
rotation matrix and concatenate it with the current
transformation according to PreMultiply or PostMultiply
semantics. The angle is in degrees, and (x,y,z) specifies
the axis that the rotation will be performed around.
* obj.RotateWXYZ (double angle, float axis[3]) - Create a
rotation matrix and concatenate it with the current
transformation according to PreMultiply or PostMultiply
semantics. The angle is in degrees, and (x,y,z) specifies
the axis that the rotation will be performed around.
* obj.RotateX (double angle) - Create a rotation matrix
about the X, Y, or Z axis and concatenate it with the
current transformation according to PreMultiply or
PostMultiply semantics. The angle is expressed in degrees.
* obj.RotateY (double angle) - Create a rotation matrix
about the X, Y, or Z axis and concatenate it with the
current transformation according to PreMultiply or
PostMultiply semantics. The angle is expressed in degrees.
* obj.RotateZ (double angle) - Create a rotation matrix
about the X, Y, or Z axis and concatenate it with the
current transformation according to PreMultiply or
PostMultiply semantics. The angle is expressed in degrees.
* obj.Scale (double x, double y, double z) - Create a scale
matrix (i.e. set the diagonal elements to x, y, z) and
concatenate it with the current transformation according
to PreMultiply or PostMultiply semantics.
* obj.Scale (double s[3]) - Create a scale matrix (i.e. set
the diagonal elements to x, y, z) and concatenate it with
the current transformation according to PreMultiply or
PostMultiply semantics.
* obj.Scale (float s[3]) - Create a scale matrix (i.e. set
the diagonal elements to x, y, z) and concatenate it with
the current transformation according to PreMultiply or
PostMultiply semantics.
* obj.Concatenate (vtkMatrix4x4 matrix) - Concatenates the
matrix with the current transformation according to
PreMultiply or PostMultiply semantics.
* obj.Concatenate (double elements[16]) - Concatenates the
matrix with the current transformation according to
PreMultiply or PostMultiply semantics.
* obj.Concatenate (vtkAbstractTransform transform) -
Concatenate the specified transform with the current
transformation according to PreMultiply or PostMultiply
semantics. The concatenation is pipelined, meaning that if
any of the transformations are changed, even after
Concatenate() is called, those changes will be reflected
when you call TransformPoint().
* obj.PreMultiply () - Sets the internal state of the
transform to PreMultiply. All subsequent operations will
occur before those already represented in the current
transformation. In homogeneous matrix notation, M = M*A
where M is the current transformation matrix and A is the
applied matrix. The default is PreMultiply.
* obj.PostMultiply () - Sets the internal state of the
transform to PostMultiply. All subsequent operations will
occur after those already represented in the current
transformation. In homogeneous matrix notation, M = A*M
where M is the current transformation matrix and A is the
applied matrix. The default is PreMultiply.
* int = obj.GetNumberOfConcatenatedTransforms () - Get the
total number of transformations that are linked into this
one via Concatenate() operations or via SetInput().
* vtkAbstractTransform = obj.GetConcatenatedTransform (int
i)
* obj.SetInput (vtkAbstractTransform input) - Set the input
for this transformation. This will be used as the base
transformation if it is set. This method allows you to
build a transform pipeline: if the input is modified, then
this transformation will automatically update accordingly.
Note that the InverseFlag, controlled via Inverse(),
determines whether this transformation will use the Input
or the inverse of the Input.
* vtkAbstractTransform = obj.GetInput () - Set the input for
this transformation. This will be used as the base
transformation if it is set. This method allows you to
build a transform pipeline: if the input is modified, then
this transformation will automatically update accordingly.
Note that the InverseFlag, controlled via Inverse(),
determines whether this transformation will use the Input
or the inverse of the Input.
* int = obj.GetInverseFlag () - Get the inverse flag of the
transformation. This controls whether it is the Input or
the inverse of the Input that is used as the base
transformation. The InverseFlag is flipped every time
Inverse() is called. The InverseFlag is off when a
transform is first created.
* obj.Push () - Pushes the current transformation onto the
transformation stack.
* obj.Pop () - Deletes the transformation on the top of the
stack and sets the top to the next transformation on the
stack.
* obj.InternalTransformPoint (float in[3], float out[3]) -
This will calculate the transformation without calling
Update. Meant for use only within other VTK classes.
* obj.InternalTransformPoint (double in[3], double out[3]) -
This will calculate the transformation without calling
Update. Meant for use only within other VTK classes.
* int = obj.CircuitCheck (vtkAbstractTransform transform) -
Check for self-reference. Will return true if
concatenating with the specified transform, setting it to
be our inverse, or setting it to be our input will create
a circular reference. CircuitCheck is automatically called
by SetInput(), SetInverse(), and Concatenate(vtkXTransform
*). Avoid using this function, it is experimental.
* vtkAbstractTransform = obj.MakeTransform () - Make another
transform of the same type.
* long = obj.GetMTime () - Override GetMTime to account for
input and concatenation.
* FreeMat_Documentation
* Visualization_Toolkit_Common_Classes
* Generated on Thu Jul 25 2013 17:18:30 for FreeMat by
doxygen_ 1.8.1.1
|