Prop Physics: Difference between revisions
Content added Content deleted
(Added Volume typedef and updated section links.) |
(Simplified vTable description and added volume data documentation.) |
||
Line 182: | Line 182: | ||
| 0x0 || 0x40 || [[Matrix44Affine]] || transform || || |
| 0x0 || 0x40 || [[Matrix44Affine]] || transform || || |
||
|- |
|- |
||
| 0x40 || 0x4 || |
| 0x40 || 0x4 || VTable* || vTable || List of Volume functions || rw::collision::Volume::VTable |
||
|- |
|- |
||
| 0x44 || 0xC || [[#Anonymous union in Volume|Anonymous union]] || || || |
| 0x44 || 0xC || [[#Anonymous union in Volume|Anonymous union]] || || Volume data || |
||
|- |
|- |
||
| 0x50 || 0x4 || float32_t || radius || || |
| 0x50 || 0x4 || float32_t || radius || || |
||
Line 201: | Line 201: | ||
| 0x0 || 0x40 || [[Matrix44Affine]] || transform || || |
| 0x0 || 0x40 || [[Matrix44Affine]] || transform || || |
||
|- |
|- |
||
| 0x40 || 0x8 || |
| 0x40 || 0x8 || VTable* || vTable || List of Volume functions || rw::collision::Volume::VTable |
||
|- |
|- |
||
| 0x48 || 0xC || [[#Anonymous union in Volume|Anonymous union]] || || || |
| 0x48 || 0xC || [[#Anonymous union in Volume|Anonymous union]] || || Volume data || |
||
|- |
|- |
||
| 0x54 || 0x4 || || || padding || |
| 0x54 || 0x4 || || || padding || |
||
Line 216: | Line 216: | ||
|} |
|} |
||
=== rw::collision:: |
=== rw::collision::AggregateSpecificData === |
||
{| class="wikitable" |
|||
{{todo|Several anonymous fields are present and need to be researched.}} |
|||
! Offset !! Length !! Type !! Name !! Description !! Comments |
|||
|- |
|||
| 0x0 || 0x4 || [[#rw::collision::Aggregate|Aggregate]]* || agg || || |
|||
|} |
|||
=== rw::collision::Aggregate === |
|||
{| class="wikitable" |
|||
! Offset !! Length !! Type !! Name !! Description !! Comments |
|||
|- |
|||
| 0x0 || 0x20 || [[#rw::collision::AALineClipper::Init::AABBox|AABBox]] || m_AABB || || |
|||
|- |
|||
| 0x20 || 0x4 || VTable* || m_vTable || List of Aggregate functions || rw::collision::Aggregate::VTable |
|||
|- |
|||
| 0x24 || 0x4 || uint32_t || m_numTagBits || || |
|||
|- |
|||
| 0x28 || 0x4 || uint32_t || m_numVolumes || || |
|||
|- |
|||
| 0x2C || 0x4 || uint32_t || pad || || |
|||
|} |
|||
=== AABBoxTemplate<[[Matrix44Affine]],[[Vector3]],AABBoxMemoryDumpPolicy> === |
|||
{| class="wikitable" |
|||
! Offset !! Length !! Type !! Name !! Description !! Comments |
|||
|- |
|||
| 0x0 || 0x10 || [[Vector3]] || m_min || || |
|||
|- |
|||
| 0x10 || 0x10 || [[Vector3]] || m_max || || |
|||
|} |
|||
=== rw::collision::SphereSpecificData === |
|||
{| class="wikitable" |
|||
! Offset !! Length !! Type !! Name !! Description !! Comments |
|||
|- |
|||
| 0x0 || 0x4 || void* || nothing || || |
|||
|} |
|||
=== rw::collision::CapsuleSpecificData === |
|||
{| class="wikitable" |
|||
! Offset !! Length !! Type !! Name !! Description !! Comments |
|||
|- |
|||
| 0x0 || 0x4 || float32_t || hh || || |
|||
|} |
|||
=== rw::collision::TriangleSpecificData === |
|||
{| class="wikitable" |
|||
! Offset !! Length !! Type !! Name !! Description !! Comments |
|||
|- |
|||
| 0x0 || 0x4 || float32_t || edgeCos0 || || |
|||
|- |
|||
| 0x4 || 0x4 || float32_t || edgeCos1 || || |
|||
|- |
|||
| 0x8 || 0x4 || float32_t || edgeCos2 || || |
|||
|} |
|||
=== rw::collision::BoxSpecificData === |
|||
{| class="wikitable" |
|||
! Offset !! Length !! Type !! Name !! Description !! Comments |
|||
|- |
|||
| 0x0 || 0x4 || float32_t || hx || || |
|||
|- |
|||
| 0x4 || 0x4 || float32_t || hy || || |
|||
|- |
|||
| 0x8 || 0x4 || float32_t || hz || || |
|||
|} |
|||
=== rw::collision::CylinderSpecificData === |
|||
{| class="wikitable" |
|||
! Offset !! Length !! Type !! Name !! Description !! Comments |
|||
|- |
|||
| 0x0 || 0x4 || float32_t || hh || || |
|||
|- |
|||
| 0x4 || 0x4 || float32_t || innerRadius || || |
|||
|} |
|||
= Unions = |
= Unions = |
||
Line 225: | Line 298: | ||
! Length !! Type !! Name !! Description !! Comments |
! Length !! Type !! Name !! Description !! Comments |
||
|- |
|- |
||
| 0x4 || AggregateSpecificData || aggregateData || || |
| 0x4 || [[#rw::collision::AggregateSpecificData|AggregateSpecificData]] || aggregateData || || |
||
|- |
|- |
||
| 0x4 || SphereSpecificData || sphereData || || |
| 0x4 || [[#rw::collision::SphereSpecificData|SphereSpecificData]] || sphereData || || |
||
|- |
|- |
||
| 0x4 || CapsuleSpecificData || capsuleData || || |
| 0x4 || [[#rw::collision::CapsuleSpecificData|CapsuleSpecificData]] || capsuleData || || |
||
|- |
|- |
||
| 0xC || TriangleSpecificData || triangleData || || |
| 0xC || [[#rw::collision::TriangleSpecificData|TriangleSpecificData]] || triangleData || || |
||
|- |
|- |
||
| 0xC || BoxSpecificData || boxData || || |
| 0xC || [[#rw::collision::BoxSpecificData|BoxSpecificData]] || boxData || || |
||
|- |
|- |
||
| 0x8 || CylinderSpecificData || cylinderData || || |
| 0x8 || [[#rw::collision::CylinderSpecificData|CylinderSpecificData]] || cylinderData || || |
||
|- |
|- |
||
| 0x8 || TargetPtr[2] || sizeOfTargetPointer || || |
| 0x8 || [[#TargetPtr|TargetPtr]][2] || sizeOfTargetPointer || || |
||
|} |
|} |
||
Line 254: | Line 327: | ||
|- |
|- |
||
| Volume || [[#rw::collision::Volume|Volume]] || 0x68 || |
| Volume || [[#rw::collision::Volume|Volume]] || 0x68 || |
||
|} |
|||
=== rw::collision::AALineClipper::Init::AABBox === |
|||
{| class="wikitable" |
|||
! Name !! Type !! Length !! Comments |
|||
|- |
|||
| AABBox || [[#AABBoxTemplate<Matrix44Affine,Vector3,AABBoxMemoryDumpPolicy>|AABBoxTemplate]] || 0x4 || |
|||
|} |
|||
=== TargetPtr === |
|||
{| class="wikitable" |
|||
! Name !! Type !! Length !! Comments |
|||
|- |
|||
| TargetPtr || uint32_t || 0x4 || |
|||
|} |
|} |
Revision as of 18:33, 31 October 2022
The prop physics resource type handles collision attributes for props on a per-track unit basis.
Structures
BrnPhysics::Props::PropPhysicsDataHeader
32-bit
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x4 | uint32_t | muNumberOfPropTypes | Number of prop types | |
0x4 | 0x4 | uint32_t | muNumberOfVolumeTypes | Number of volume types | |
0x8 | 0x4 | uint32_t | muNumberOfPartTypes | Number of prop part types | |
0xC | 0x4 | uint32_t | muSizeInBytes | Resource size | |
0x10 | 0x7D0 | PropTypeData*[500] | mapPropTypes | Prop types | |
0x7E0 | 0x4B0 | PropPartTypeData*[300] | mapPropPartTypes | Prop part types | |
0xC90 | 0x2000 | Volume*[2048] | mapVolumeTypes | Volume types | |
0x2C90 | 0x4 | uint32_t | muTimeStamp | time_t timestamp | Null in Remastered |
64-bit
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x4 | uint32_t | muNumberOfPropTypes | Number of prop types | |
0x4 | 0x4 | uint32_t | muNumberOfVolumeTypes | Number of volume types | |
0x8 | 0x4 | uint32_t | muNumberOfPartTypes | Number of prop part types | |
0xC | 0x4 | uint32_t | muSizeInBytes | Resource size | |
0x10 | 0xFA0 | PropTypeData*[500] | mapPropTypes | Prop types | |
0xFB0 | 0x960 | PropPartTypeData*[300] | mapPropPartTypes | Prop part types | |
0x1910 | 0x4000 | Volume*[2048] | mapVolumeTypes | Volume types | |
0x5910 | 0x4 | uint32_t | muTimeStamp | time_t timestamp | Null in Remastered |
BrnPhysics::Props::PropTypeData
32-bit
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x10 | Vector3 | mJointLocator | ||
0x10 | 0x10 | Vector3 | mCOMOffset | ||
0x20 | 0x10 | Vector3 | mInertia | ||
0x30 | 0x8 | ID | mResourceId | ||
0x38 | 0x4 | float32_t | mfMass | ||
0x3C | 0x4 | Volume* | maCollisionVolumes | ||
0x40 | 0x4 | PropPartTypeData* | maParts | Uninitialized in asset | |
0x44 | 0x4 | float32_t | mfSphereRadius | ||
0x48 | 0x4 | float32_t | mfMaxJointAngleCos | ||
0x4C | 0x4 | float32_t | mfLeanThreshold | ||
0x50 | 0x4 | float32_t | mfMoveThreshold | ||
0x54 | 0x4 | float32_t | mfSmashThreshold | ||
0x58 | 0x4 | uint32_t | muSceneUriId | ||
0x5C | 0x1 | uint8_t | muMaxState | ||
0x5D | 0x1 | uint8_t | muNumberOfParts | ||
0x5E | 0x1 | uint8_t | muNumberOfVolumes | ||
0x5F | 0x1 | uint8_t | mu8JointType | ||
0x60 | 0x1 | uint8_t | mu8ExtraTypeInfo | ||
0x61 | 0xF | padding |
64-bit
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x10 | Vector3 | mJointLocator | ||
0x10 | 0x10 | Vector3 | mCOMOffset | ||
0x20 | 0x10 | Vector3 | mInertia | ||
0x30 | 0x8 | ID | mResourceId | ||
0x38 | 0x4 | float32_t | mfMass | ||
0x3C | 0x4 | padding | |||
0x40 | 0x8 | Volume* | maCollisionVolumes | ||
0x48 | 0x8 | PropPartTypeData* | maParts | Uninitialized in asset | |
0x50 | 0x4 | float32_t | mfSphereRadius | ||
0x54 | 0x4 | float32_t | mfMaxJointAngleCos | ||
0x58 | 0x4 | float32_t | mfLeanThreshold | ||
0x5C | 0x4 | float32_t | mfMoveThreshold | ||
0x60 | 0x4 | float32_t | mfSmashThreshold | ||
0x64 | 0x4 | uint32_t | muSceneUriId | ||
0x68 | 0x1 | uint8_t | muMaxState | ||
0x69 | 0x1 | uint8_t | muNumberOfParts | ||
0x6A | 0x1 | uint8_t | muNumberOfVolumes | ||
0x6B | 0x1 | uint8_t | mu8JointType | ||
0x6C | 0x1 | uint8_t | mu8ExtraTypeInfo | ||
0x6D | 0x3 | padding |
BrnPhysics::Props::PropPartTypeData
32-bit
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x10 | Vector3 | mOffset | ||
0x10 | 0x10 | Vector3 | mInertia | ||
0x20 | 0x4 | float32_t | mfMass | ||
0x24 | 0x4 | Volume* | maCollisionVolumes | ||
0x28 | 0x4 | float32_t | mfSphereRadius | ||
0x2C | 0x1 | uint8_t | muNumberOfVolumes | ||
0x2D | 0x3 | padding |
64-bit
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x10 | Vector3 | mOffset | ||
0x10 | 0x10 | Vector3 | mInertia | ||
0x20 | 0x4 | float32_t | mfMass | ||
0x24 | 0x4 | padding | |||
0x28 | 0x8 | Volume* | maCollisionVolumes | ||
0x30 | 0x4 | float32_t | mfSphereRadius | ||
0x34 | 0x1 | uint8_t | muNumberOfVolumes | ||
0x35 | 0x3 | padding |
rw::collision::Volume
32-bit
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x40 | Matrix44Affine | transform | ||
0x40 | 0x4 | VTable* | vTable | List of Volume functions | rw::collision::Volume::VTable |
0x44 | 0xC | Anonymous union | Volume data | ||
0x50 | 0x4 | float32_t | radius | ||
0x54 | 0x4 | uint32_t | groupID | ||
0x58 | 0x4 | uint32_t | surfaceID | ||
0x5C | 0x4 | uint32_t | m_flags |
64-bit
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x40 | Matrix44Affine | transform | ||
0x40 | 0x8 | VTable* | vTable | List of Volume functions | rw::collision::Volume::VTable |
0x48 | 0xC | Anonymous union | Volume data | ||
0x54 | 0x4 | padding | |||
0x58 | 0x4 | float32_t | radius | ||
0x5C | 0x4 | uint32_t | groupID | ||
0x60 | 0x4 | uint32_t | surfaceID | ||
0x64 | 0x4 | uint32_t | m_flags |
rw::collision::AggregateSpecificData
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x4 | Aggregate* | agg |
rw::collision::Aggregate
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x20 | AABBox | m_AABB | ||
0x20 | 0x4 | VTable* | m_vTable | List of Aggregate functions | rw::collision::Aggregate::VTable |
0x24 | 0x4 | uint32_t | m_numTagBits | ||
0x28 | 0x4 | uint32_t | m_numVolumes | ||
0x2C | 0x4 | uint32_t | pad |
AABBoxTemplate<Matrix44Affine,Vector3,AABBoxMemoryDumpPolicy>
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x10 | Vector3 | m_min | ||
0x10 | 0x10 | Vector3 | m_max |
rw::collision::SphereSpecificData
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x4 | void* | nothing |
rw::collision::CapsuleSpecificData
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x4 | float32_t | hh |
rw::collision::TriangleSpecificData
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x4 | float32_t | edgeCos0 | ||
0x4 | 0x4 | float32_t | edgeCos1 | ||
0x8 | 0x4 | float32_t | edgeCos2 |
rw::collision::BoxSpecificData
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x4 | float32_t | hx | ||
0x4 | 0x4 | float32_t | hy | ||
0x8 | 0x4 | float32_t | hz |
rw::collision::CylinderSpecificData
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x4 | float32_t | hh | ||
0x4 | 0x4 | float32_t | innerRadius |
Unions
Anonymous union in Volume
To do: The listed structures are currently undocumented. |
Length | Type | Name | Description | Comments |
---|---|---|---|---|
0x4 | AggregateSpecificData | aggregateData | ||
0x4 | SphereSpecificData | sphereData | ||
0x4 | CapsuleSpecificData | capsuleData | ||
0xC | TriangleSpecificData | triangleData | ||
0xC | BoxSpecificData | boxData | ||
0x8 | CylinderSpecificData | cylinderData | ||
0x8 | TargetPtr[2] | sizeOfTargetPointer |
Typedefs
rw::collision::VolRef::Volume
32-bit
Name | Type | Length | Comments |
---|---|---|---|
Volume | Volume | 0x60 |
64-bit
Name | Type | Length | Comments |
---|---|---|---|
Volume | Volume | 0x68 |
rw::collision::AALineClipper::Init::AABBox
Name | Type | Length | Comments |
---|---|---|---|
AABBox | AABBoxTemplate | 0x4 |
TargetPtr
Name | Type | Length | Comments |
---|---|---|---|
TargetPtr | uint32_t | 0x4 |