de.steeringbehaviors.simulation.simulationobjects
Class Obstacle

java.lang.Object
  extended by de.steeringbehaviors.simulation.renderer.Geometrie
      extended by de.steeringbehaviors.simulation.simulationobjects.Obstacle
All Implemented Interfaces:
ObjectAttributes

public class Obstacle
extends Geometrie

class Obstacle Implements the base class for obstacle objects


Field Summary
protected  java.util.Vector m_behaviors
          Array of behaviours
protected  boolean m_collide
          Collsion detection status
protected  java.awt.Color m_color
          Color of the obstacle
protected  double m_rForce
          Repelling force
protected  boolean m_visible
          Visibility status
 
Fields inherited from class de.steeringbehaviors.simulation.renderer.Geometrie
m_boundingbox, m_localx, m_localy, m_mind, m_objectName, m_pos, m_radius, m_scaleX, m_scaleY, m_shapes
 
Constructor Summary
Obstacle()
          Constructor
Obstacle(java.lang.String objectName, double posX, double posY, double radius, double bminX, double bminY, double bmaxX, double bmaxY)
          Constructor
 
Method Summary
 boolean getCollide()
          Returns collsion detection status
 java.lang.String getName()
          Returns the type of the object
 double getRepellForce()
          Returns the repelling force
 boolean getVisible()
          Returns visibility status
 void setAttribute(java.lang.String name, java.lang.String value, java.util.Hashtable objectList)
          Sets a attribute specified by the name
 void setBehaviors(java.util.Vector behaviors)
          Sets the behaviours stored in the obstacle
 void setCollide(boolean collide)
          Turns collision detection on / off
 void setColor(java.awt.Color c)
          Sets the color of the object
 void setRepellForce(double rForce)
          Sets the repelling force of the object
 void setVisible(boolean visible)
          Sets the visibility of the object
 
Methods inherited from class de.steeringbehaviors.simulation.renderer.Geometrie
addShape, getBoundingBox, getLocalX, getLocalY, getMind, getObjectName, getPoints, getPos, getRadius, getScaleX, getScaleY, getShapeIter, localToWorld, localToWorld, moveCenter, onCollide, setLocalx, setMind, setObjectName, setPos, setRadius, setScaleX, setScaleY, updateBoundingRadius, worldToLocal, worldToLocal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_visible

protected boolean m_visible
Visibility status


m_collide

protected boolean m_collide
Collsion detection status


m_rForce

protected double m_rForce
Repelling force


m_behaviors

protected java.util.Vector m_behaviors
Array of behaviours


m_color

protected java.awt.Color m_color
Color of the obstacle

Constructor Detail

Obstacle

public Obstacle()
Constructor


Obstacle

public Obstacle(java.lang.String objectName,
                double posX,
                double posY,
                double radius,
                double bminX,
                double bminY,
                double bmaxX,
                double bmaxY)
Constructor

Parameters:
objectName - Name of the obstacle
posX - x position of the obstacle
posY - Y position of the obstacle
radius - Radius of the obstacle
bminX - Minimum x position of the boundingbox (local coordinates)
bminY - Minimum y position of the boundingbox (local coordinates)
bmaxX - Maximum x position of the boundingbox (local coordinates)
bmaxY - Maximum y position of the boundingbox (local coordinates)
Method Detail

setVisible

public void setVisible(boolean visible)
Sets the visibility of the object

Overrides:
setVisible in class Geometrie
Parameters:
visible - True / False

setCollide

public void setCollide(boolean collide)
Turns collision detection on / off

Parameters:
collide - True / False

setColor

public void setColor(java.awt.Color c)
Sets the color of the object

Parameters:
c - Color of the object

setRepellForce

public void setRepellForce(double rForce)
Sets the repelling force of the object

Parameters:
rForce - Repelling force

setBehaviors

public void setBehaviors(java.util.Vector behaviors)
Sets the behaviours stored in the obstacle

Parameters:
behaviors - Array of behaviours

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.String value,
                         java.util.Hashtable objectList)
Sets a attribute specified by the name

Specified by:
setAttribute in interface ObjectAttributes
Overrides:
setAttribute in class Geometrie
Parameters:
name - name of the attribute
value - value of the attribute

getCollide

public boolean getCollide()
Returns collsion detection status

Returns:
Collision status

getName

public java.lang.String getName()
Returns the type of the object

Returns:
Type of the object

getRepellForce

public double getRepellForce()
Returns the repelling force

Returns:
The repelling force

getVisible

public boolean getVisible()
Returns visibility status

Overrides:
getVisible in class Geometrie
Returns:
Visibility status