Class SphereRigidBody
Represents a Sphere RigidBody behavior for 3D physics.
Inherited Members
Namespace: Genesis.Core.Behaviors.Physics3D
Assembly: Genesis.dll
Syntax
public class SphereRigidBody : RigidBodyBehavior3D
Constructors
SphereRigidBody(PhysicHandler)
Constructor for creating a SphereRigidBody behavior.
Declaration
public SphereRigidBody(PhysicHandler handler)
Parameters
Type | Name | Description |
---|---|---|
PhysicHandler | handler | The physics handler managing this rigid body. |
Methods
CreateRigidBody(Vec3, float, float)
Creates a rigid body with a sphere shape at the specified offset.
Declaration
public void CreateRigidBody(Vec3 offset, float radius, float mass)
Parameters
Type | Name | Description |
---|---|---|
Vec3 | offset | The offset from the parent element's location. |
float | radius | The radius of the sphere. |
float | mass | The mass of the sphere rigid body. |
CreateRigidBody(float)
Creates a rigid body with a sphere shape using the default radius (half of the parent's size).
Declaration
public override void CreateRigidBody(float mass)
Parameters
Type | Name | Description |
---|---|---|
float | mass | The mass of the sphere rigid body. |
Overrides
CreateRigidBody(float, float)
Creates a rigid body with a sphere shape at the origin.
Declaration
public void CreateRigidBody(float radius, float mass)
Parameters
Type | Name | Description |
---|---|---|
float | radius | The radius of the sphere. |
float | mass | The mass of the sphere rigid body. |