ColliderShape Class
Namespace: Stride.PhysicsAssembly: Stride.Physics.dll
public class ColliderShape : IDisposable
Name | Description | |
---|---|---|
Fields | ||
cachedScaling | ||
DebugPrimitiveMatrix | ||
DebugScaling | ||
LocalOffset | The local offset |
|
LocalRotation | The local rotation |
|
NegativeCenterMatrix | Gets the negative center matrix. |
|
PositiveCenterMatrix | Gets the positive center matrix. |
|
Properties | ||
Description | ||
Is2D | Gets a value indicating whether the collider shape is 2D. |
|
Scaling | Gets or sets the scaling. Make sure that you manually created and assigned an exclusive ColliderShape to the Collider otherwise since the engine shares shapes among many Colliders, all the colliders will be scaled. Please note that this scaling has no relation to the TransformComponent scaling. |
|
Type | Gets or sets the type. |
|
Methods | ||
CreateDebugPrimitive(GraphicsDevice) | ||
CreateUpdatableDebugPrimitive(GraphicsDevice) | ||
Dispose() | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. |
|
UpdateDebugPrimitive(CommandList, IDebugPrimitive) | ||
UpdateLocalTransformations() | Updates the local transformations, required if you change LocalOffset and/or LocalRotation. |
Fields
cachedScaling
protected Vector3 cachedScaling
Field Value
Type | Description |
---|---|
Vector3 |
DebugPrimitiveMatrix
public Matrix DebugPrimitiveMatrix
Field Value
Type | Description |
---|---|
Matrix |
DebugScaling
protected const float DebugScaling = 1F
Field Value
Type | Description |
---|---|
System.Single |
LocalOffset
The local offset
public Vector3 LocalOffset
Field Value
Type | Description |
---|---|
Vector3 |
LocalRotation
The local rotation
public Quaternion LocalRotation
Field Value
Type | Description |
---|---|
Quaternion |
NegativeCenterMatrix
Gets the negative center matrix.
public Matrix NegativeCenterMatrix
Field Value
Type | Description |
---|---|
Matrix | The negative center matrix. |
PositiveCenterMatrix
Gets the positive center matrix.
public Matrix PositiveCenterMatrix
Field Value
Type | Description |
---|---|
Matrix | The positive center matrix. |
Properties
Description
public IColliderShapeDesc Description { get; }
Property Value
Type | Description |
---|---|
IColliderShapeDesc |
Is2D
Gets a value indicating whether the collider shape is 2D.
public bool Is2D { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Scaling
Gets or sets the scaling. Make sure that you manually created and assigned an exclusive ColliderShape to the Collider otherwise since the engine shares shapes among many Colliders, all the colliders will be scaled. Please note that this scaling has no relation to the TransformComponent scaling.
public virtual Vector3 Scaling { get; set; }
Property Value
Type | Description |
---|---|
Vector3 | The scaling. |
Type
Gets or sets the type.
public ColliderShapeTypes Type { get; protected set; }
Property Value
Type | Description |
---|---|
ColliderShapeTypes | The type. |
Methods
CreateDebugPrimitive(GraphicsDevice)
public virtual MeshDraw CreateDebugPrimitive(GraphicsDevice device)
Parameters
Type | Name | Description |
---|---|---|
GraphicsDevice | device |
Returns
Type | Description |
---|---|
MeshDraw |
CreateUpdatableDebugPrimitive(GraphicsDevice)
public virtual IDebugPrimitive CreateUpdatableDebugPrimitive(GraphicsDevice device)
Parameters
Type | Name | Description |
---|---|---|
GraphicsDevice | device |
Returns
Type | Description |
---|---|
IDebugPrimitive |
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public virtual void Dispose()
UpdateDebugPrimitive(CommandList, IDebugPrimitive)
public virtual void UpdateDebugPrimitive(CommandList commandList, IDebugPrimitive debugPrimitive)
Parameters
Type | Name | Description |
---|---|---|
CommandList | commandList | |
IDebugPrimitive | debugPrimitive |
UpdateLocalTransformations()
Updates the local transformations, required if you change LocalOffset and/or LocalRotation.
public virtual void UpdateLocalTransformations()