Quantum 3 3.0.14

Public Member Functions | Public Attributes | List of all members
Quantum.Prototypes.PhysicsBody2DPrototype Class Reference

Prototype of the PhysicsBody2D Quantum component. More...

Inherits Quantum.ComponentPrototype< Quantum.PhysicsBody2D >.

Public Member Functions

sealed override bool AddToEntity (FrameBase f, EntityRef entity, in PrototypeMaterializationContext context)
 Creates an instance of the PhysicsBody2D component, materializes and adds it to the entity. More...
 
unsafe void Materialize (FrameBase frame, ref PhysicsBody2D component)
 
void Materialize (FrameBase frame, ref Quantum.PhysicsBody2D result, in PrototypeMaterializationContext context)
 Applies the prototype's fields to the actual component. More...
 

Public Attributes

FP AngularDrag = FP._0_50
 The PhysicsBody's angular drag. More...
 
FPVector2 CenterOfMass = FPVector2.Zero
 The PhysicsBody's center of mass. More...
 
QEnum8< Quantum.PhysicsBody2D.ConfigFlagsConfig = Quantum.PhysicsBody2D.ConfigFlags.Default
 The configuration flags used by the PhysicsBody. More...
 
FP Drag = FP._0_50
 The PhysicsBody's drag. More...
 
FP ExplicitInertia = FP._1
 The body inertia tensor when InertiaMode is set to PhysicsBodyInertiaMode.Explicit. More...
 
NullableFP GravityScale = new NullableFP(){_hasValue = 0, _value = FP._1}
 The PhysicsBody's gravity scale. More...
 
PhysicsBodyInertiaMode InertiaMode = PhysicsBodyInertiaMode.ColliderShape
 The mode in which the body's inertia tensor is computed. More...
 
NullableFP InertiaScale = new NullableFP() { _hasValue = 0, _value = FP._1 }
 The scale of the body inertia tensor. More...
 
FP Mass = 1
 The PhysicsBody's mass. More...
 
Shape2DConfig ParametricInertiaShape = new Shape2DConfig() { ShapeType = Shape2DType.Box, BoxExtents = FPVector2.One * FP._0_50 }
 The parametric shape used to compute the body inertia tensor when InertiaMode is set to PhysicsBodyInertiaMode.ParametricShape. More...
 

Detailed Description

Prototype of the PhysicsBody2D Quantum component.

Member Function Documentation

◆ AddToEntity()

sealed override bool Quantum.Prototypes.PhysicsBody2DPrototype.AddToEntity ( FrameBase  f,
EntityRef  entity,
in PrototypeMaterializationContext  context 
)
inline

Creates an instance of the PhysicsBody2D component, materializes and adds it to the entity.

Parameters
f
entity
context
Returns
Returns true if adding the component to the entity succeeds.

◆ Materialize()

void Quantum.Prototypes.PhysicsBody2DPrototype.Materialize ( FrameBase  frame,
ref Quantum.PhysicsBody2D  result,
in PrototypeMaterializationContext  context 
)
inline

Applies the prototype's fields to the actual component.

Member Data Documentation

◆ Config

QEnum8<Quantum.PhysicsBody2D.ConfigFlags> Quantum.Prototypes.PhysicsBody2DPrototype.Config = Quantum.PhysicsBody2D.ConfigFlags.Default

The configuration flags used by the PhysicsBody.

◆ Mass

FP Quantum.Prototypes.PhysicsBody2DPrototype.Mass = 1

The PhysicsBody's mass.

◆ Drag

FP Quantum.Prototypes.PhysicsBody2DPrototype.Drag = FP._0_50

The PhysicsBody's drag.

◆ AngularDrag

FP Quantum.Prototypes.PhysicsBody2DPrototype.AngularDrag = FP._0_50

The PhysicsBody's angular drag.

◆ CenterOfMass

FPVector2 Quantum.Prototypes.PhysicsBody2DPrototype.CenterOfMass = FPVector2.Zero

The PhysicsBody's center of mass.

◆ GravityScale

NullableFP Quantum.Prototypes.PhysicsBody2DPrototype.GravityScale = new NullableFP(){_hasValue = 0, _value = FP._1}

The PhysicsBody's gravity scale.

◆ InertiaScale

NullableFP Quantum.Prototypes.PhysicsBody2DPrototype.InertiaScale = new NullableFP() { _hasValue = 0, _value = FP._1 }

The scale of the body inertia tensor.

◆ InertiaMode

PhysicsBodyInertiaMode Quantum.Prototypes.PhysicsBody2DPrototype.InertiaMode = PhysicsBodyInertiaMode.ColliderShape

The mode in which the body's inertia tensor is computed.

◆ ExplicitInertia

FP Quantum.Prototypes.PhysicsBody2DPrototype.ExplicitInertia = FP._1

The body inertia tensor when InertiaMode is set to PhysicsBodyInertiaMode.Explicit.

◆ ParametricInertiaShape

Shape2DConfig Quantum.Prototypes.PhysicsBody2DPrototype.ParametricInertiaShape = new Shape2DConfig() { ShapeType = Shape2DType.Box, BoxExtents = FPVector2.One * FP._0_50 }

The parametric shape used to compute the body inertia tensor when InertiaMode is set to PhysicsBodyInertiaMode.ParametricShape.