Mirror Reference
Module defined in `lua/common/jbeam/sections/mirror.lua`. Processes mirror definitions from JBeam data, creating C++ mirror objects on the vehicle.
Module defined in lua/common/jbeam/sections/mirror.lua. Processes mirror definitions from JBeam data, creating C++ mirror objects on the vehicle.
Exports
Functions
M.process(objID, vehicleObj, vehicle)
Iterates the mirrors section and creates mirror objects via vehicleObj:addMirror(). Configures each mirror's mesh, reference nodes, offset position, and normal direction. Handles retrocompatibility for deprecated properties.
- Parameters:
objID- number - Vehicle object IDvehicleObj- userdata - C++ vehicle objectvehicle- table - Assembled vehicle data withmirrorssection
- Returns:
self(module table, for chaining)
Internal Notes
- Mirror creation:
vehicleObj:addMirror(mesh, idRef, id1, id2)returns mirror ID. - Position: prefers
refBaseTranslation, falls back tooffset. - Normal direction: prefers
baseRotationGlobal(Euler → quaternion → normal), falls back tonormal(deprecated). offsetRotationGlobalandoffsetNormalare deprecated - logs error suggesting mesh normal fixes.- All rotations converted via
quatFromEulerwithmath.rad.
Meshs Reference
Module defined in `lua/common/jbeam/sections/meshs.lua`. Processes 3D mesh attachments: physics triangles, props (animated objects), and flexbodies (deformable meshes).
NodeBeam Reference
Module defined in `lua/common/jbeam/sections/nodeBeam.lua`. Processes core structural sections: nodes (position calculation), hydros (hydraulic actuators), ropes, and quads (pressure volumes).