Stride

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

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

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

    Collision Class

    Namespace: Stride.Physics
    Assembly: Stride.Physics.dll
    System.Object → Collision
    Derived from Collision:

    public class Collision
    Name Description
    Fields
    Contacts
    Properties
    ColliderA
    ColliderB
    HasEndedFromComponentRemoval

    True if the collision has ended because one of the colliders has been removed, either by removing the entity from the scene or by removing physics component from the entity.

    Methods
    ContactEnded()
    ContactUpdate()
    Ended()
    Equals(Object)
    GetHashCode()
    Initialize(PhysicsComponent, PhysicsComponent)
    NewContact()
    | Improve this Doc View Source

    Fields


    Contacts

    public HashSet<ContactPoint> Contacts
    Field Value
    Type Description
    System.Collections.Generic.HashSet<ContactPoint>
    | Improve this Doc View Source

    Properties


    ColliderA

    public PhysicsComponent ColliderA { get; }
    Property Value
    Type Description
    PhysicsComponent

    ColliderB

    public PhysicsComponent ColliderB { get; }
    Property Value
    Type Description
    PhysicsComponent

    HasEndedFromComponentRemoval

    True if the collision has ended because one of the colliders has been removed, either by removing the entity from the scene or by removing physics component from the entity.

    public bool HasEndedFromComponentRemoval { get; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    If true, it is not safe to invoke further actions on the colliders. Only use colliders information to identify the entity that has been removed.

    | Improve this Doc View Source

    Methods


    ContactEnded()

    public ChannelMicroThreadAwaiter<ContactPoint> ContactEnded()
    Returns
    Type Description
    ChannelMicroThreadAwaiter<ContactPoint>

    ContactUpdate()

    public ChannelMicroThreadAwaiter<ContactPoint> ContactUpdate()
    Returns
    Type Description
    ChannelMicroThreadAwaiter<ContactPoint>

    Ended()

    public async Task Ended()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Equals(Object)

    public override bool Equals(object obj)
    Parameters
    Type Name Description
    System.Object obj
    Returns
    Type Description
    System.Boolean
    Overrides
    System.Object.Equals(System.Object)

    GetHashCode()

    public override int GetHashCode()
    Returns
    Type Description
    System.Int32
    Overrides
    System.Object.GetHashCode()

    Initialize(PhysicsComponent, PhysicsComponent)

    public void Initialize(PhysicsComponent colliderA, PhysicsComponent colliderB)
    Parameters
    Type Name Description
    PhysicsComponent colliderA
    PhysicsComponent colliderB

    NewContact()

    public ChannelMicroThreadAwaiter<ContactPoint> NewContact()
    Returns
    Type Description
    ChannelMicroThreadAwaiter<ContactPoint>

    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