MiniQuake2

src/miniquake2/renderer/geometry.ml

Provides miniquake2 renderer geometry facilities for this project.

Package
miniquake2.renderer.geometry
Reachable
Yes

Imports

Declarations

bspModelMesh

function bspModelMesh(map, modelIndex)

Return the bsp model mesh value.

ParameterTypeDefaultDescription
mapdynamic—map value consumed by this operation.
modelIndexdynamic—Zero-based index of model.

View source

faceVertex

function faceVertex(map, face, edgeOffset)

Return the face vertex value.

ParameterTypeDefaultDescription
mapdynamic—map value consumed by this operation.
facedynamic—face value consumed by this operation.
edgeOffsetdynamic—edgeOffset value consumed by this operation.

View source

interpolate

function interpolate(first, second, backLerp)

Interpolate state.

ParameterTypeDefaultDescription
firstdynamic—first value consumed by this operation.
seconddynamic—second value consumed by this operation.
backLerpdynamic—backLerp value consumed by this operation.

View source

md2FrameBounds

function md2FrameBounds(model, frameIndex, oldFrameIndex, backLerp)

Return the md 2 frame bounds.

ParameterTypeDefaultDescription
modeldynamic—model value consumed by this operation.
frameIndexdynamic—Zero-based index of frame.
oldFrameIndexdynamic—Zero-based index of old frame.
backLerpdynamic—backLerp value consumed by this operation.

View source

md2FrameMesh

function md2FrameMesh(model, frameIndex, oldFrameIndex, backLerp)

Return the md 2 frame mesh value.

ParameterTypeDefaultDescription
modeldynamic—model value consumed by this operation.
frameIndexdynamic—Zero-based index of frame.
oldFrameIndexdynamic—Zero-based index of old frame.
backLerpdynamic—backLerp value consumed by this operation.

View source

md2FrameScalars

function md2FrameScalars(model, frameIndex, oldFrameIndex, backLerp)

Return the md 2 frame scalars value.

ParameterTypeDefaultDescription
modeldynamic—model value consumed by this operation.
frameIndexdynamic—Zero-based index of frame.
oldFrameIndexdynamic—Zero-based index of old frame.
backLerpdynamic—backLerp value consumed by this operation.

View source

md2FrameScalarsWithNormalOffset

function md2FrameScalarsWithNormalOffset(model, frameIndex, oldFrameIndex, backLerp, normalOffset)

Render-only MD2 expansion. The inspection API above intentionally retains MeshVertex structs; the live renderer needs only interleaved ST/XYZ scalars. Building those scalars directly avoids a full temporary object graph and a second traversal for every visible alias model on every frame.

ParameterTypeDefaultDescription
modeldynamic—model value consumed by this operation.
frameIndexdynamic—Zero-based index of frame.
oldFrameIndexdynamic—Zero-based index of old frame.
backLerpdynamic—backLerp value consumed by this operation.
normalOffsetdynamic—normalOffset value consumed by this operation.

View source

md2Position

function md2Position(frame, vertexIndex)

Return the md 2 position.

ParameterTypeDefaultDescription
framedynamic—frame value consumed by this operation.
vertexIndexdynamic—Zero-based index of vertex.

View source

md2PowerShellFrameScalars

function md2PowerShellFrameScalars(model, frameIndex, oldFrameIndex, backLerp)

Return the md 2 power shell frame scalars value.

ParameterTypeDefaultDescription
modeldynamic—model value consumed by this operation.
frameIndexdynamic—Zero-based index of frame.
oldFrameIndexdynamic—Zero-based index of old frame.
backLerpdynamic—backLerp value consumed by this operation.

View source

miniquake2.renderer.geometry.MeshBounds struct

meshVertex

function meshVertex(position, s, t)

Return the mesh vertex value.

ParameterTypeDefaultDescription
positiondynamic—position value consumed by this operation.
sdynamic—s value consumed by this operation.
tdynamic—t value consumed by this operation.

View source

miniquake2.renderer.geometry.MeshVertex struct

miniquake2.renderer.geometry.TriangleMesh struct