Class BoxCollider
Inherited Members
Namespace: Genesis.Core.Behaviors.Physics3D
Assembly: Genesis.dll
Syntax
public class BoxCollider : PhysicsBehavior
Constructors
BoxCollider()
Declaration
public BoxCollider()
Properties
RigidBody
Declaration
public RigidBody RigidBody { get; set; }
Property Value
Type | Description |
---|---|
RigidBody |
Methods
CreateCollider(PhysicHandler, Vec3, float)
Declaration
public void CreateCollider(PhysicHandler handler, Vec3 boxHalfExtends, float mass)
Parameters
Type | Name | Description |
---|---|---|
PhysicHandler | handler | |
Vec3 | boxHalfExtends | |
float | mass |
GetPhysicsObject()
Gets the physics object associated with this behavior.
Declaration
public override object GetPhysicsObject()
Returns
Type | Description |
---|---|
object | The physics object |
Overrides
GetPhysicsObject<T>()
Gets the physics object associated with this behavior, cast to type T.
Declaration
public override T GetPhysicsObject<T>()
Returns
Type | Description |
---|---|
T | The physics object cast to type T |
Type Parameters
Name | Description |
---|---|
T | Type to cast the physics object to |
Overrides
OnDestroy(Game, GameElement)
Called when the game behavior is being destroyed.
Declaration
public override void OnDestroy(Game game, GameElement parent)
Parameters
Type | Name | Description |
---|---|---|
Game | game | The game instance. |
GameElement | parent | The parent game element. |
Overrides
OnInit(Game, GameElement)
Called when the game behavior is initialized.
Declaration
public override void OnInit(Game game, GameElement parent)
Parameters
Type | Name | Description |
---|---|---|
Game | game | The game instance. |
GameElement | parent | The parent game element. |
Overrides
OnRender(Game, GameElement)
Called when the game behavior is rendered.
Declaration
public override void OnRender(Game game, GameElement parent)
Parameters
Type | Name | Description |
---|---|---|
Game | game | The game instance. |
GameElement | parent | The parent game element. |
Overrides
OnUpdate(Game, GameElement)
Called when the game behavior is updated.
Declaration
public override void OnUpdate(Game game, GameElement parent)
Parameters
Type | Name | Description |
---|---|---|
Game | game | The game instance. |
GameElement | parent | The parent game element. |