Steerings
Class WallFollowingSteer

Package class diagram package WallFollowingSteer
java.lang.Object
  extended by Steerings.WallFollowingSteer
All Implemented Interfaces:
IRaysFlagChanged, ISteering

public class WallFollowingSteer
extends Object
implements ISteering, IRaysFlagChanged

A class for providing wall following steering to bots via raycasting.

Author:
Marki

Field Summary
protected static String NFRONT
           
protected static String NLEFT
           
protected static String NLEFTFRONT
           
protected static String NRIGHT
           
protected static String NRIGHTFRONT
           
 
Constructor Summary
WallFollowingSteer(UT2004Bot bot, RaycastingManager rayManager)
           
WallFollowingSteer(UT2004Bot bot, RaycastingManager rayManager, SteeringProperties newProperties)
           
 
Method Summary
 void flagRaysChanged()
           
 WallFollowingProperties getProperties()
           
 javax.vecmath.Vector3d run(javax.vecmath.Vector3d scaledActualVelocity, RefBoolean wantsToGoFaster, RefBoolean wantsToStop, RefLocation focus)
          When called, the bot starts steering, when possible, he walks straight, he steers away from obstacles though, when necessary.
 void setProperties(SteeringProperties newProperties)
          The steering manager will set to the steering his steering properties.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NLEFTFRONT

protected static final String NLEFTFRONT
See Also:
Constant Field Values

NLEFT

protected static final String NLEFT
See Also:
Constant Field Values

NRIGHTFRONT

protected static final String NRIGHTFRONT
See Also:
Constant Field Values

NRIGHT

protected static final String NRIGHT
See Also:
Constant Field Values

NFRONT

protected static final String NFRONT
See Also:
Constant Field Values
Constructor Detail

WallFollowingSteer

public WallFollowingSteer(UT2004Bot bot,
                          RaycastingManager rayManager,
                          SteeringProperties newProperties)
Parameters:
bot - Instance of the steered bot.
rayManager - Raycasting manager of the steered bot.
newProperties - Sets the steering properties.

WallFollowingSteer

public WallFollowingSteer(UT2004Bot bot,
                          RaycastingManager rayManager)
Parameters:
bot - Instance of the steered bot.
rayManager - Raycasting manager of the steered bot.
Method Detail

flagRaysChanged

public void flagRaysChanged()
Specified by:
flagRaysChanged in interface IRaysFlagChanged

run

public javax.vecmath.Vector3d run(javax.vecmath.Vector3d scaledActualVelocity,
                                  RefBoolean wantsToGoFaster,
                                  RefBoolean wantsToStop,
                                  RefLocation focus)
When called, the bot starts steering, when possible, he walks straight, he steers away from obstacles though, when necessary. If the isn't a wall, he goes straight forward.

Specified by:
run in interface ISteering
Parameters:
scaledActualVelocity - This is the force of the last velocity, scaled by its weight. The steering can use this vector to create the decelerating force.
wantsToGoFaster - The steering should set this ref parameter, whether is possible to enlarge the velocity (wantsToGoFaster=true), or not.
wantsToStop - If steering want's to stop the agent, he can set this ref parameter to true.
focus - If the wantsToStop is true, steering can set the focus Location, which means the orientation of the stopped agent. (Agent will rotate to this location.)
Returns:
The computed steering force.

setProperties

public void setProperties(SteeringProperties newProperties)
Description copied from interface: ISteering
The steering manager will set to the steering his steering properties. That could be set also many times.

Specified by:
setProperties in interface ISteering
Parameters:
newProperties - the new steering properties

getProperties

public WallFollowingProperties getProperties()


Copyright © 2015 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.