Classes | |
| struct | common::MATRIX |
| Macierz 4 x 4. More... | |
| struct | common::MATRIX33 |
| Macierz 3 x 3. More... | |
Functions | |
| void | common::MatrixToStr (tstring *Out, const MATRIX &m) |
| bool | common::StrToMatrix (MATRIX *Out, const tstring &Str) |
| void | common::swap (MATRIX &m1, MATRIX &m2) |
| bool | common::MatrixEqual (const MATRIX &m1, const MATRIX &m2) |
| Zwraca true, jeśli podane macierze są sobie mniej więcej równe. | |
| void | common::Minus (MATRIX *m) |
| Negacja macierzy w miejscu. | |
| void | common::Add (MATRIX *Out, const MATRIX &m1, const MATRIX &m2) |
| Dodawanie macierzy. | |
| void | common::Sub (MATRIX *Out, const MATRIX &m1, const MATRIX &m2) |
| Odejmowanie macierzy. | |
| void | common::Mul (MATRIX *Out, const MATRIX &m1, const MATRIX &m2) |
| Mnożenie macierzy. | |
| void | common::Mul (MATRIX *m, float s) |
| Mnożenie macierzy przez skalar w miejscu. | |
| void | common::Div (MATRIX *m, float s) |
| Dzielenie macierzy przez skalar w miejscu. | |
| void | common::Mul3x3 (MATRIX &out, const MATRIX &m1, const MATRIX &m2) |
| Multiplication of 3x3 submatrices. | |
| void | common::Mul4x3 (MATRIX &out, const MATRIX &m1, const MATRIX &m2) |
| Multiplication of 4x3 submatrices. | |
| void | common::Transform (VEC4 *Out, const VEC2 &v, const MATRIX &m) |
| Mnożenie wektora 2D jako [x,y,0,1] przez macierz, wychodzi wektor 4D. | |
| void | common::Transform (VEC2 *Out, const VEC2 &v, const MATRIX &m) |
| Mnożenie wektora 2D jako [x,y,0,1] przez macierz z olaniem wyjściowego W. | |
| void | common::TransformCoord (VEC2 *Out, const VEC2 &v, const MATRIX &m) |
| Mnożenie wektora 2D jako [x,y,0,1] przez macierz i sprowadzenie z powrotem do 2D przez podzielenie przez W. | |
| void | common::TransformNormal (VEC2 *Out, const VEC2 &v, const MATRIX &m) |
| Mnożenie wektora 2D jako [x,y,0,0] przez macierz. | |
| void | common::Transform (VEC4 *Out, const VEC3 &v, const MATRIX &m) |
| Mnożenie wektora 3D jako [X,Y,Z,1] przez macierz, wychodzi wektor 4D. | |
| void | common::Transform (VEC3 *Out, const VEC3 &v, const MATRIX &m) |
| Mnożenie wektora 3D jako [X,Y,Z,1] przez macierz z olaniem wyjściowego W. | |
| void | common::TransformCoord (VEC3 *Out, const VEC3 &v, const MATRIX &m) |
| Mnożenie wektora 3D jako [X,Y,Z,1] przez macierz i sprowadzenie z powrotem do 3D przez podzielenie przez W. | |
| void | common::TransformNormal (VEC3 *Out, const VEC3 &v, const MATRIX &m) |
| Mnożenie wektora 3D jako [X,Y,Z,0] przez macierz. | |
| void | common::TransformArray (VEC3 OutPoints[], const VEC3 InPoints[], size_t PointCount, const MATRIX &M) |
| Przekształca na raz całą tablicę wektorów - w miejscu lub z tablicy wejściowej do wyjściowej. | |
| void | common::TransformArray (VEC3 InOutPoints[], size_t PointCount, const MATRIX &M) |
| void | common::TransformNormalArray (VEC3 OutPoints[], const VEC3 InPoints[], size_t PointCount, const MATRIX &M) |
| void | common::TransformNormalArray (VEC3 InOutPoints[], size_t PointCount, const MATRIX &M) |
| void | common::TransformCoordArray (VEC3 OutPoints[], const VEC3 InPoints[], size_t PointCount, const MATRIX &M) |
| void | common::TransformCoordArray (VEC3 InOutPoints[], size_t PointCount, const MATRIX &M) |
| void | common::Transform (VEC4 *Out, const VEC4 &v, const MATRIX &m) |
| Mnożenie wektora 4D przez macierz. | |
| void | common::TransformNormalByTranspose (VEC3 *Out, const VEC3 &v, const MATRIX &m) |
| Mnoży wektor przez transpozycję podanej macierzy m (jej podmacierzy 3x3). | |
| void | common::Untransform (VEC3 *Out, const VEC3 &v, const MATRIX &m) |
| Mnoży punkt przez odwrotnosć podanej macierzy m (jej podmacierzy 4x3), ale bez odwracania. | |
| void | common::UntransformNormal (VEC3 *Out, const VEC3 &v, const MATRIX &m) |
| Mnoży wektor przez odwrotnosć podanej macierzy m (jej podmacierzy 3x3), ale bez odwracania. | |
| void | common::Transform (PLANE *Out, const PLANE &p, const MATRIX &m) |
| Przekształca płaszczyznę przez macierz. | |
| void | common::TransformRay (VEC3 *OutOrigin, VEC3 *OutDir, const VEC3 &RayOrigin, const VEC3 &RayDir, const MATRIX &m) |
| Przekształca promień przez macierz. | |
| void | common::TransformBox (BOX *Out, const BOX &In, const MATRIX &M) |
| Przekształca AABB przez podaną macierz i wylicza AABB tego co wyszło po przekształceniu. | |
| void | common::TransformBoxCoord (BOX *Out, const BOX &In, const MATRIX &M) |
| Przekształca AABB przez podaną macierz i wylicza AABB tego co wyszło po przekształceniu. | |
| void | common::MatrixSetTranslation (MATRIX *InOut, float TranslationX, float TranslationY, float TranslationZ) |
| Ustawia translację w macierzy. | |
| void | common::MatrixSetTranslation (MATRIX *InOut, const VEC3 &Translation) |
| Ustawia translację w macierzy. | |
| void | common::MatrixGetTranslation (float *OutTranslationX, float *OutTranslationY, float *OutTranslationZ, const MATRIX &m) |
| Pobiera translację z macierzy. | |
| void | common::MatrixGetTranslation (VEC3 *OutTranslation, const MATRIX &m) |
| Pobiera translację z macierzy. | |
| void | common::AxesToMatrix (MATRIX *Out, const VEC3 &AxisX, const VEC3 &AxisY, const VEC3 &AxisZ) |
| Tworzy macierz przekształcającą do lokalnego układu współrzędnych wyznaczonego przez podane 3 osie. | |
| void | common::AxesToMatrixTranslation (MATRIX *Out, const VEC3 &Origin, const VEC3 &AxisX, const VEC3 &AxisY, const VEC3 &AxisZ) |
| Tworzy macierz przekształcającą do lokalnego układu współrzędnych wyznaczonego przez podane 3 osie i pozycję początku tego układu. | |
| void | common::LookAtLH (MATRIX *Out, const VEC3 &Eye, const VEC3 &Forward, const VEC3 &Up) |
| Macierz kamery. | |
| void | common::LookAtRH (MATRIX *Out, const VEC3 &Eye, const VEC3 &Forward, const VEC3 &Up) |
| void | common::Identity (MATRIX *Out) |
| Tworzy macierz identycznościową. | |
| void | common::Translation (MATRIX *Out, float x, float y, float z) |
| Tworzy macierz translacji (przesuwania). | |
| void | common::Translation (MATRIX *Out, const VEC3 &v) |
| void | common::Scaling (MATRIX *Out, float sx, float sy, float sz) |
| Tworzy macierz skalowania (powiększania, pomniejszania, rozciągania). | |
| void | common::Scaling (MATRIX *Out, const VEC3 &sv) |
| void | common::Scaling (MATRIX *Out, float s) |
| void | common::ScalingAxis (MATRIX *Out, const VEC3 &n, float k) |
| Tworzy macierz skalowania wzdłuż podanego kierunku. | |
| void | common::Rotation2D (MATRIX *Out, float Angle) |
| Macierz obrotu 2D. | |
| void | common::RotationX (MATRIX *Out, float Angle) |
| Macierz obrotu wokół osi X. | |
| void | common::RotationY (MATRIX *Out, float Angle) |
| Macierz obrotu wokół osi Y. | |
| void | common::RotationZ (MATRIX *Out, float Angle) |
| Macierz obrotu wokół osi Z. | |
| void | common::RotationAxisLH (MATRIX *Out, const VEC3 &Axis, float Angle) |
| void | common::RotationAxisRH (MATRIX *Out, const VEC3 &Axis, float Angle) |
| void | common::RotationYawPitchRoll (MATRIX *Out, float Yaw, float Pitch, float Roll) |
| Macierz obrotu wokół trzech osi w kolejności Yaw-Pitch-Roll (ZXY) - tzw. kąty Eulera. | |
| void | common::RotationYawPitchRoll (MATRIX *Out, const VEC3 &EulerAngles) |
| void | common::RotationYawPitchRollInv (MATRIX *Out, float Yaw, float Pitch, float Roll) |
| Przekształca ze wsp. świata do obiektu (interial -> object space). | |
| void | common::RotationYawPitchRollInv (MATRIX *Out, const VEC3 &EulerAngles) |
| void | common::OrthoLH (MATRIX *Out, float Width, float Height, float ZNear, float ZFar) |
| Tworzy macierz rzutowania ortogonalnego. | |
| void | common::OrthoRH (MATRIX *Out, float Width, float Height, float ZNear, float ZFar) |
| void | common::OrthoOffCenterLH (MATRIX *Out, float Left, float Right, float Bottom, float Top, float ZNear, float ZFar) |
| void | common::OrthoOffCenterRH (MATRIX *Out, float Left, float Right, float Bottom, float Top, float ZNear, float ZFar) |
| void | common::PerspectiveLH (MATRIX *Out, float Width, float Height, float ZNear, float ZFar) |
| Tworzy macierz rzutowania perspektywicznego. | |
| void | common::PerspectiveRH (MATRIX *Out, float Width, float Height, float ZNear, float ZFar) |
| void | common::PerspectiveFovLH (MATRIX *Out, float FovY, float Aspect, float ZNear, float ZFar) |
| void | common::PerspectiveFovRH (MATRIX *Out, float FovY, float Aspect, float ZNear, float ZFar) |
| void | common::PerspectiveOffCenterLH (MATRIX *Out, float Left, float Right, float Bottom, float Top, float ZNear, float ZFar) |
| void | common::PerspectiveOffCenterRH (MATRIX *Out, float Left, float Right, float Bottom, float Top, float ZNear, float ZFar) |
| void | common::PerspectiveFovLH_Inf (MATRIX *Out, float FovY, float Aspect, float ZNear) |
| Wersja tworząca macierz z Z-Far = INFINITY. | |
| void | common::MatrixShadow (MATRIX *Out, const VEC4 &Light, const PLANE &Plane) |
| Tworzy macierz spłaszczającą geometrię na podaną płaszczyznę w podanym kierunku padania światła. | |
| void | common::MatrixReflect (MATRIX *Out, const PLANE &p) |
| Tworzy macierz odbijającą geometrię względem podanej płaszczyzny. | |
| void | common::Transpose (MATRIX *m) |
| Transpozycja macierzy na miejscu. | |
| void | common::Transpose (MATRIX *Out, const MATRIX &m) |
| Transpozycja macierzy. | |
| void | common::Lerp (MATRIX *Out, const MATRIX &m1, const MATRIX &m2, float t) |
| Interpolacja liniowa macierzy. | |
| float | common::Det (const MATRIX &m) |
| Wyznacznik macierzy. | |
| bool | common::Inverse (MATRIX *Out, const MATRIX &m) |
| Odwrotność macierzy. | |
| void | common::Matrix33ToMatrix (MATRIX *Out, const MATRIX33 &m) |
| Konwertuje macierz 3x3 na macierz 4x4. | |
| void | common::MatrixToMatrix33 (MATRIX33 *Out, const MATRIX &m) |
| Wyciąga podmacierz 3x3 z macierzy 4x4. | |
| void | common::Identity (MATRIX33 *Out) |
| Tworzy macierz identycznościową. | |
| void | common::Transpose (MATRIX33 *m) |
| Transpozycja macierzy na miejscu. | |
| void | common::Transpose (MATRIX33 *Out, const MATRIX33 &m) |
| Transpozycja macierzy. | |
Variables | |
| const MATRIX | common::MATRIX_ZERO |
| const MATRIX | common::MATRIX_IDENTITY |
| const MATRIX33 | common::MATRIX33_ZERO |
| const MATRIX33 | common::MATRIX33_IDENTITY |
| void common::Add | ( | MATRIX * | Out, | |
| const MATRIX & | m1, | |||
| const MATRIX & | m2 | |||
| ) |
Dodawanie macierzy.
| void common::AxesToMatrix | ( | MATRIX * | Out, | |
| const VEC3 & | AxisX, | |||
| const VEC3 & | AxisY, | |||
| const VEC3 & | AxisZ | |||
| ) |
Tworzy macierz przekształcającą do lokalnego układu współrzędnych wyznaczonego przez podane 3 osie.
Nastąpi obrót, a jeśli nie są znormalizowane to i skalowanie.
| void common::AxesToMatrixTranslation | ( | MATRIX * | Out, | |
| const VEC3 & | Origin, | |||
| const VEC3 & | AxisX, | |||
| const VEC3 & | AxisY, | |||
| const VEC3 & | AxisZ | |||
| ) |
Tworzy macierz przekształcającą do lokalnego układu współrzędnych wyznaczonego przez podane 3 osie i pozycję początku tego układu.
Nastąpi obrót, a jeśli osie są znormalizowane to i skalowanie.
| float common::Det | ( | const MATRIX & | m | ) |
Wyznacznik macierzy.
| void common::Div | ( | MATRIX * | m, | |
| float | s | |||
| ) |
Dzielenie macierzy przez skalar w miejscu.
| void common::Identity | ( | MATRIX33 * | Out | ) |
Tworzy macierz identycznościową.
| void common::Identity | ( | MATRIX * | Out | ) |
Tworzy macierz identycznościową.
| bool common::Inverse | ( | MATRIX * | Out, | |
| const MATRIX & | m | |||
| ) |
Odwrotność macierzy.
| void common::Lerp | ( | MATRIX * | Out, | |
| const MATRIX & | m1, | |||
| const MATRIX & | m2, | |||
| float | t | |||
| ) |
Interpolacja liniowa macierzy.
| void common::LookAtLH | ( | MATRIX * | Out, | |
| const VEC3 & | Eye, | |||
| const VEC3 & | Forward, | |||
| const VEC3 & | Up | |||
| ) |
Macierz kamery.
Eye to punkt, Forward i Up to wektory.
| void common::LookAtRH | ( | MATRIX * | Out, | |
| const VEC3 & | Eye, | |||
| const VEC3 & | Forward, | |||
| const VEC3 & | Up | |||
| ) |
| void common::Matrix33ToMatrix | ( | MATRIX * | Out, | |
| const MATRIX33 & | m | |||
| ) |
Konwertuje macierz 3x3 na macierz 4x4.
| bool common::MatrixEqual | ( | const MATRIX & | m1, | |
| const MATRIX & | m2 | |||
| ) |
Zwraca true, jeśli podane macierze są sobie mniej więcej równe.
| void common::MatrixGetTranslation | ( | VEC3 * | OutTranslation, | |
| const MATRIX & | m | |||
| ) |
Pobiera translację z macierzy.
| void common::MatrixGetTranslation | ( | float * | OutTranslationX, | |
| float * | OutTranslationY, | |||
| float * | OutTranslationZ, | |||
| const MATRIX & | m | |||
| ) |
Pobiera translację z macierzy.
| void common::MatrixReflect | ( | MATRIX * | Out, | |
| const PLANE & | p | |||
| ) |
Tworzy macierz odbijającą geometrię względem podanej płaszczyzny.
Płaszczyzna musi być znormalizowana.
| void common::MatrixSetTranslation | ( | MATRIX * | InOut, | |
| const VEC3 & | Translation | |||
| ) |
Ustawia translację w macierzy.
| void common::MatrixSetTranslation | ( | MATRIX * | InOut, | |
| float | TranslationX, | |||
| float | TranslationY, | |||
| float | TranslationZ | |||
| ) |
Ustawia translację w macierzy.
| void common::MatrixShadow | ( | MATRIX * | Out, | |
| const VEC4 & | Light, | |||
| const PLANE & | Plane | |||
| ) |
Tworzy macierz spłaszczającą geometrię na podaną płaszczyznę w podanym kierunku padania światła.
Płaszczyzna musi być znormalizowana.
| void common::MatrixToMatrix33 | ( | MATRIX33 * | Out, | |
| const MATRIX & | m | |||
| ) |
Wyciąga podmacierz 3x3 z macierzy 4x4.
| void common::MatrixToStr | ( | tstring * | Out, | |
| const MATRIX & | m | |||
| ) |
| void common::Minus | ( | MATRIX * | m | ) |
Negacja macierzy w miejscu.
| void common::Mul | ( | MATRIX * | m, | |
| float | s | |||
| ) |
Mnożenie macierzy przez skalar w miejscu.
| void common::Mul | ( | MATRIX * | Out, | |
| const MATRIX & | m1, | |||
| const MATRIX & | m2 | |||
| ) |
Mnożenie macierzy.
| void common::Mul3x3 | ( | MATRIX & | out, | |
| const MATRIX & | m1, | |||
| const MATRIX & | m2 | |||
| ) |
Multiplication of 3x3 submatrices.
m1 and m2 are assumed to be in form of linear transforms like this (4th rows and columns are ignored):
_11 _12 _13 0 _21 _22 _23 0 _31 _32 _33 0 0 0 0 1
Output matrix has only 3x3 submatrix modified. 4th row and column stay untouched.
Use this method for better efficiency whenever you deal with transforms that have no translation or perspective projection.
| void common::Mul4x3 | ( | MATRIX & | out, | |
| const MATRIX & | m1, | |||
| const MATRIX & | m2 | |||
| ) |
Multiplication of 4x3 submatrices.
m1 and m2 are assumed to be in form of affine transforms like this (4th columns are ignored):
_11 _12 _13 0 _21 _22 _23 0 _31 _32 _33 0 _41 _42 _43 1
Output matrix has only 4x3 submatrix modified. 4th column stays untouched. Use this method for better efficiency whenever you deal with transforms that have no perspective projection.
| void common::OrthoLH | ( | MATRIX * | Out, | |
| float | Width, | |||
| float | Height, | |||
| float | ZNear, | |||
| float | ZFar | |||
| ) |
Tworzy macierz rzutowania ortogonalnego.
Dane są w układzie kamery.
| void common::OrthoOffCenterLH | ( | MATRIX * | Out, | |
| float | Left, | |||
| float | Right, | |||
| float | Bottom, | |||
| float | Top, | |||
| float | ZNear, | |||
| float | ZFar | |||
| ) |
| void common::OrthoOffCenterRH | ( | MATRIX * | Out, | |
| float | Left, | |||
| float | Right, | |||
| float | Bottom, | |||
| float | Top, | |||
| float | ZNear, | |||
| float | ZFar | |||
| ) |
| void common::OrthoRH | ( | MATRIX * | Out, | |
| float | Width, | |||
| float | Height, | |||
| float | ZNear, | |||
| float | ZFar | |||
| ) |
| void common::PerspectiveFovLH | ( | MATRIX * | Out, | |
| float | FovY, | |||
| float | Aspect, | |||
| float | ZNear, | |||
| float | ZFar | |||
| ) |
| void common::PerspectiveFovLH_Inf | ( | MATRIX * | Out, | |
| float | FovY, | |||
| float | Aspect, | |||
| float | ZNear | |||
| ) |
Wersja tworząca macierz z Z-Far = INFINITY.
| void common::PerspectiveFovRH | ( | MATRIX * | Out, | |
| float | FovY, | |||
| float | Aspect, | |||
| float | ZNear, | |||
| float | ZFar | |||
| ) |
| void common::PerspectiveLH | ( | MATRIX * | Out, | |
| float | Width, | |||
| float | Height, | |||
| float | ZNear, | |||
| float | ZFar | |||
| ) |
Tworzy macierz rzutowania perspektywicznego.
Width i Height są wymiarami na płaszczyźnie bliskiej (near). Left, Top, Right, Bottom prawdopodobnie też. Tworzone macierze są "W-Friendly" - wektor przemnożony przez taką macierz ma w składowej W komponent Z.
| void common::PerspectiveOffCenterLH | ( | MATRIX * | Out, | |
| float | Left, | |||
| float | Right, | |||
| float | Bottom, | |||
| float | Top, | |||
| float | ZNear, | |||
| float | ZFar | |||
| ) |
| void common::PerspectiveOffCenterRH | ( | MATRIX * | Out, | |
| float | Left, | |||
| float | Right, | |||
| float | Bottom, | |||
| float | Top, | |||
| float | ZNear, | |||
| float | ZFar | |||
| ) |
| void common::PerspectiveRH | ( | MATRIX * | Out, | |
| float | Width, | |||
| float | Height, | |||
| float | ZNear, | |||
| float | ZFar | |||
| ) |
| void common::Rotation2D | ( | MATRIX * | Out, | |
| float | Angle | |||
| ) |
Macierz obrotu 2D.
| void common::RotationAxisLH | ( | MATRIX * | Out, | |
| const VEC3 & | Axis, | |||
| float | Angle | |||
| ) |
Axis musi być znormalizowany.
| void common::RotationAxisRH | ( | MATRIX * | Out, | |
| const VEC3 & | Axis, | |||
| float | Angle | |||
| ) | [inline] |
| void common::RotationX | ( | MATRIX * | Out, | |
| float | Angle | |||
| ) |
Macierz obrotu wokół osi X.
| void common::RotationY | ( | MATRIX * | Out, | |
| float | Angle | |||
| ) |
Macierz obrotu wokół osi Y.
| void common::RotationYawPitchRoll | ( | MATRIX * | Out, | |
| const VEC3 & | EulerAngles | |||
| ) |
| void common::RotationYawPitchRoll | ( | MATRIX * | Out, | |
| float | Yaw, | |||
| float | Pitch, | |||
| float | Roll | |||
| ) |
Macierz obrotu wokół trzech osi w kolejności Yaw-Pitch-Roll (ZXY) - tzw. kąty Eulera.
W przypadku wektora składowe odpowiadają obrotom wokół poszczególnych osi, czyli: X = Pitch, Y = Yaw, Z = Roll Przekształca ze wsp. obiektu do świata (object -> interial space). Czyli tak naprawdę robi ZXY.
| Yaw | jest wokół osi Y. | |
| Pitch | jest wokół osi X. | |
| Roll | jest wokół osi Z. |
| void common::RotationYawPitchRollInv | ( | MATRIX * | Out, | |
| const VEC3 & | EulerAngles | |||
| ) |
| void common::RotationYawPitchRollInv | ( | MATRIX * | Out, | |
| float | Yaw, | |||
| float | Pitch, | |||
| float | Roll | |||
| ) |
Przekształca ze wsp. świata do obiektu (interial -> object space).
Czyli tworzy macierz dokładnie odwrotną do tej z RotationYawPitchRoll.
| void common::RotationZ | ( | MATRIX * | Out, | |
| float | Angle | |||
| ) |
Macierz obrotu wokół osi Z.
| void common::Scaling | ( | MATRIX * | Out, | |
| float | s | |||
| ) |
| void common::Scaling | ( | MATRIX * | Out, | |
| const VEC3 & | sv | |||
| ) |
| void common::Scaling | ( | MATRIX * | Out, | |
| float | sx, | |||
| float | sy, | |||
| float | sz | |||
| ) |
Tworzy macierz skalowania (powiększania, pomniejszania, rozciągania).
| void common::ScalingAxis | ( | MATRIX * | Out, | |
| const VEC3 & | n, | |||
| float | k | |||
| ) |
Tworzy macierz skalowania wzdłuż podanego kierunku.
| k | współczynnik skalowania | |
| n | wektor kierunku, musi być znormalizowany |
| bool common::StrToMatrix | ( | MATRIX * | Out, | |
| const tstring & | Str | |||
| ) |
| void common::Sub | ( | MATRIX * | Out, | |
| const MATRIX & | m1, | |||
| const MATRIX & | m2 | |||
| ) |
Odejmowanie macierzy.
| void common::swap | ( | MATRIX & | m1, | |
| MATRIX & | m2 | |||
| ) | [inline] |
| void common::Transform | ( | PLANE * | Out, | |
| const PLANE & | p, | |||
| const MATRIX & | m | |||
| ) |
Przekształca płaszczyznę przez macierz.
| p | Płaszczyzna ma być znormalizowana. | |
| m | Macierz ma być odwrotna i transponowana względem normalnej macierzy. |
| void common::Transform | ( | VEC4 * | Out, | |
| const VEC4 & | v, | |||
| const MATRIX & | m | |||
| ) |
Mnożenie wektora 4D przez macierz.
Czyli przekształcenie wektora we współrzędnych jednorodnych przez tą macierz.
| void common::Transform | ( | VEC3 * | Out, | |
| const VEC3 & | v, | |||
| const MATRIX & | m | |||
| ) |
Mnożenie wektora 3D jako [X,Y,Z,1] przez macierz z olaniem wyjściowego W.
Dobre do przekształcania wektorów 3D jeśli macierz reprezentuje przekształcenie liniowe.
| void common::Transform | ( | VEC4 * | Out, | |
| const VEC3 & | v, | |||
| const MATRIX & | m | |||
| ) |
Mnożenie wektora 3D jako [X,Y,Z,1] przez macierz, wychodzi wektor 4D.
| void common::Transform | ( | VEC2 * | Out, | |
| const VEC2 & | v, | |||
| const MATRIX & | m | |||
| ) |
Mnożenie wektora 2D jako [x,y,0,1] przez macierz z olaniem wyjściowego W.
| void common::Transform | ( | VEC4 * | Out, | |
| const VEC2 & | v, | |||
| const MATRIX & | m | |||
| ) |
Mnożenie wektora 2D jako [x,y,0,1] przez macierz, wychodzi wektor 4D.
| void common::TransformArray | ( | VEC3 | InOutPoints[], | |
| size_t | PointCount, | |||
| const MATRIX & | M | |||
| ) |
| void common::TransformArray | ( | VEC3 | OutPoints[], | |
| const VEC3 | InPoints[], | |||
| size_t | PointCount, | |||
| const MATRIX & | M | |||
| ) |
Przekształca na raz całą tablicę wektorów - w miejscu lub z tablicy wejściowej do wyjściowej.
| void common::TransformBox | ( | BOX * | Out, | |
| const BOX & | In, | |||
| const MATRIX & | M | |||
| ) |
Przekształca AABB przez podaną macierz i wylicza AABB tego co wyszło po przekształceniu.
| void common::TransformBoxCoord | ( | BOX * | Out, | |
| const BOX & | In, | |||
| const MATRIX & | M | |||
| ) |
Przekształca AABB przez podaną macierz i wylicza AABB tego co wyszło po przekształceniu.
Wersja dzieląca przez W - można stosować też do macierzy projekcji.
| void common::TransformCoord | ( | VEC3 * | Out, | |
| const VEC3 & | v, | |||
| const MATRIX & | m | |||
| ) |
Mnożenie wektora 3D jako [X,Y,Z,1] przez macierz i sprowadzenie z powrotem do 3D przez podzielenie przez W.
Dobre do niezawodnego przekształcania wektorów 3D przez dowolną macierz np. rzutowania.
| void common::TransformCoord | ( | VEC2 * | Out, | |
| const VEC2 & | v, | |||
| const MATRIX & | m | |||
| ) |
Mnożenie wektora 2D jako [x,y,0,1] przez macierz i sprowadzenie z powrotem do 2D przez podzielenie przez W.
| void common::TransformCoordArray | ( | VEC3 | InOutPoints[], | |
| size_t | PointCount, | |||
| const MATRIX & | M | |||
| ) |
| void common::TransformCoordArray | ( | VEC3 | OutPoints[], | |
| const VEC3 | InPoints[], | |||
| size_t | PointCount, | |||
| const MATRIX & | M | |||
| ) |
| void common::TransformNormal | ( | VEC3 * | Out, | |
| const VEC3 & | v, | |||
| const MATRIX & | m | |||
| ) |
Mnożenie wektora 3D jako [X,Y,Z,0] przez macierz.
Dobre do przekształcania wektorów (np. normalnych), nie punktów, bo nie robi translacji.
| void common::TransformNormal | ( | VEC2 * | Out, | |
| const VEC2 & | v, | |||
| const MATRIX & | m | |||
| ) |
Mnożenie wektora 2D jako [x,y,0,0] przez macierz.
| void common::TransformNormalArray | ( | VEC3 | InOutPoints[], | |
| size_t | PointCount, | |||
| const MATRIX & | M | |||
| ) |
| void common::TransformNormalArray | ( | VEC3 | OutPoints[], | |
| const VEC3 | InPoints[], | |||
| size_t | PointCount, | |||
| const MATRIX & | M | |||
| ) |
| void common::TransformNormalByTranspose | ( | VEC3 * | Out, | |
| const VEC3 & | v, | |||
| const MATRIX & | m | |||
| ) |
Mnoży wektor przez transpozycję podanej macierzy m (jej podmacierzy 3x3).
| void common::TransformRay | ( | VEC3 * | OutOrigin, | |
| VEC3 * | OutDir, | |||
| const VEC3 & | RayOrigin, | |||
| const VEC3 & | RayDir, | |||
| const MATRIX & | m | |||
| ) |
Przekształca promień przez macierz.
| void common::Translation | ( | MATRIX * | Out, | |
| const VEC3 & | v | |||
| ) |
| void common::Translation | ( | MATRIX * | Out, | |
| float | x, | |||
| float | y, | |||
| float | z | |||
| ) |
Tworzy macierz translacji (przesuwania).
| void common::Transpose | ( | MATRIX33 * | Out, | |
| const MATRIX33 & | m | |||
| ) |
Transpozycja macierzy.
| void common::Transpose | ( | MATRIX33 * | m | ) |
Transpozycja macierzy na miejscu.
| void common::Transpose | ( | MATRIX * | Out, | |
| const MATRIX & | m | |||
| ) |
Transpozycja macierzy.
| void common::Transpose | ( | MATRIX * | m | ) |
Transpozycja macierzy na miejscu.
| void common::Untransform | ( | VEC3 * | Out, | |
| const VEC3 & | v, | |||
| const MATRIX & | m | |||
| ) |
Mnoży punkt przez odwrotnosć podanej macierzy m (jej podmacierzy 4x3), ale bez odwracania.
Czyli jeśli macierz zawiera rotację i translację, to wykonuje na punkcie przekształcenie odwrotne do tego które jest w tej macierzy.
Pomysłodawca: Krzysiek K.
| void common::UntransformNormal | ( | VEC3 * | Out, | |
| const VEC3 & | v, | |||
| const MATRIX & | m | |||
| ) |
Mnoży wektor przez odwrotnosć podanej macierzy m (jej podmacierzy 3x3), ale bez odwracania.
Czyli jeśli macierz zawiera rotację i translację, to wykonuje na punkcie przekształcenie odwrotne do rotacji, która jest w tej macierzy.
| const MATRIX33 common::MATRIX33_IDENTITY |
| const MATRIX33 common::MATRIX33_ZERO |
| const MATRIX common::MATRIX_IDENTITY |
| const MATRIX common::MATRIX_ZERO |
1.6.1