CSimpleModel
struct · ui · 988 bytes
- Vtable
0x81c608- Meaning
- Holds a Model frame: a CSimpleFrame, its scene, model, camera, light, position, facing, scale, fog and bounding box
- Confidence
- verified, proof one
- Finding
- ui/modelview#model-frame-fields
Finding: Model frame fields in ui: Model frames, camera and paint
A model frame keeps its scene at +0x314, the model at +0x318, the camera at +0x31c, a pending
camera index at +0x320, a light at +0x324, a position, facing and scale at +0x390 to +0x3a0,
fog at +0x3a4 to +0x3b0, the model's bounding box at +0x3b4, and two script slots. The constructor
zeroes the fields above; the pending camera index is 0, a request for camera 0, the scale and the fog
far distance are 1.0, and the fog colour is 0xffffffff.
| offset | field |
|---|---|
+0x314 | scene |
+0x318, +0x31c, +0x320 | model, camera, pending camera index |
+0x324 | light (0x6c bytes) |
+0x390 to +0x398, +0x39c, +0x3a0 | position, facing, scale |
+0x3a4 to +0x3b0 | fog flags, colour, near, far |
+0x3b4 to +0x3c8 | model bounding box, minimum then maximum |
+0x3cc, +0x3d4 | OnUpdateModel and OnAnimFinished slots |
The derivation is in the doc.
Fields 15
| offset | size | type | name | meaning | confidence | finding |
|---|---|---|---|---|---|---|
0x0314 | 4 | M2Scene * | m_scene | Points to the frame's own scene, created on first use | verified, proof one | ui/modelview#model-frame-fields |
0x0318 | 4 | CM2Model * | m_model | Points to the model the frame shows, or null | verified, proof one | ui/modelview#model-frame-fields |
0x031c | 4 | CCamera * | m_camera | Points to the referenced camera the paint uses, or null for the orthographic leg | verified, proof one | ui/modelview#model-frame-fields |
0x0320 | 4 | uint32_t | m_pendingCamera | Holds the camera index waiting to be applied, or -1 once a camera is settled | verified, proof one | ui/modelview#model-frame-fields |
0x0324 | 108 | M2Light | m_light | Holds the frame's own light, disabled unless SetLight enables it | verified, proof one | ui/modelview#model-frame-fields |
0x0390 | 12 | float[3] | m_position | Holds the SetPosition vector, scaled by the layout scale into the root matrix | verified, proof one | ui/modelview#model-frame-fields |
0x039c | 4 | float | m_facing | Holds the facing in radians, a rotation about +Z | verified, proof one | ui/modelview#model-frame-fields |
0x03a0 | 4 | float | m_modelScale | Holds the model scale, 1.0 by default | verified, proof one | ui/modelview#model-frame-fields |
0x03a4 | 4 | uint32_t | m_fogFlags | Holds the fog flags; bit 0 arms the fog | verified, proof one | ui/modelview#model-frame-fields |
0x03a8 | 4 | uint32_t | m_fogColor | Holds the fog colour as 0xAARRGGBB | verified, proof one | ui/modelview#model-frame-fields |
0x03ac | 4 | float | m_fogNear | Holds the fog near distance | verified, proof one | ui/modelview#model-frame-fields |
0x03b0 | 4 | float | m_fogFar | Holds the fog far distance, 1.0 by default | verified, proof one | ui/modelview#model-frame-fields |
0x03b4 | 24 | float[6] | m_boundingBox | Holds the model's bounding box, minimum then maximum, copied when the model is ready | verified, proof one | ui/modelview#model-frame-fields |
0x03cc | 8 | uint32_t[2] | m_onUpdateModel | Holds the OnUpdateModel script slot | verified, proof one | ui/modelview#model-frame-fields |
0x03d4 | 8 | uint32_t[2] | m_onAnimFinished | Holds the OnAnimFinished script slot | verified, proof one | ui/modelview#model-frame-fields |