C# Класс 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!
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Защищенные методы

Метод Описание
DebugDraw ( IViewportTransform viewport ) : System

Описание методов

AppendFlags() публичный Метод

public AppendFlags ( DrawFlags flags ) : void
flags DrawFlags
Результат void

ClearFlags() публичный Метод

public ClearFlags ( DrawFlags flags ) : void
flags DrawFlags
Результат void

DebugDraw() защищенный Метод

protected DebugDraw ( IViewportTransform viewport ) : System
viewport IViewportTransform
Результат System

DrawCircle() публичный абстрактный Метод

Draw a circle.
public abstract DrawCircle ( Vec2 center, float radius, Color3f color ) : void
center Box2D.Common.Vec2
radius float
color Box2D.Common.Color3f
Результат void

DrawPoint() публичный абстрактный Метод

public abstract DrawPoint ( Vec2 argPoint, float argRadiusOnScreen, Color3f argColor ) : void
argPoint Box2D.Common.Vec2
argRadiusOnScreen float
argColor Box2D.Common.Color3f
Результат void

DrawPolygon() публичный Метод

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
Результат void

DrawSegment() публичный абстрактный Метод

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
Результат void

DrawSolidCircle() публичный абстрактный Метод

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
Результат void

DrawSolidPolygon() публичный абстрактный Метод

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
Результат void

DrawString() публичный Метод

public DrawString ( Vec2 pos, String s, Color3f color ) : void
pos Box2D.Common.Vec2
s String
color Box2D.Common.Color3f
Результат void

DrawString() публичный абстрактный Метод

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
Результат void

DrawTransform() публичный абстрактный Метод

Draw a transform. Choose your own length scale
public abstract DrawTransform ( Transform xf ) : void
xf Box2D.Common.Transform
Результат void

GetScreenToWorld() публичный Метод

takes the screen coordinates (argScreen) and returns the world coordinates
public GetScreenToWorld ( Vec2 argScreen ) : Vec2
argScreen Box2D.Common.Vec2
Результат Box2D.Common.Vec2

GetScreenToWorld() публичный Метод

takes the screen coordinates and returns the world coordinates.
public GetScreenToWorld ( float screenX, float screenY ) : Vec2
screenX float
screenY float
Результат Box2D.Common.Vec2

GetScreenToWorldToOut() публичный Метод

public GetScreenToWorldToOut ( Vec2 argScreen, Vec2 argWorld ) : void
argScreen Box2D.Common.Vec2
argWorld Box2D.Common.Vec2
Результат void

GetScreenToWorldToOut() публичный Метод

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
Результат void

GetWorldToScreen() публичный Метод

takes the world coordinate (argWorld) and returns the screen coordinates.
public GetWorldToScreen ( Vec2 argWorld ) : Vec2
argWorld Box2D.Common.Vec2
Результат Box2D.Common.Vec2

GetWorldToScreen() публичный Метод

Takes the world coordinates and returns the screen coordinates.
public GetWorldToScreen ( float worldX, float worldY ) : Vec2
worldX float
worldY float
Результат Box2D.Common.Vec2

GetWorldToScreenToOut() публичный Метод

public GetWorldToScreenToOut ( Vec2 argWorld, Vec2 argScreen ) : void
argWorld Box2D.Common.Vec2
argScreen Box2D.Common.Vec2
Результат void

GetWorldToScreenToOut() публичный Метод

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
Результат void

SetCamera() публичный Метод

public SetCamera ( float x, float y, float scale ) : void
x float
y float
scale float
Результат void