Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    ColliderShape Class

    Namespace: Stride.Physics
    Assembly: Stride.Physics.dll
    System.Object → ColliderShape
    Derived from ColliderShape: BoxColliderShape CapsuleColliderShape CompoundColliderShape ConeColliderShape ConvexHullColliderShape CylinderColliderShape HeightfieldColliderShape SphereColliderShape StaticMeshColliderShape StaticPlaneColliderShape

    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.

    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    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

    true if [is2 d]; otherwise, false.


    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.

    | Improve this Doc View Source

    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()

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation