struct
   CP::SegmentQueryInfo
 
  - CP::SegmentQueryInfo
- Struct
- Value
- Object
Overview
Segment queries return more information than just a simple yes or no, they also return where a shape was hit and its surface normal at the hit point. This object holds that information.
Segment queries are like ray casting, but because not all spatial indexes allow processing infinitely long ray queries it is 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.
Defined in:
chipmunk/query.crConstructors
Instance Method Summary
- 
        #alpha : Float64
        
          The normalized distance along the query segment in the range [0, 1]. 
- #alpha=(alpha : Float64)
- 
        #normal : Vect
        
          The normal of the surface hit. 
- #normal=(normal : Vect)
- 
        #point : Vect
        
          The point of impact. 
- #point=(point : Vect)
- 
        #shape : Shape
        
          The shape that was hit. 
- #shape=(shape : Shape)