API ReferenceGE ExtensionseditortechroadArchitect
Road Architect - Static Mesh Manager
Manages the static mesh audition system - searching for available meshes, previewing them with a rotating camera, and computing bounding box data for profile layers.
Manages the static mesh audition system - searching for available meshes, previewing them with a rotating camera, and computing bounding box data for profile layers.
Public API
| Function | Signature | Description |
|---|---|---|
M.fetchAvailableStaticMeshes | () | Scans filesystem for .dae files and populates available meshes list |
M.addMeshToAudition | (selectedMeshIdx, road, customIdx) | Places a TSStatic at audition height for preview |
M.goToMeshView | (timer, time) → time | Moves camera to mesh audition preview pose |
M.manageRotateCam | () | Rotates audition camera around the mesh |
M.goToOldView | () | Returns camera to stored pre-audition position |
M.removeAuditionMesh | () | Deletes the temporary audition TSStatic |
M.updateCameraPose | () | Updates camera to face audition center |
Public State
| Field | Description |
|---|---|
M.availStaticMeshes | Array of {path, filename} entries for available meshes |
Code Example
local smMgr = require('editor/tech/roadArchitect/staticMeshMgr')
-- Fetch all available static meshes from art/shapes directories
smMgr.fetchAvailableStaticMeshes()
-- Preview a mesh at index 5
smMgr.addMeshToAudition(5, road, layerIndex)
-- Enter mesh audition camera view
smMgr.goToMeshView(timer, time)
-- Rotate camera each frame
smMgr.manageRotateCam()
-- Return to previous camera position
smMgr.goToOldView()
-- Cleanup
smMgr.removeAuditionMesh()
-- Search paths for meshes:
-- 'art/shapes/objects'
-- 'art/shapes/garage_and_dealership/Clutter'
-- Audition height: 1000m above zero
-- Camera distance based on mesh bounding box: meshRad = 1.2 * box:getLength()
-- Camera factors: planarDist = 1.6 * meshRad, elevation = 0.8 * meshRad
-- Layer box data computed from audition mesh world box:
-- lay.boxXLeft, lay.boxXRight, lay.boxYLeft, lay.boxYRight
-- lay.boxZLeft, lay.boxZRight
-- lay.extentsL, lay.extentsW, lay.extentsHDependencies
| Module | Purpose |
|---|---|
editor/tech/roadArchitect/utilities | getFilenameFromPath |
See Also
- Road Architect - Clothoid - Related reference
- Road Architect - Decals - Related reference
- Road Architect - Export - Related reference
- World Editor Guide - Guide
Road Architect - Static Mesh
Places static meshes (TSStatic objects) along road lanes - both spanning meshes repeated along length and single-unit patch meshes at specific positions.
Road Architect - Terraform
Conforms terrain heightmaps to Road Architect roads using mask-based iterative diffusion, supporting single-road and multi-road terraforming with undo/redo.