Stride

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

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

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

    Torus Class

    Namespace: Stride.Particles.Updaters.FieldShapes
    Assembly: Stride.Particles.dll
    System.Object → FieldShape → Torus
    Derived from Torus:

    [DataContract("FieldShapeTorus")]
    public class Torus : FieldShape
    Name Description
    Properties
    BigRadius

    Big radius of the torus

    SmallRadius

    Small radius of the torus, given as a relative size to the big radius

    Methods
    GetDebugDrawShape(out Vector3, out Quaternion, out Vector3)
    GetDistanceToCenter(Vector3, Vector3, out Vector3, out Vector3, out Vector3)
    IsPointInside(Vector3, out Vector3, out Vector3)
    PreUpdateField(Vector3, Quaternion, Vector3)
    | Improve this Doc View Source

    Properties


    BigRadius

    Big radius of the torus

    [DataMember(10)]
    [Display("Big radius", null)]
    public float BigRadius { get; set; }
    Property Value
    Type Description
    System.Single

    SmallRadius

    Small radius of the torus, given as a relative size to the big radius

    [DataMember(20)]
    [DataMemberRange(0, 1, 0.01, 0.1, 3)]
    [Display("Small radius", null)]
    public float SmallRadius { get; set; }
    Property Value
    Type Description
    System.Single
    | Improve this Doc View Source

    Methods


    GetDebugDrawShape(out Vector3, out Quaternion, out Vector3)

    public override DebugDrawShape GetDebugDrawShape(out Vector3 pos, out Quaternion rot, out Vector3 scl)
    Parameters
    Type Name Description
    Vector3 pos
    Quaternion rot
    Vector3 scl
    Returns
    Type Description
    DebugDrawShape
    Overrides
    FieldShape.GetDebugDrawShape(out Vector3, out Quaternion, out Vector3)

    GetDistanceToCenter(Vector3, Vector3, out Vector3, out Vector3, out Vector3)

    public override float GetDistanceToCenter(Vector3 particlePosition, Vector3 particleVelocity, out Vector3 alongAxis, out Vector3 aroundAxis, out Vector3 awayAxis)
    Parameters
    Type Name Description
    Vector3 particlePosition
    Vector3 particleVelocity
    Vector3 alongAxis
    Vector3 aroundAxis
    Vector3 awayAxis
    Returns
    Type Description
    System.Single
    Overrides
    FieldShape.GetDistanceToCenter(Vector3, Vector3, out Vector3, out Vector3, out Vector3)

    IsPointInside(Vector3, out Vector3, out Vector3)

    public override bool IsPointInside(Vector3 particlePosition, out Vector3 surfacePoint, out Vector3 surfaceNormal)
    Parameters
    Type Name Description
    Vector3 particlePosition
    Vector3 surfacePoint
    Vector3 surfaceNormal
    Returns
    Type Description
    System.Boolean
    Overrides
    FieldShape.IsPointInside(Vector3, out Vector3, out Vector3)

    PreUpdateField(Vector3, Quaternion, Vector3)

    public override void PreUpdateField(Vector3 position, Quaternion rotation, Vector3 size)
    Parameters
    Type Name Description
    Vector3 position
    Quaternion rotation
    Vector3 size
    Overrides
    FieldShape.PreUpdateField(Vector3, Quaternion, Vector3)

    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