HughPH.Box2D
Organised dotnet bindings for Box2D 3.1.0
Loading...
Searching...
No Matches
Functions
Box2D.Delegates.Generic Namespace Reference

Functions

delegate void DrawCircleDelegate< in TContext > (Vec2 center, float radius, HexColor color, TContext context)
 Draw a circle.
 
delegate void DrawPointDelegate< in TContext > (Vec2 p, float size, HexColor color, TContext context)
 Draw a point.
 
delegate void DrawPolygonDelegate< in TContext > (ReadOnlySpan< Vec2 > vertices, HexColor color, TContext context)
 Draw a closed polygon provided in CCW order.
 
delegate void DrawSegmentDelegate< in TContext > (Vec2 p1, Vec2 p2, HexColor color, TContext context)
 Draw a line segment.
 
delegate void DrawSolidCapsuleDelegate< in TContext > (Vec2 p1, Vec2 p2, float radius, HexColor color, TContext context)
 Draw a solid capsule.
 
delegate void DrawSolidCircleDelegate< in TContext > (Transform transform, float radius, HexColor color, TContext context)
 Draw a solid circle.
 
delegate void DrawSolidPolygonDelegate< in TContext > (Transform transform, ReadOnlySpan< Vec2 > vertices, float radius, HexColor color, TContext context)
 Draw a solid closed polygon provided in CCW order.
 
delegate void DrawStringDelegate< in TContext > (Vec2 point, string? text, HexColor color, TContext context)
 Draw a string in world space.
 
delegate void DrawTransformDelegate< in TContext > (Transform transform, TContext context)
 Draw a transform.
 

Function Documentation

◆ DrawCircleDelegate< in TContext >()

delegate void Box2D.Delegates.Generic.DrawCircleDelegate< in TContext > ( Vec2  center,
float  radius,
HexColor  color,
TContext  context 
)

Draw a circle.

Parameters
centerThe circle center
radiusThe radius
colorThe color
contextThe context
Type Constraints
TContext :class 

◆ DrawPointDelegate< in TContext >()

delegate void Box2D.Delegates.Generic.DrawPointDelegate< in TContext > ( Vec2  p,
float  size,
HexColor  color,
TContext  context 
)

Draw a point.

Parameters
pThe point
sizeThe size
colorThe color
contextThe context
Type Constraints
TContext :class 

◆ DrawPolygonDelegate< in TContext >()

delegate void Box2D.Delegates.Generic.DrawPolygonDelegate< in TContext > ( ReadOnlySpan< Vec2 >  vertices,
HexColor  color,
TContext  context 
)

Draw a closed polygon provided in CCW order.

Parameters
verticesThe vertices
colorThe color
contextThe context
Type Constraints
TContext :class 

◆ DrawSegmentDelegate< in TContext >()

delegate void Box2D.Delegates.Generic.DrawSegmentDelegate< in TContext > ( Vec2  p1,
Vec2  p2,
HexColor  color,
TContext  context 
)

Draw a line segment.

Parameters
p1The first point
p2The second point
colorThe color
contextThe context
Type Constraints
TContext :class 

◆ DrawSolidCapsuleDelegate< in TContext >()

delegate void Box2D.Delegates.Generic.DrawSolidCapsuleDelegate< in TContext > ( Vec2  p1,
Vec2  p2,
float  radius,
HexColor  color,
TContext  context 
)

Draw a solid capsule.

Parameters
p1The first point
p2The second point
radiusThe radius
colorThe color
contextThe context
Type Constraints
TContext :class 

◆ DrawSolidCircleDelegate< in TContext >()

delegate void Box2D.Delegates.Generic.DrawSolidCircleDelegate< in TContext > ( Transform  transform,
float  radius,
HexColor  color,
TContext  context 
)

Draw a solid circle.

Parameters
transformThe transform
radiusThe radius
colorThe color
contextThe context
Type Constraints
TContext :class 

◆ DrawSolidPolygonDelegate< in TContext >()

delegate void Box2D.Delegates.Generic.DrawSolidPolygonDelegate< in TContext > ( Transform  transform,
ReadOnlySpan< Vec2 >  vertices,
float  radius,
HexColor  color,
TContext  context 
)

Draw a solid closed polygon provided in CCW order.

Parameters
transformThe transform
verticesThe vertices
radiusThe radius
colorThe color
contextThe context
Type Constraints
TContext :class 

◆ DrawStringDelegate< in TContext >()

delegate void Box2D.Delegates.Generic.DrawStringDelegate< in TContext > ( Vec2  point,
string?  text,
HexColor  color,
TContext  context 
)

Draw a string in world space.

Parameters
pointThe point
textThe string
colorThe color
contextThe context
Type Constraints
TContext :class 

◆ DrawTransformDelegate< in TContext >()

delegate void Box2D.Delegates.Generic.DrawTransformDelegate< in TContext > ( Transform  transform,
TContext  context 
)

Draw a transform.

Parameters
transformThe transform
contextThe context

Choose your own length scale

Type Constraints
TContext :class