Move this to header since we may need it soon

This commit is contained in:
Jonathan 2021-10-24 17:11:35 -04:00
parent 11c3511605
commit 38a4f66bef
2 changed files with 5 additions and 5 deletions

View File

@ -82,3 +82,8 @@ void SetupDirt(globalconfig_t &cfg);
float DirtAtPoint(const globalconfig_t &cfg, raystream_intersection_t *rs, const qvec3d &point, const qvec3d &normal,
const modelinfo_t *selfshadow);
void LightFace(const mbsp_t *bsp, mface_t *face, facesup_t *facesup, const globalconfig_t &cfg);
inline qmat4x4f TexSpaceToWorld(const mbsp_t *bsp, const mface_t *f)
{
return qv::inverse(WorldToTexSpace(bsp, f));
}

View File

@ -219,11 +219,6 @@ qmat4x4f WorldToTexSpace(const mbsp_t *bsp, const mface_t *f)
return T;
}
inline qmat4x4f TexSpaceToWorld(const mbsp_t *bsp, const mface_t *f)
{
return qv::inverse(WorldToTexSpace(bsp, f));
}
constexpr qvec3d TexCoordToWorld(vec_t s, vec_t t, const texorg_t *texorg)
{
return (texorg->texSpaceToWorld * qvec4f(s, t, /* one "unit" in front of surface */ 1.0, 1.0)).xyz();