wavelength 1.0.0
Loading...
Searching...
No Matches
transformops.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  Rnd

Functions

void InversMatrix (float *pDst, const float *pSrc)
 Invert a rigid transform.
void sceVu0MulAffineMatrix (float *pDst, const float *pA, const float *pB)
 Multiply two affine transforms across all four words of every row.
void sceVu0MulAffineMatrixXyz (float *pDst, const float *pA, const float *pB)
 Multiply two affine transforms in the first three words of every row.
void Rnd::MakeRotMatrix (const float *pAngles, float *pMat3Rows)
 Build a rotation matrix from three Euler angles.
void Mat33BuildOrthonormal (const float *pAxisY, const float *pReference, float *pMat3Rows)
 Build an orthonormal basis around one axis and a reference direction.
void Rnd::Scale (const float *pScale, const float *pMat3Rows, float *pOut)
 Scale each row of a rotation matrix by one component of a vector.

Function Documentation

◆ InversMatrix()

void InversMatrix ( float * pDst,
const float * pSrc )

Invert a rigid transform.

Sony libvu0, linked as shipped. The basis rows are transposed and the translation row becomes the negated transposed basis applied to the original translation. An input whose basis is not orthonormal therefore does not invert correctly.

Parameters
pDstReceives the inverse, four rows of four floats.
pSrcThe transform to invert, four rows of four floats.
Ghidra address:
NTSC-U/C: 0x00293488
Ghidra address:
PAL: 0x0029ce50

◆ sceVu0MulAffineMatrix()

void sceVu0MulAffineMatrix ( float * pDst,
const float * pA,
const float * pB )

Multiply two affine transforms across all four words of every row.

A member of the Sony libvu0 object, linked as shipped, whose published name is unknown. It is sceVu0MulMatrix with the loop cut to three rows that ignore the fourth word of pB, and a fourth row that adds the translation row of pA. Callers use it where the fourth word is consumed.

Parameters
pDstReceives the product, four rows of four floats. It may alias either factor.
pAThe left factor, four rows of four floats.
pBThe right factor, four rows of four floats.
Ghidra address:
NTSC-U/C: 0x002933b0
Ghidra address:
PAL: 0x0029cd78

◆ sceVu0MulAffineMatrixXyz()

void sceVu0MulAffineMatrixXyz ( float * pDst,
const float * pA,
const float * pB )

Multiply two affine transforms in the first three words of every row.

A member of the Sony libvu0 object, linked as shipped, whose published name is unknown. It is sceVu0MulAffineMatrix under an xyz destination mask. The fourth word of every destination row therefore receives whatever the vector register already had.

Parameters
pDstReceives the product, four rows of four floats. It may alias either factor.
pAThe left factor, four rows of four floats.
pBThe right factor, four rows of four floats.
Ghidra address:
NTSC-U/C: 0x00293410
Ghidra address:
PAL: 0x0029cdd8

◆ Mat33BuildOrthonormal()

void Mat33BuildOrthonormal ( const float * pAxisY,
const float * pReference,
float * pMat3Rows )

Build an orthonormal basis around one axis and a reference direction.

The Y row is the supplied axis normalised. The X row is that axis crossed with the reference direction and normalised. The Z row is X crossed with Y, and needs no normalising. A reference direction parallel to the axis yields a zero cross product and then a division by zero.

Each row is written as a whole quadword, and the two cross products propagate the fourth word of the supplied axis into the other two rows. All three rows therefore end with pAxisY[3]. The 1.0 that the inlined vector construction writes into the scratch quadword is overwritten before anything reads it.

Parameters
pAxisYThe direction the Y row takes, four floats.
pReferenceThe reference direction, three floats.
pMat3RowsReceives the basis, three rows of four floats.
Ghidra address:
NTSC-U/C: 0x00292c60
Ghidra address:
PAL: 0x0029c628