Class QubeConvexHull
Represents a Physics behavior for a 3D cube with a convex hull shape.
Inherited Members
Namespace: Genesis.Core.Behaviors.Physics3D
Assembly: Genesis.dll
Syntax
public class QubeConvexHull : PhysicsBehavior
Constructors
QubeConvexHull()
Declaration
public QubeConvexHull()
Properties
RigidBody
Gets or sets the RigidBody associated with this behavior.
Declaration
public RigidBody RigidBody { get; set; }
Property Value
| Type | Description |
|---|---|
| RigidBody |
Methods
CreateRigidBody(PhysicHandler, float)
Creates a RigidBody for the QubeConvexHull behavior.
Declaration
public void CreateRigidBody(PhysicHandler handler, float mass)
Parameters
| Type | Name | Description |
|---|---|---|
| PhysicHandler | handler | Physics handler responsible for managing elements. |
| float | mass | Mass of the rigid body. |
GetPhysicsObject()
Gets the associated RigidBody as an object.
Declaration
public override object GetPhysicsObject()
Returns
| Type | Description |
|---|---|
| object |
Overrides
GetPhysicsObject<T>()
Gets the associated RigidBody with the specified type.
Declaration
public override T GetPhysicsObject<T>()
Returns
| Type | Description |
|---|---|
| T |
Type Parameters
| Name | Description |
|---|---|
| T |
Overrides
OnDestroy(Game, GameElement)
Called when the associated game element is destroyed.
Declaration
public override void OnDestroy(Game game, GameElement parent)
Parameters
| Type | Name | Description |
|---|---|---|
| Game | game | |
| GameElement | parent |
Overrides
OnInit(Game, GameElement)
Called when the associated game element is initialized.
Declaration
public override void OnInit(Game game, GameElement parent)
Parameters
| Type | Name | Description |
|---|---|---|
| Game | game | |
| GameElement | parent |
Overrides
OnRender(Game, GameElement)
Called during the rendering phase.
Declaration
public override void OnRender(Game game, GameElement parent)
Parameters
| Type | Name | Description |
|---|---|---|
| Game | game | |
| GameElement | parent |
Overrides
OnUpdate(Game, GameElement)
Called during the update phase.
Declaration
public override void OnUpdate(Game game, GameElement parent)
Parameters
| Type | Name | Description |
|---|---|---|
| Game | game | |
| GameElement | parent |
Overrides
UpdateRigidBody()
Updates the RigidBody's position and rotation based on the associated parent element.
Declaration
public void UpdateRigidBody()