Namespace P64::Renderer¶
Classes¶
Functions¶
-
inline float P64::Renderer::getRenderScale()¶
Render-scale: how many RSP fixed-point world units one meter maps to.
The engine simulates in meters; only at render entry points (model/view matrices, lights, culling, debug draw, particles) are positions multiplied by this factor in float space before the s16.16 fixed-point conversion.
-
inline float P64::Renderer::getInvRenderScale()¶
-
inline void P64::Renderer::setRenderScale(float renderScale)¶
- inline void P64::Renderer::fillModelMatrixFP(
- T3DMat4FP *mat,
- const fm_vec3_t &scale,
- const fm_quat_t &rot,
- const fm_vec3_t &pos,
- float vertexScale
Builds a fixed-point model matrix from a meter-space SRT.
Applies the render-scale and the model’s vertex-scale, so callers (components and user scripts alike) never deal with any scaling.
- Parameters:
mat – output matrix
scale – object scale (unitless multiplier of the model’s authored size)
rot – rotation
pos – position in meters
vertexScale – the model’s vertex scale (see AssetManager::getVertexScale)
Variables¶
-
constexpr float P64::Renderer::DEFAULT_RENDER_SCALE = 100.0f¶
-
constinit float P64::Renderer::renderScale_ = {DEFAULT_RENDER_SCALE}¶
-
constinit float P64::Renderer::invRenderScale_ = {1.0f / DEFAULT_RENDER_SCALE}¶