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
-
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
Properties
View Source
Alpha
The normalized distance along the query segment in the range [0, 1]
Declaration
public double Alpha { get; }
Property Value
View Source
Normal
The normal of the surface that was hit.
Declaration
public Vect Normal { get; }
Property Value
View Source
Point
Declaration
public Vect Point { get; }
Property Value
View Source
Shape
Shape that was hit, or None if no collision occured.
Declaration
public Shape Shape { get; }
Property Value
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
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
Returns
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
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
Returns
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
Returns
Extension Methods