Class SegmentQueryInfo

    Definition

    Namespace:
    Tizen.NUI.Physics2D.Chipmunk
    Assembly:
    Tizen.NUI.Physics2D.dll

    Segment queries return where a shape was hit and its surface normal at the point of contact. Use Shape == null to test if a shape was hit. Segment queries are like ray casting, but because not all spatial indexes allow processing infinitely long ray queries, it's limited to segments. In practice, this is still very fast and you don’t need to worry too much about the performance as long as you aren’t using extremely long segments for your queries.

    public sealed class SegmentQueryInfo : IEquatable<SegmentQueryInfo>
    Inheritance
    object
    SegmentQueryInfo

    Constructors

    View Source

    SegmentQueryInfo(Shape, Vect, Vect, double)

    Construct a Segment query info.

    Declaration
    public SegmentQueryInfo(Shape s, Vect p, Vect n, double a)
    Parameters
    Type Name Description
    Shape s
    Vect p
    Vect n
    double a

    Properties

    View Source

    Alpha

    The normalized distance along the query segment in the range [0, 1]

    Declaration
    public double Alpha { get; }
    Property Value
    Type Description
    double
    View Source

    Normal

    The normal of the surface that was hit.

    Declaration
    public Vect Normal { get; }
    Property Value
    Type Description
    Vect
    View Source

    Point

    The point of impact.

    Declaration
    public Vect Point { get; }
    Property Value
    Type Description
    Vect
    View Source

    Shape

    Shape that was hit, or None if no collision occured.

    Declaration
    public Shape Shape { get; }
    Property Value
    Type Description
    Shape

    Methods

    View Source

    Equals(object)

    Return true if the given object is reference-equal to this one.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj
    Returns
    Type Description
    bool
    View Source

    Equals(SegmentQueryInfo)

    Return true if the fields in both objects are equivalent and the Tizen.NUI.Physics2D.Chipmunk.SegmentQueryInfo.alpha field is within of the other's.

    Declaration
    public bool Equals(SegmentQueryInfo other)
    Parameters
    Type Name Description
    SegmentQueryInfo other
    Returns
    Type Description
    bool
    View Source

    GetHashCode()

    Get the hash code.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    Operators

    View Source

    operator ==(SegmentQueryInfo, SegmentQueryInfo)

    Return true if both objects are reference-equal to each other.

    Declaration
    public static bool operator ==(SegmentQueryInfo left, SegmentQueryInfo right)
    Parameters
    Type Name Description
    SegmentQueryInfo left
    SegmentQueryInfo right
    Returns
    Type Description
    bool
    View Source

    operator !=(SegmentQueryInfo, SegmentQueryInfo)

    Return true if both objects are not reference-equal to each other.

    Declaration
    public static bool operator !=(SegmentQueryInfo a, SegmentQueryInfo b)
    Parameters
    Type Name Description
    SegmentQueryInfo a
    SegmentQueryInfo b
    Returns
    Type Description
    bool

    Extension Methods

    EXamlExtensions.LoadFromEXamlByRelativePath<T>(T, string)
    Extensions.LoadFromXaml<TXaml>(TXaml, string)
    Extensions.LoadFromXaml<TXaml>(TXaml, Type)
    Extensions.LoadFromXamlFile<TXaml>(TXaml, string)
    • View Source
    Back to top Copyright © 2016-2025 Samsung
    Generated by DocFX