C# Class Box2D.Callbacks.DebugDraw

Implement this abstract class to allow JBox2d to automatically draw your physics for debugging purposes. Not intended to replace your own custom rendering routines!
Afficher le fichier Open project: gerich-home/box2dnet Class Usage Examples

Méthodes publiques

Méthode Description
AppendFlags ( DrawFlags flags ) : void
ClearFlags ( DrawFlags flags ) : void
DrawCircle ( Vec2 center, float radius, Color3f color ) : void

Draw a circle.

DrawPoint ( Vec2 argPoint, float argRadiusOnScreen, Color3f argColor ) : void
DrawPolygon ( Vec2 vertices, int vertexCount, Color3f color ) : void

Draw a closed polygon provided in CCW order. This implementation uses {@link #drawSegment(Vec2, Vec2, Color3f)} to draw each side of the polygon.

DrawSegment ( Vec2 p1, Vec2 p2, Color3f color ) : void

Draw a line segment.

DrawSolidCircle ( Vec2 center, float radius, Vec2 axis, Color3f color ) : void

Draw a solid circle.

DrawSolidPolygon ( Vec2 vertices, int vertexCount, Color3f color ) : void

Draw a solid closed polygon provided in CCW order.

DrawString ( Vec2 pos, String s, Color3f color ) : void
DrawString ( float x, float y, String s, Color3f color ) : void

Draw a string.

DrawTransform ( Transform xf ) : void

Draw a transform. Choose your own length scale

GetScreenToWorld ( Vec2 argScreen ) : Vec2

takes the screen coordinates (argScreen) and returns the world coordinates

GetScreenToWorld ( float screenX, float screenY ) : Vec2

takes the screen coordinates and returns the world coordinates.

GetScreenToWorldToOut ( Vec2 argScreen, Vec2 argWorld ) : void
GetScreenToWorldToOut ( float screenX, float screenY, Vec2 argWorld ) : void

takes the screen coordinates and puts the corresponding world coordinates in argWorld.

GetWorldToScreen ( Vec2 argWorld ) : Vec2

takes the world coordinate (argWorld) and returns the screen coordinates.

GetWorldToScreen ( float worldX, float worldY ) : Vec2

Takes the world coordinates and returns the screen coordinates.

GetWorldToScreenToOut ( Vec2 argWorld, Vec2 argScreen ) : void
GetWorldToScreenToOut ( float worldX, float worldY, Vec2 argScreen ) : void

Takes the world coordinates and puts the corresponding screen coordinates in argScreen.

SetCamera ( float x, float y, float scale ) : void

Méthodes protégées

Méthode Description
DebugDraw ( IViewportTransform viewport ) : System

Method Details

AppendFlags() public méthode

public AppendFlags ( DrawFlags flags ) : void
flags DrawFlags
Résultat void

ClearFlags() public méthode

public ClearFlags ( DrawFlags flags ) : void
flags DrawFlags
Résultat void

DebugDraw() protected méthode

protected DebugDraw ( IViewportTransform viewport ) : System
viewport IViewportTransform
Résultat System

DrawCircle() public abstract méthode

Draw a circle.
public abstract DrawCircle ( Vec2 center, float radius, Color3f color ) : void
center Box2D.Common.Vec2
radius float
color Box2D.Common.Color3f
Résultat void

DrawPoint() public abstract méthode

public abstract DrawPoint ( Vec2 argPoint, float argRadiusOnScreen, Color3f argColor ) : void
argPoint Box2D.Common.Vec2
argRadiusOnScreen float
argColor Box2D.Common.Color3f
Résultat void

DrawPolygon() public méthode

Draw a closed polygon provided in CCW order. This implementation uses {@link #drawSegment(Vec2, Vec2, Color3f)} to draw each side of the polygon.
public DrawPolygon ( Vec2 vertices, int vertexCount, Color3f color ) : void
vertices Box2D.Common.Vec2
vertexCount int
color Box2D.Common.Color3f
Résultat void

DrawSegment() public abstract méthode

Draw a line segment.
public abstract DrawSegment ( Vec2 p1, Vec2 p2, Color3f color ) : void
p1 Box2D.Common.Vec2
p2 Box2D.Common.Vec2
color Box2D.Common.Color3f
Résultat void

DrawSolidCircle() public abstract méthode

Draw a solid circle.
public abstract DrawSolidCircle ( Vec2 center, float radius, Vec2 axis, Color3f color ) : void
center Box2D.Common.Vec2
radius float
axis Box2D.Common.Vec2
color Box2D.Common.Color3f
Résultat void

DrawSolidPolygon() public abstract méthode

Draw a solid closed polygon provided in CCW order.
public abstract DrawSolidPolygon ( Vec2 vertices, int vertexCount, Color3f color ) : void
vertices Box2D.Common.Vec2
vertexCount int
color Box2D.Common.Color3f
Résultat void

DrawString() public méthode

public DrawString ( Vec2 pos, String s, Color3f color ) : void
pos Box2D.Common.Vec2
s String
color Box2D.Common.Color3f
Résultat void

DrawString() public abstract méthode

Draw a string.
public abstract DrawString ( float x, float y, String s, Color3f color ) : void
x float
y float
s String
color Box2D.Common.Color3f
Résultat void

DrawTransform() public abstract méthode

Draw a transform. Choose your own length scale
public abstract DrawTransform ( Transform xf ) : void
xf Box2D.Common.Transform
Résultat void

GetScreenToWorld() public méthode

takes the screen coordinates (argScreen) and returns the world coordinates
public GetScreenToWorld ( Vec2 argScreen ) : Vec2
argScreen Box2D.Common.Vec2
Résultat Box2D.Common.Vec2

GetScreenToWorld() public méthode

takes the screen coordinates and returns the world coordinates.
public GetScreenToWorld ( float screenX, float screenY ) : Vec2
screenX float
screenY float
Résultat Box2D.Common.Vec2

GetScreenToWorldToOut() public méthode

public GetScreenToWorldToOut ( Vec2 argScreen, Vec2 argWorld ) : void
argScreen Box2D.Common.Vec2
argWorld Box2D.Common.Vec2
Résultat void

GetScreenToWorldToOut() public méthode

takes the screen coordinates and puts the corresponding world coordinates in argWorld.
public GetScreenToWorldToOut ( float screenX, float screenY, Vec2 argWorld ) : void
screenX float
screenY float
argWorld Box2D.Common.Vec2
Résultat void

GetWorldToScreen() public méthode

takes the world coordinate (argWorld) and returns the screen coordinates.
public GetWorldToScreen ( Vec2 argWorld ) : Vec2
argWorld Box2D.Common.Vec2
Résultat Box2D.Common.Vec2

GetWorldToScreen() public méthode

Takes the world coordinates and returns the screen coordinates.
public GetWorldToScreen ( float worldX, float worldY ) : Vec2
worldX float
worldY float
Résultat Box2D.Common.Vec2

GetWorldToScreenToOut() public méthode

public GetWorldToScreenToOut ( Vec2 argWorld, Vec2 argScreen ) : void
argWorld Box2D.Common.Vec2
argScreen Box2D.Common.Vec2
Résultat void

GetWorldToScreenToOut() public méthode

Takes the world coordinates and puts the corresponding screen coordinates in argScreen.
public GetWorldToScreenToOut ( float worldX, float worldY, Vec2 argScreen ) : void
worldX float
worldY float
argScreen Box2D.Common.Vec2
Résultat void

SetCamera() public méthode

public SetCamera ( float x, float y, float scale ) : void
x float
y float
scale float
Résultat void