Table of Contents

Class ColliderShape

Namespace
Stride.Physics
Assembly
Stride.Physics.dll
public class ColliderShape : IDisposable
Inheritance
ColliderShape
Implements
Derived
Extension Methods

Fields

DebugPrimitiveMatrix

public Matrix DebugPrimitiveMatrix

Field Value

Matrix

DebugScaling

protected const float DebugScaling = 1

Field Value

float

LocalOffset

The local offset

public Vector3 LocalOffset

Field Value

Vector3

LocalRotation

The local rotation

public Quaternion LocalRotation

Field Value

Quaternion

NegativeCenterMatrix

Gets the negative center matrix.

public Matrix NegativeCenterMatrix

Field Value

Matrix

The negative center matrix.

PositiveCenterMatrix

Gets the positive center matrix.

public Matrix PositiveCenterMatrix

Field Value

Matrix

The positive center matrix.

cachedScaling

protected Vector3 cachedScaling

Field Value

Vector3

Properties

Description

public IColliderShapeDesc Description { get; }

Property Value

IColliderShapeDesc

Is2D

Gets a value indicating whether the collider shape is 2D.

public bool Is2D { get; }

Property Value

bool

true if [is2 d]; otherwise, false.

Margin

public float Margin { get; set; }

Property Value

float

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

Vector3

The scaling.

Type

Gets or sets the type.

public ColliderShapeTypes Type { get; protected set; }

Property Value

ColliderShapeTypes

The type.

Methods

CreateDebugPrimitive(GraphicsDevice)

public virtual MeshDraw CreateDebugPrimitive(GraphicsDevice device)

Parameters

device GraphicsDevice

Returns

MeshDraw

CreateUpdatableDebugPrimitive(GraphicsDevice)

public virtual IDebugPrimitive CreateUpdatableDebugPrimitive(GraphicsDevice device)

Parameters

device GraphicsDevice

Returns

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

commandList CommandList
debugPrimitive IDebugPrimitive

UpdateLocalTransformations()

Updates the local transformations, required if you change LocalOffset and/or LocalRotation.

public virtual void UpdateLocalTransformations()