Clustered Mesh: Difference between revisions
no edit summary
m (Remove base class names generated by Ghidra.) |
No edit summary |
||
Line 18:
==== 32-bit ====
{| class="wikitable"
! Offset !!
|-
| 0x0 || 0x4 || [[#rw::collision::VolRef::Volume|Volume]]* || mpCollisionVolume || ||
Line 187:
| 0xB || 0x1 || uint8_t || normalCount || ||
|-
| 0xC || 0x1 || uint8_t || compressionMode || VERTICES_UNCOMPRESSED
|-
| 0xD || 0x3 || uint8_t[3] || Padding || ||
Line 195:
==== Vertex data ====
{| class="wikitable"
|+ VERTICES_UNCOMPRESSED
|-
! Offset !! Length !! Type !! Name
|-
| 0x0<br>(repeating) || 0x10 || [[Vector3|vpu::Vector3]]
|}
{| class="wikitable"
|+ VERTICES_16BIT_COMPRESSED
|-
! Offset !! Length !! Type !! Name
|-
| 0x0 || 0xC || int32_t[3] ||
|-
| 0xC<br>(repeating) || 0x6 ||
|}
{| class="wikitable"
|+ VERTICES_32BIT_COMPRESSED
|-
! Offset !! Length !! Type !! Name
|-
| 0x0<br>(repeating) || 0xC ||
|}
===== rw::collision::ClusteredMeshCluster::Vertex16 =====
{| class="wikitable"
! Offset !! Length !! Type !! Name
|-
| 0x0 || 0x2 || uint16_t || x
|-
| 0x2 || 0x2 || uint16_t || y
|-
| 0x4 || 0x2 || uint16_t || z
|}
===== rw::collision::ClusteredMeshCluster::Vertex32 =====
{| class="wikitable"
! Offset !! Length !! Type !! Name
|-
| 0x0 || 0x4 || int32_t || x
|-
| 0x4 || 0x4 || int32_t || y
|-
| 0x8 || 0x4 || int32_t || z
|}
Line 228 ⟶ 253:
! Length !! Type !! Description !! Comments
|-
| 0x1 || uint8_t || '''Lower nibble''' (type)<br>
|-
| 0x1 || uint8_t || '''Only present if type == UNITTYPE_TRILIST'''<br>Triangle count || For UNITTYPE_OLDTRIANGLE/UNITTYPE_TRIANGLE this is implicitly 1 and for UNITTYPE_QUAD this is implicitly 2
|-
| Vertex count<br>(triangle count + 2) || uint8_t || Vertex index ||
| 0x1 || uint8_t || '''Only present if type == 3'''<br>The number of points minus two ||▼
|-
▲| 0x1 || uint8_t || '''Only present
|-
|
|-
| Group ID size (see [[#rw::collision::ClusterParams|ClusterParams]]) || uint8_t or uint16_t || '''Only present with
|-
| Surface ID size (see [[#rw::collision::ClusterParams|ClusterParams]]) || uint8_t or uint16_t || '''Only present with
|}
|