benilla-re systems structs docs

M2Light

struct · models · 108 bytes

Meaning
Holds a light: type, position, direction, colours, attenuation and scene link
Confidence
verified, proof one
Finding
models/lights#light-object

Finding: Light object in models: lights

0x71b4a0 initializes a light: type 1 (point), zero position, direction and colours, attenuation 0.7 at +0x58 and 0.03 at +0x5c, disabled and unlinked. A light belongs to a scene (+0x0, with the scene's frame minus one at +0x4); setting its type or position relinks an enabled point light, and enabling links it.

offsetholds
+0x008type: 1 point, other values directional
+0x00cposition
+0x024direction, normalized unless shorter than 2.384186e-7
+0x030, +0x03c, +0x048ambient, diffuse and third colour
+0x060enabled
+0x064, +0x068link: address of the previous link, next light

The derivation is in the doc.

Fields 15

offsetsizetypenamemeaningconfidencefinding
0x00004M2Scene *m_sceneHolds the scene the light belongs toverified, proof onemodels/lights#light-object
0x00044uint32_tm_frameHolds the scene frame the light was last placed in; a grid light with an older stamp is disabledverified, proof onemodels/lights#scene-light-grid
0x00084uint32_tm_typeHolds the light type, 1 for a point lightverified, proof onemodels/lights#light-object
0x000c12float[3]m_positionHolds the light positionverified, proof onemodels/lights#light-object
0x001812float[3]m_viewPositionHolds the light position in view space, for the nearest lights of a recordverified, proof onemodels/lights#view-space-lights
0x002412float[3]m_directionHolds the light directionverified, proof onemodels/lights#light-object
0x003012float[3]m_ambientHolds the ambient colourverified, proof onemodels/lights#model-light-tracks
0x003c12float[3]m_diffuseHolds the diffuse colourverified, proof onemodels/lights#model-light-tracks
0x004812float[3]m_thirdHolds the third colour, summed apart from ambient and diffuseverified, proof onemodels/lights#adding-a-light
0x00544floatm_attenuation0Holds the first attenuation term, 0 by defaultverified, proof onemodels/lights#model-light-tracks
0x00584floatm_attenuation1Holds the second attenuation term, 0.7 by defaultverified, proof onemodels/lights#model-light-tracks
0x005c4floatm_attenuation2Holds the third attenuation term, 0.03 by defaultverified, proof onemodels/lights#model-light-tracks
0x00604uint32_tm_enabledHolds whether the light is enabledverified, proof onemodels/lights#light-object
0x00644M2Light **m_linkPrevHolds the address of the link that points at the lightverified, proof onemodels/lights#light-object
0x00684M2Light *m_linkNextHolds the next light in the same list or cellverified, proof onemodels/lights#light-object