Class ConvexHullBehavior
Represents a ConvexHull Rigidbody for Element3D.
Inherited Members
Namespace: Genesis.Core.Behaviors.Physics3D
Assembly: Genesis.dll
Syntax
public class ConvexHullBehavior : PhysicsBehavior
Constructors
ConvexHullBehavior()
Declaration
public ConvexHullBehavior()
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, int, int)
Creates a RigidBody for the ConvexHullBehavior.
Declaration
public void CreateRigidBody(PhysicHandler handler, float mass, int CollisionGroup = -1, int CollisionMask = -1)
Parameters
Type | Name | Description |
---|---|---|
PhysicHandler | handler | Physics handler responsible for managing elements. |
float | mass | Mass of the rigid body. |
int | CollisionGroup | |
int | CollisionMask |
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, rotation, and scale based on the associated parent element.
Declaration
public void UpdateRigidBody()