Package pymunk :: Class SegmentQueryInfo
[frames] | no frames]

Class SegmentQueryInfo

object --+
         |
        SegmentQueryInfo

Segment queries return more information than just a simple yes or no, they also return where a shape was hit and it's surface normal at the hit point. This object hold that information.
Instance Methods
 
__init__(self, shape, start, end, t, n)
You shouldn't need to initialize SegmentQueryInfo objects on your own.
 
__repr__(self)
repr(x)
 
get_hit_point(self)
Return the hit point in world coordinates where the segment first intersected with the shape
 
get_hit_distance(self)
Return the absolute distance where the segment first hit the shape

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties
  shape
Shape that was hit
  t
Distance along query segment, will always be in the range [0, 1]
  n
Normal of hit surface

Inherited from object: __class__

Method Details

__init__(self, shape, start, end, t, n)
(Constructor)

 
You shouldn't need to initialize SegmentQueryInfo objects on your own.
Overrides: object.__init__

__repr__(self)
(Representation operator)

 
repr(x)
Overrides: object.__repr__
(inherited documentation)

Property Details

shape

Shape that was hit
Get Method:
unreachable(self)

t

Distance along query segment, will always be in the range [0, 1]
Get Method:
unreachable(self)

n

Normal of hit surface
Get Method:
unreachable(self)