rigz.vector: | Functions | Types | Modinfo | Source |
CreateMatrix2 | Create a new 2d matrix. |
CreateVector2 | Create a new 2d vector. |
tlMatrix2 | Matrix type which can be used to easily transform vectors. |
tlVector2 | 2d vector type for basic vector handling. |
Function CreateMatrix2:tlMatrix2(aa:Float = 1, ab:Float = 0, ba:Float = 0, bb:Float = 1) | |
Description | Create a new 2d matrix. |
Function CreateVector2:tlVector2(x:Float, y:Float) | |
Description | Create a new 2d vector. |
Type tlMatrix2 | |
Description | Matrix type which can be used to easily transform vectors. |
Information | Matrices come in handy for transforming vectors such as scale and rotation. |
Methods Summary | |
---|---|
scale | Scale the matrix by a given amount. |
set | Set the matrix to a new set of values. |
transform | Transfrom the matrix. |
transformpoint | Transfrom a point. |
transformvector | Transfrom a vector with the matrix. |
transpose | Transpose the matrix. |
Functions Summary | |
---|---|
Create | Create a new matrix. |
Method scale(s:Float) | |
Description | Scale the matrix by a given amount. |
Method set(_aa:Float = 1, _ab:Float = 0, _ba:Float = 0, _bb:Float = 1) | |
Description | Set the matrix to a new set of values. |
Information | Use this to prepare the matrix for a new transform. For example if you wanted to to rotate a vector, then you could do
|
Method transform:tlMatrix2(m:tlMatrix2) | |
Description | Transfrom the matrix. |
Information | Multiplies 2 matrices together returns: New transformed matrix. |
Method transformpoint(x:Float, y:Float, tx:Float Var, ty:Float Var) | |
Returns | New coordinates for the tranformed point in tx and ty. |
Description | Transfrom a point. |
Information | This will transform a point (x,y) and appply the new coordinates into tx and ty. |
Method transformvector:tlVector2(v:tlVector2) | |
Returns | New transformed vector. |
Description | Transfrom a vector with the matrix. |
Information | You can use this to transfrom a vector, rotating it, scaling it etc. |
Method transpose() | |
Description | Transpose the matrix. |
Function Create:tlMatrix2(aa:Float = 1, ab:Float = 0, ba:Float = 0, bb:Float = 1) | |
Returns | New matrix type. |
Description | Create a new matrix. |
Type tlVector2 | |
Description | 2d vector type for basic vector handling. |
Methods Summary | |
---|---|
AddVector | Add this tlVector2 vector to another and return the result in a new vector. |
Clone | Clone a Vector. |
Create | Create a new vector with the given coordinates. |
DotProduct | Get the dot product of the vector. |
Length | Get the length of the vector. |
Move | Move a vector but the given x and y amount. |
MoveByVector | Move a vector buy the given vector. |
Multiply | multiply this vector with another and return the result. |
Normal | get the normal of the vector. |
Normalise | Normalise the vector. |
Scale | Scale the vector by the given amount and return the result in a new vector. |
SetPosition | Reposition the vector by the new x,y coordinates given. |
SetPositionByVector | Reposition the vector by the given vector. |
SubtractVector | Subtract this tlVector2 vector by another and return the result in a new vector. |
Unit | Get the unit vector of the vector. |
Method AddVector:tlVector2(v:tlVector2) | |
Returns | A new tlVector2. |
Description | Add this tlVector2 vector to another and return the result in a new vector. |
Method Clone:tlVector2() | |
Returns | Newly cloned tlVector2. |
Description | Clone a Vector. |
Method Create:tlVector2(vx:Float, vy:Float) | |
Returns | New tlVector2. |
Description | Create a new vector with the given coordinates. |
Method DotProduct:Float(v:tlVector2) | |
Returns | The dot product of the vector. |
Description | Get the dot product of the vector. |
Method Length:Float() | |
Returns | The length or magnitude of the vector. |
Description | Get the length of the vector. |
Method Move(distance_x:Float, distance_y:Float) | |
Description | Move a vector but the given x and y amount. |
Method MoveByVector(distance:tlVector2) | |
Description | Move a vector buy the given vector. |
Method Multiply:tlVector2(v:tlVector2) | |
Returns | New tlvector2. |
Description | multiply this vector with another and return the result. |
Method Normal:tlVector2() | |
Returns | New tlVector2 normal of this vector. |
Description | get the normal of the vector. |
Method Normalise() | |
Description | Normalise the vector. |
Method Scale:tlVector2(scale:Float) | |
Returns | new scaled tlvector2. |
Description | Scale the vector by the given amount and return the result in a new vector. |
Method SetPosition(_x:Float, _y:Float) | |
Description | Reposition the vector by the new x,y coordinates given. |
Method SetPositionByVector(v:tlVector2) | |
Description | Reposition the vector by the given vector. |
Method SubtractVector:tlVector2(v:tlVector2) | |
Returns | A new tlVector2. |
Description | Subtract this tlVector2 vector by another and return the result in a new vector. |
Method Unit:tlVector2() | |
Returns | New unit vector of this vector. |
Description | Get the unit vector of the vector. |
Author | Peter J. Rigby |
---|---|
Copyright | Peter J. Rigby 2009 |
Purpose | Classes for vectors and matrices |
Version | v1.07 |