com.speckled.specksim
Class WallManager

java.lang.Object
  extended by com.speckled.specksim.WallManager
All Implemented Interfaces:
Configurable

public class WallManager
extends java.lang.Object
implements Configurable

Manages the loading and manipulation of WallProviders

Author:
ryanm

Method Summary
 boolean blockedByWall(Point3d position, Point3d position2, MessageShell shell)
          Performs a brute-force search to see if the supplied line segment intersects a wall
 Configurator getConfigurator()
          Gets a Configurator object that describes and can manipulate the variables of this Configurable.
 Wall[] getWalls()
          Gets the current crop of walls
 void notifyListeners()
          Call this method in order to notify listeners that the walls have changed
static boolean register(java.lang.String className)
          Call this method to register a WallProvider implementation class
 void setProvider(java.lang.String name)
          Sets the current WallProvider.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

blockedByWall

public boolean blockedByWall(Point3d position,
                             Point3d position2,
                             MessageShell shell)
Performs a brute-force search to see if the supplied line segment intersects a wall

Parameters:
position - The startpoint of the line segment
position2 - The endpoint of the line segment
shell - The shell used in the transmission
Returns:
true if the line segment intersects a wall, false otherwise

getWalls

public Wall[] getWalls()
Gets the current crop of walls

Returns:
An array of Wall objects

notifyListeners

public void notifyListeners()
Call this method in order to notify listeners that the walls have changed


register

public static boolean register(java.lang.String className)
Call this method to register a WallProvider implementation class

Parameters:
className - The name of the implemented WallProvider
Returns:
true if the registration was successful, false otherwise

getConfigurator

public Configurator getConfigurator()
Description copied from interface: Configurable
Gets a Configurator object that describes and can manipulate the variables of this Configurable. This method must only return null if the Configurable object is Annotated such that an AnnotatedConfigurator can be built from it.

Specified by:
getConfigurator in interface Configurable
Returns:
A configurator object, or null if annotated

setProvider

public void setProvider(java.lang.String name)
Sets the current WallProvider. The provider must have been previously registered.

Parameters:
name - The name of the desired WallProvider