i am trying to understand idMapBrushSide in an effort to analyze .map files...
what is a TextureMatrix?
in idMapBrushSide:
Code:
class idMapBrushSide {
friend class idMapBrush;
public:
const char * GetMaterial( void ) const { return material; }
void SetMaterial( const char *p ) { material = p; }
const idPlane & GetPlane( void ) const { return plane; }
void SetPlane( const idPlane &p ) { plane = p; }
void SetTextureMatrix( const idVec3 mat[2] ) { texMat[0] = mat[0]; texMat[1] = mat[1]; }
void GetTextureMatrix( idVec3 &mat1, idVec3 &mat2 ) { mat1 = texMat[0]; mat2 = texMat[1]; }
void GetTextureVectors( idVec4 v[2] ) const;
protected:
idStr material;
idPlane plane;
idVec3 texMat[2];
idVec3 origin;
};
I have looked at how it is stored:
Code:
brushDef3
{
( 0 0 -1 0 ) ( ( 0.015625 0 0 ) ( 0 0.015625 0 ) ) "textures/base_floor/a_diafloor_1b_fin" 0 0 0
( 0 0 1 -8 ) ( ( 0.015625 0 0 ) ( 0 0.015625 0 ) ) "textures/base_floor/a_diafloor_1b_fin" 0 0 0
( 0 -1 0 -32 ) ( ( 0.015625 0 0 ) ( 0 0.015625 0 ) ) "textures/base_floor/a_diafloor_1b_fin" 0 0 0
( 1 0 0 -40 ) ( ( 0.015625 0 0 ) ( 0 0.015625 0 ) ) "textures/base_floor/a_diafloor_1b_fin" 0 0 0
( 0 1 0 -32 ) ( ( 0.015625 0 0 ) ( 0 0.015625 0 ) ) "textures/base_floor/a_diafloor_1b_fin" 0 0 0
( -1 0 0 -16 ) ( ( 0.015625 0 0 ) ( 0 0.015625 0 ) ) "textures/base_floor/a_diafloor_1b_fin" 0 0 0
}
and i understand how it is parsed. but i don't get what it represents?
the only thing i can find is:
Code:
// read the texture matrix
// this is odd, because the texmat is 2D relative to default planar texture axis
if ( !src.Parse2DMatrix( 2, 3, side->texMat[0].ToFloatPtr() ) ) {
src.Error( "idMapBrush::Parse: unable to read brush side texture matrix" );
sides.DeleteContents( true );
return NULL;
}
thanks for any ideas?