PhysicMaterial

Inherited: Resource

Description

The PhysicMaterial class provides a convenient way to manage physical properties such as friction, restitution, and density for materials used in physics simulations. It can be associated with colliders or rigid bodies to control their behavior during interactions with other physical entities.

Public Methods

float

density () const

float

friction () const

float

restitution () const

void

setDensity (float density)

void

setFriction (float friction)

void

setRestitution (float restitution)

Static Methods

None

Methods Description

float PhysicMaterial::density () const

Sets the density of the material.

See also setDensity().


float PhysicMaterial::friction () const

Returns the coefficient of friction for the material.

See also setFriction().


float PhysicMaterial::restitution () const

Returns the coefficient of restitution (bounciness) for the material.

See also setRestitution().


void PhysicMaterial::setDensity (float density)

The new density of the material.

See also *density*().


void PhysicMaterial::setFriction (float friction)

Sets the coefficient of friction for the material.

See also *friction*().


void PhysicMaterial::setRestitution (float restitution)

Sets the coefficient of restitution (bounciness) for the material.

See also *restitution*().