C# Class SharpNeat.DomainsExtra.Box2D.SimulationWorld

Abstract class for Box2D simulations/worlds within SharpNEAT.
Afficher le fichier Open project: colgreen/sharpneat Class Usage Examples

Protected Properties

Свойство Type Description
_simParams SimulationParameters
_world World

Méthodes publiques

Méthode Description
InitSimulationWorld ( ) : void

Primary initialisation method. Override this method to do sub-class specific initialisation.

MouseDown ( Vec2 p ) : void

Mouse interaction event.

MouseMove ( Vec2 p ) : void

Mouse interaction event.

MouseUp ( ) : void

Mouse interaction event.

SetDebugDraw ( DebugDraw debugDraw ) : void

Sets a drawing routine. Methods on the provided object are called-back to perform drawing on each update.

SimulationWorld ( ) : Box2DX.Collision

Construct new SimulationWorld.

Step ( ) : void

Perform one simulation timestep; move the simulation forward by the timestep increment duration.

Méthodes protégées

Méthode Description
CreateContactListener ( ) : ContactListener

Create contact listener.

InitSimulationWorld ( SimulationParameters simParams ) : void

Initialise world with the specified SimulationParameters.

PopulateWorld ( ) : void

Add objects to the Box2d world.

Private Methods

Méthode Description
CreateBox2DWorld ( ) : World

Create an empty Box2D world.

DrawMouseJoint ( ) : void

Draw the mouse joint (user interaction via mouse events). This method can be removed to remove the dependency on OpenGL.

Method Details

CreateContactListener() protected méthode

Create contact listener.
protected CreateContactListener ( ) : ContactListener
Résultat Box2DX.Dynamics.ContactListener

InitSimulationWorld() public méthode

Primary initialisation method. Override this method to do sub-class specific initialisation.
public InitSimulationWorld ( ) : void
Résultat void

InitSimulationWorld() protected méthode

Initialise world with the specified SimulationParameters.
protected InitSimulationWorld ( SimulationParameters simParams ) : void
simParams SimulationParameters
Résultat void

MouseDown() public méthode

Mouse interaction event.
public MouseDown ( Vec2 p ) : void
p Vec2
Résultat void

MouseMove() public méthode

Mouse interaction event.
public MouseMove ( Vec2 p ) : void
p Vec2
Résultat void

MouseUp() public méthode

Mouse interaction event.
public MouseUp ( ) : void
Résultat void

PopulateWorld() protected abstract méthode

Add objects to the Box2d world.
protected abstract PopulateWorld ( ) : void
Résultat void

SetDebugDraw() public méthode

Sets a drawing routine. Methods on the provided object are called-back to perform drawing on each update.
public SetDebugDraw ( DebugDraw debugDraw ) : void
debugDraw DebugDraw
Résultat void

SimulationWorld() public méthode

Construct new SimulationWorld.
public SimulationWorld ( ) : Box2DX.Collision
Résultat Box2DX.Collision

Step() public méthode

Perform one simulation timestep; move the simulation forward by the timestep increment duration.
public Step ( ) : void
Résultat void

Property Details

_simParams protected_oe property

High level simulation parameters.
protected SimulationParameters _simParams
Résultat SimulationParameters

_world protected_oe property

The Box2D world.
protected World _world
Résultat World