HughPH.Box2D
Organised dotnet bindings for Box2D 3.1.0
|
A line segment with two-sided collision. More...
Inherits IEquatable< Segment >.
Public Member Functions | |
Segment (Vec2 point1, Vec2 point2) | |
Construct a segment shape with two points. | |
AABB | ComputeAABB (in Transform transform) |
Compute the bounding box of this transformed line segment. | |
CastOutput | RayCast (in RayCastInput input, bool oneSided) |
Ray cast versus this segment shape in local space. Optionally treat the segment as one-sided with hits from the left side being treated as a miss. | |
CastOutput | ShapeCast (in ShapeCastInput input) |
Shape cast versus this line segment. Initial overlap is treated as a miss. | |
SegmentDistanceResult | SegmentDistance (in Segment segmentB) |
Compute the distance between this line segment and another line segment, clamping at the end points if needed. | |
bool | Equals (Segment other) |
Check if two segments are equal. | |
override bool | Equals (object? obj) |
Check if an object is equal to this segment. | |
override int | GetHashCode () |
Returns a hash code for this segment. | |
Static Public Member Functions | |
static implicit | operator Vec2[] (Segment segment) |
Implicitly convert a segment to an array of two points. | |
Public Attributes | |
Vec2 | Point1 |
The first point. | |
Vec2 | Point2 |
The second point. | |
A line segment with two-sided collision.