AI for Games 1.1.1
Loading...
Searching...
No Matches
game2dai.entityshapes.ps.Hints Class Reference

Static Public Member Functions

static void draw (PApplet app, BaseEntity owner, float velX, float velY, float headX, float headY)
 

Static Public Attributes

static final int HINT_HEADING = 0x00000001
 
static final int HINT_VELOCITY = 0x00000002
 
static final int HINT_COLLISION = 0x00000004
 
static final int HINT_WHISKERS = 0x00000008
 
static final int HINT_OBS_AVOID = 0x00000010
 
static final int HINT_WANDER = 0x00000020
 
static final int HINT_VIEW = 0x00000040
 
static final int HINT_NONE = 0x00000000
 
static final int HINT_ALL = 0x0000FFFF
 
static final Vector2D ZERO_VECTOR = new Vector2D()
 
static final Vector2D FORWARD_VECTOR = new Vector2D(1,0)
 
static int hintFlags = 0
 

Static Private Member Functions

static void drawView (PApplet app, MovingEntity v)
 
static void drawDetectionBox (PApplet app, double detectBoxLength, double speed, double maxSpeed, float colrad)
 
static void drawWhiskers (PApplet app, AutoPilot ap)
 
static void drawCollision (PApplet app, Vector2D vel, float colrad)
 
static void drawVelocity (PApplet app, Vector2D vel, Vector2D head, float colrad)
 
static void drawHeading (PApplet app, float colrad)
 
static void drawWanderBits (PApplet app, AutoPilot ap)
 

Detailed Description

Draw the steering behaviour hints for a particular entity (usually either MovingEntity or Vehicle entity).

Hints available are
HINT_HEADING the direction the entity is facing
HINT_VELOCITY the velocity vector
HINT_COLLISION the collision radius
HINT_WHISKERS the feelers used in wall avoidance
HINT_OBS_AVOID the detection box used in obstacle avoidance
HINT_WANDER the wander direction and circle
HINT_VIEW the area that can be seen by the entity

When setting the hints to be shown they can be or'ed together e.g. Hints.HINT_HEADING | hints.HINT_VELOCITY

Author
Peter Lager

Member Function Documentation

◆ draw()

static void game2dai.entityshapes.ps.Hints.draw ( PApplet  app,
BaseEntity  owner,
float  velX,
float  velY,
float  headX,
float  headY 
)
static

This is the only method available and should be called from the renderer object.

Parameters
app
owner
velX
velY
headX
headY

The documentation for this class was generated from the following file: