vispy.visuals.transforms.chain.
ChainTransform
Bases: vispy.visuals.transforms.base_transform.BaseTransform
vispy.visuals.transforms.base_transform.BaseTransform
BaseTransform subclass that performs a sequence of transformations in order. Internally, this class uses shaders.FunctionChain to generate its glsl_map and glsl_imap functions.
Arguments:
See transforms property.
transforms
Isometric
Linear
NonScaling
Orthogonal
append
Add a new transform to the end of this chain.
The transform to use.
glsl_imap
glsl_map
imap
Inverse map coordinates
Coordinates to inverse map.
Coordinates.
map
Map coordinates
Coordinates to map.
prepend
Add a new transform to the beginning of this chain.
shader_imap
see shader_map.
shader_map
Return a shader Function that accepts only a single vec4 argument and defines new attributes / uniforms supplying the Function with any static input.
simplified
A simplified representation of the same transformation.
The list of transform that make up the transform chain.
The order of transforms is given such that the last transform in the list is the first to be invoked when mapping coordinates through the chain.
For example, the following two mappings are equivalent:
# Map coordinates through individual transforms: trans1 = STTransform(scale=(2, 3), translate=(0, 1)) trans2 = PolarTransform() mapped = trans1.map(trans2.map(coords)) # Equivalent mapping through chain: chain = ChainTransform([trans1, trans2]) mapped = chain.map(coords)
SimplifiedChainTransform
Bases: vispy.visuals.transforms.chain.ChainTransform
vispy.visuals.transforms.chain.ChainTransform
source_changed
Generate a simplified chain by joining adjacent transforms.