Quantum 3
3.1.0
Defines the settings for a physics body to resolve its collision when it is touching another body. More...
Public Member Functions | |
| PhysicsMaterialData (FP restitution, PhysicsCombineFunction restitutionCombine, FP frictionStatic, FP frictionDynamic, PhysicsCombineFunction frictionCombine) | |
| Creates a physics material data with custom values. More... | |
| readonly override Int32 | GetHashCode () |
| Overrides the hash code generation of this type. More... | |
Static Public Member Functions | |
| static unsafe void | GetCombinedFriction (PhysicsMaterialData *aMaterial, PhysicsMaterialData *bMaterial, out FP staticFriction, out FP dynamicFriction) |
| Computed the resultant static and dynamic friction coefficients between two physics materials. More... | |
| static unsafe FP | GetCombinedRestitution (PhysicsMaterialData *aMaterial, PhysicsMaterialData *bMaterial) |
| Computed the resultant restitution factor between two physics materials. More... | |
| static PhysicsMaterialData | GetDefaultPhysicsMaterialData () |
| Returns a PhysicsMaterialData with default values. The restitition is 0 and the friction is 0.6. The default combination mode is the PhysicsCombineFunction.Average for all functions. More... | |
| static unsafe void | Serialize (PhysicsMaterialData *ptr, FrameSerializer serializer) |
| Serializes a PhysicsMaterialData into a FrameSerializer. More... | |
Public Attributes | |
| readonly PhysicsCombineFunction | FrictionCombineFunction |
| Define how the physics system calculates friction between two physics bodies, based on each collider’s friction. More... | |
| readonly FP | FrictionDynamic |
| How much friction the collider has against another collider when they are not moving. More... | |
| readonly FP | FrictionStatic |
| How much friction the collider has against another collider when they are moving and touching each other. More... | |
| readonly FP | Restitution |
| Defines how much movement is restituted after a collision solver. It can be used to apply a bounciness behavior to the physics body. More... | |
| readonly PhysicsCombineFunction | RestitutionCombineFunction |
| Define how the physics system calculates restitution for two physics bodies, based on each collider's restitution. More... | |
Static Public Attributes | |
| const Int32 | SIZE = sizeof(Int32) * 2 + FP.SIZE * 3 |
| Represents the size of a variable in bytes. More... | |
Defines the settings for a physics body to resolve its collision when it is touching another body.
|
inline |
Creates a physics material data with custom values.
| restitution | How much movement should be restituted after the collision resolution. |
| restitutionCombine | The combination mode for the restituition between two colliders. |
| frictionStatic | How much friction applied against two colliders in movement. |
| frictionDynamic | How much friction applied against two stopped colliders. |
| frictionCombine | The combination mode for the friction between two bodies. |
|
inlinestatic |
Returns a PhysicsMaterialData with default values. The restitition is 0 and the friction is 0.6. The default combination mode is the PhysicsCombineFunction.Average for all functions.
|
inlinestatic |
Computed the resultant restitution factor between two physics materials.
| aMaterial | |
| bMaterial |
| ArgumentOutOfRangeException | In case one of the materials has an invalid combine function. |
|
inlinestatic |
Computed the resultant static and dynamic friction coefficients between two physics materials.
| aMaterial | |
| bMaterial | |
| staticFriction | |
| dynamicFriction |
| ArgumentOutOfRangeException | In case one of the materials has an invalid combine function. |
|
inline |
Overrides the hash code generation of this type.
|
inlinestatic |
Serializes a PhysicsMaterialData into a FrameSerializer.
| ptr | The pointer to the PhysicsMaterialData. |
| serializer | The FrameSerializer instance into which the struct will be serialized. |
|
static |
Represents the size of a variable in bytes.
| readonly PhysicsCombineFunction Quantum.PhysicsMaterialData.RestitutionCombineFunction |
Define how the physics system calculates restitution for two physics bodies, based on each collider's restitution.
| readonly PhysicsCombineFunction Quantum.PhysicsMaterialData.FrictionCombineFunction |
Define how the physics system calculates friction between two physics bodies, based on each collider’s friction.
| readonly FP Quantum.PhysicsMaterialData.Restitution |
Defines how much movement is restituted after a collision solver. It can be used to apply a bounciness behavior to the physics body.
| readonly FP Quantum.PhysicsMaterialData.FrictionStatic |
How much friction the collider has against another collider when they are moving and touching each other.
| readonly FP Quantum.PhysicsMaterialData.FrictionDynamic |
How much friction the collider has against another collider when they are not moving.