Classes¶
Physics/Materials
Brief descriptions¶
Classes |
|
Provides interface for managing physical materials. |
Detailed information¶
physics::IPhysicsMaterial¶
engine/core/modules/physics/include/nau/physics/physics_material.h
-
class IPhysicsMaterial : public virtual IRefCounted¶
Provides interface for managing physical materials.
Materials can be used to override physical properties (such as friction, restitution) of an area (sub-shape, triangle) of a collider surface or the whole collider surface. Material data can be obtained at a contact point and later utilized to choose a sound or a particle effect to visualize the contact.
Subclassed by nau::physics::jolt::NauJoltPhysicsMaterialImpl
Private Types
-
using Ptr = Ptr<IPhysicsMaterial>¶
A pointer type for referencing IPhysicsMaterial objects.
Private Functions
-
virtual eastl::string_view getName() const = 0¶
Retrives the name of the material.
- Returns:
Name of the material.
-
virtual eastl::optional<TFloat> getFriction() const = 0¶
Retrieves the friction value.
See nau::physics::PhysicsBodyCreationData::friction for more information.
- Returns:
Friction value. An implementation may return an empty value, if this material is not intended to override the body default friction.
-
virtual eastl::optional<TFloat> getRestitution() const = 0¶
Retrieves the restitution value.
See nau::physics::PhysicsBodyCreationData::restitution for more information.
- Returns:
Restitution value. An implementation may return an empty value, if this material is not intended to override the body default restitution.
-
using Ptr = Ptr<IPhysicsMaterial>¶