Transform (Français)

Disponible depuis LÖVE 11.0
Ce-tte type n'est pas supporté-e par des versions plus anciennes.

Objet contenant un système de coordonnées de transformation.

Le module love.graphics comporte plusieurs fonctions et variantes accéptant des objets Transform (transforme).

Constructeurs

love.math.newTransform Creates a new Transform object. Added since 11.0

Fonctions

Object:release Immediately destroys the object's Lua reference. Added since 11.0
Object:type Gets the type of the object as a string.
Object:typeOf Checks whether an object is of a certain type.
Transform:apply Applies the given other Transform object to this one. Added since 11.0
Transform:clone Creates a new copy of this Transform. Added since 11.0
Transform:getMatrix Gets the internal transformation matrix stored by this Transform. Added since 11.0
Transform:inverse Creates a new Transform containing the inverse of this Transform. Added since 11.0
Transform:inverseTransformPoint Applies the reverse of the Transform object's transformation to the given 2D position. Added since 11.0
Transform:isAffine2DTransform Checks whether the Transform is an affine transformation. Added since 11.0
Transform:reset Resets the Transform to an identity state. Added since 11.0
Transform:rotate Applies a rotation to the Transform's coordinate system. Added since 11.0
Transform:scale Scales the Transform's coordinate system. Added since 11.0
Transform:setMatrix Directly sets the Transform's internal transformation matrix. Added since 11.0
Transform:setTransformation Resets the Transform to the specified transformation parameters. Added since 11.0
Transform:shear Applies a shear factor (skew) to the Transform's coordinate system. Added since 11.0
Transform:transformPoint Applies the Transform object's transformation to the given 2D position. Added since 11.0
Transform:translate Applies a translation to the Transform's coordinate system. Added since 11.0

Enums

MatrixLayout The layout of matrix elements (row-major or column-major). Added since 11.0

Supertypes

Notes

Les objets Transform comporte un opérateur * (multiplication) personnalisé. resultat = tA * tB est équivalent à result = tA:clone():apply(tB). Il agit sur l'opération de multiplication de matrices qu’exécute Transform:apply.

L'opérateur * créé un nouvel objet Transform, il n'est donc pas recommandé de l'utilisé en trop grande quantité sur du code image par image.

Voir également

[[Category:Types] (Français)]

Autres langues