Class PhysicsHandler3D
Represents a 3D physics handler responsible for managing physics simulation in a game.
Inherited Members
Namespace: Genesis.Physics
Assembly: Genesis.dll
Syntax
public class PhysicsHandler3D : PhysicHandler
Constructors
PhysicsHandler3D(PhysicPropeterys)
Initializes a new instance of the PhysicsHandler3D class with specified PhysicPropeterys.
Declaration
public PhysicsHandler3D(PhysicPropeterys propeterys)
Parameters
Type | Name | Description |
---|---|---|
PhysicPropeterys | propeterys | The physics properties containing gravity values. |
PhysicsHandler3D(float, float, float)
Initializes a new instance of the PhysicsHandler3D class with specified gravity values.
Declaration
public PhysicsHandler3D(float gravityX, float gravityY, float gravityZ)
Parameters
Type | Name | Description |
---|---|---|
float | gravityX | The X component of gravity. |
float | gravityY | The Y component of gravity. |
float | gravityZ | The Z component of gravity. |
Properties
PhysicsWorld
Gets or sets the 3D physics world used for simulation.
Declaration
public DiscreteDynamicsWorld PhysicsWorld { get; set; }
Property Value
Type | Description |
---|---|
DiscreteDynamicsWorld |
ProcessPhysics
Gets or sets a flag indicating whether physics simulation should be processed.
Declaration
public bool ProcessPhysics { get; set; }
Property Value
Type | Description |
---|---|
bool |
Methods
ManageElement(PhysicsBehavior, int, int)
Manages a physics behavior element by adding its collision object to the physics world.
Declaration
public override void ManageElement(PhysicsBehavior collisionObjec, int collisionGroup = -1, int collisionMask = -1)
Parameters
Type | Name | Description |
---|---|---|
PhysicsBehavior | collisionObjec | The PhysicsBehavior representing the rigid body element. |
int | collisionGroup | |
int | collisionMask |
Overrides
Process(Scene, Game)
Processes the physics simulation for the given scene and game.
Declaration
public override void Process(Scene scene, Game game)
Parameters
Type | Name | Description |
---|---|---|
Scene | scene | The current game scene. |
Game | game | The current game instance. |
Overrides
RemoveElement(PhysicsBehavior)
Removes the specified physics behavior from the physics world.
Declaration
public override void RemoveElement(PhysicsBehavior physicsBehavior)
Parameters
Type | Name | Description |
---|---|---|
PhysicsBehavior | physicsBehavior | The physics behavior to be removed. |
Overrides
Remarks
This method removes the collision object associated with the provided physics behavior from the physics world.