mirror of
https://github.com/love2d/love.git
synced 2026-08-15 07:41:11 +02:00
Added Transform objects to love.math (resolves issue #1228).
- Added love.math.newTransform. - Added love.graphics.applyTransform and love.graphics.replaceTransform. - love.graphics.draw/print/printf, Text:add/addf, and SpriteBatch:add can accept a Transform argument. - love.graphics.push can accept an optional Transform as a second argument, which will apply the Transform after pushing the matrix stack, - Shader:send can accept Transform objects when sending to a mat4 uniform variable. --HG-- branch : minor
This commit is contained in:
@@ -52,6 +52,12 @@ public:
|
||||
**/
|
||||
Matrix4(float t00, float t10, float t01, float t11, float x, float y);
|
||||
|
||||
/**
|
||||
* Creates a new matrix from the specified elements. Be sure to pass
|
||||
* exactly 16 elements in!
|
||||
**/
|
||||
Matrix4(const float elements[16]);
|
||||
|
||||
/**
|
||||
* Creates a new matrix set to a transformation.
|
||||
**/
|
||||
@@ -182,6 +188,9 @@ public:
|
||||
template <typename V>
|
||||
void transform(V *dst, const V *src, int size) const;
|
||||
|
||||
/**
|
||||
* Computes and returns the inverse of the matrix.
|
||||
**/
|
||||
Matrix4 inverse() const;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user