Locks quad ray for editing (allows property changes without baking, disables automatic occlusion texture freezing). Takes handle (quad ray source entity handle). Returns nothing. Sets entity.quadRayLocked = true and entity.quadRayBaked = false (per-entity lock state, prevents baking during editing).
Locks quad ray for editing (allows property changes without baking, disables automatic occlusion texture freezing). Takes handle (quad ray source entity handle). Returns nothing. Sets entity.quadRayLocked = true and entity.quadRayBaked = false (per-entity lock state, prevents baking during editing). Use to edit quad ray properties (modify position/rotation/fade/radiance while locked, changes visible immediately), setup phase (lock during level design, unlock when finalized for baking), or dynamic sources (keep locked for animated/moving quad ray sources, never bake). Lock behavior: sets quadRayLocked = true (entity marked as editable, baking disabled), sets quadRayBaked = false (occlusion texture unfrozen, updates each frame), allows property changes (position/rotation/fade/direction/spread/radiance modifications take effect immediately), occlusion texture updates (source rendered in occlusion pass each frame, dynamic silhouette). Baking system: baked quad rays freeze occlusion texture (performance optimization for static sources, occlusion silhouette cached), locked quad rays never bake (occlusion updates each frame, dynamic sources), unlock triggers baking (b3dUnlockQuadRay sets locked = false, next render pass bakes texture). Use cases: (1) Setup phase (lock all sources during level design, edit freely, unlock when done for baking), (2) Animated sources (lock sources that move/rotate, never unlock, always dynamic), (3) Dynamic lights (lock flashlight or moving lights, properties change per-frame), (4) Testing (lock source while testing different fade/radiance values, see changes immediately), (5) Static optimization (lock during editing, unlock when finalized to bake and improve performance). Common patterns: setup = b3dLockQuadRay(source) during editing, b3dUnlockQuadRay(source) when finalized; animated = b3dLockQuadRay(flashlight) keep locked forever for moving light; test parameters = b3dLockQuadRay(sun) while adjusting intensity/decay. Locked vs unlocked: locked sources update every frame (position/rotation changes visible, property changes apply immediately, occlusion texture re-rendered), unlocked sources can be baked (after unlock, next render pass bakes occlusion texture, static sources become cheaper), baked sources frozen (occlusion silhouette cached, changes ignored until locked again). Performance implications: locked sources cost more (occlusion pass re-renders each frame, dynamic update overhead), unlocked baked sources cheaper (occlusion texture frozen, no per-frame update), many static sources benefit from baking (unlock after setup, occlusion pass skips baked sources), dynamic sources must stay locked (animated/moving sources need per-frame updates). Typical workflow: create source (b3dLoadQuadRayMesh loads mesh as source, initially unlocked), lock for editing (b3dLockQuadRay locks source, allow property changes), adjust properties (position/rotate/fade/radiance while locked, see results immediately), unlock when done (b3dUnlockQuadRay triggers baking, optimizes static source). Baking optimization: static scenes with many sources benefit (lock all during setup, unlock when finalized, bake all at once), dynamic scenes with few sources (keep locked, baking doesn't help if sources moving), mixed scenes (unlock static sources for baking, keep dynamic sources locked). Validation: only affects isQuadRaySource entities (non-quad-ray entities ignored), silent if entity not found (invalid handle no-op), no error checking (assumes entity exists and is quad ray source). Related: b3dUnlockQuadRay unlocks and triggers baking (opposite of this function, finalizes source for optimization), b3dLoadQuadRayMesh creates quad ray source (initially unlocked, lock after creation if editing needed), b3dPositionEntity positions source (changes visible if locked, ignored if baked until re-locked), b3dRotateEntity rotates source (changes visible if locked, ignored if baked until re-locked).