cad.simcad.worldsimulator.stats
Class StatComputer

java.lang.Object
  |
  +--cad.simcad.worldsimulator.stats.StatComputer
All Implemented Interfaces:
java.io.Serializable, StatServer

public class StatComputer
extends java.lang.Object
implements StatServer

This class deal witht the dispatching of statistics As of version 1.0, the dispatcher of stat is poorly made. We just quickly needed something up and running. In the future we will have to improve the way the Object statistics are stored

Version:
1.0
Author:
Charles-Philip Bentley
See Also:
Serialized Form

Constructor Summary
StatComputer()
          Creates new MoveModifierComputer
 
Method Summary
 double getDeformStat(SimObject so, Genomable g)
          Get the deform stat according to the id and the Genomable object
 int getHeight(SimObject so, Genomable g)
          Return the height of the SimObject
 int getHeight(java.lang.String className, Genomable g)
          Return the height of the SimObject
 double getMaxSteepNessRatio(SimObject so, Filler fil, Genomable g)
          Return the maximum steepnessRatio the PathUser can walk on the filler given in argument
 double getMaxSteepNessRatio(SimObject so, Genomable g)
          Return the maximum steepnessRatio the SimObject can walk on
 double getMoveStat(PathUser pu, Filler tt, double steepnessRatio)
          Return the MoveStat for a PathUser and a Filler.
 int getWidth(SimObject so, Genomable g)
          Return the width of the SimObject
 int getWidth(java.lang.String className, Genomable g)
          Return the width of the SimObject given by the name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatComputer

public StatComputer()
Creates new MoveModifierComputer

Method Detail

getMoveStat

public double getMoveStat(PathUser pu,
                          Filler tt,
                          double steepnessRatio)
Description copied from interface: StatServer
Return the MoveStat for a PathUser and a Filler. The steepnessRatio indicates the slope

Specified by:
getMoveStat in interface StatServer
Parameters:
pu - PathUser
tt - A filler
steepnessRatio - -1 <= steepnessRatio <= 1
Returns:
a double value
Post:
return Postition infinity is The PathUser maxSteepNessRatio is equal or superior to the double value passed in parameter.

getMaxSteepNessRatio

public double getMaxSteepNessRatio(SimObject so,
                                   Genomable g)
Description copied from interface: StatServer
Return the maximum steepnessRatio the SimObject can walk on

Specified by:
getMaxSteepNessRatio in interface StatServer
Parameters:
so - A SimObject
g - A Genomable
Returns:
A Double Value

getMaxSteepNessRatio

public double getMaxSteepNessRatio(SimObject so,
                                   Filler fil,
                                   Genomable g)
Description copied from interface: StatServer
Return the maximum steepnessRatio the PathUser can walk on the filler given in argument

Specified by:
getMaxSteepNessRatio in interface StatServer
Parameters:
fil - a Filler
so - A SimObject
g - A Genomable
Returns:
A Double Value

getDeformStat

public double getDeformStat(SimObject so,
                            Genomable g)
Description copied from interface: StatServer
Get the deform stat according to the id and the Genomable object

Specified by:
getDeformStat in interface StatServer
Parameters:
g - A Genomable Object
Returns:
the double value

getWidth

public int getWidth(SimObject so,
                    Genomable g)
Description copied from interface: StatServer
Return the width of the SimObject

Specified by:
getWidth in interface StatServer
Parameters:
so - A SimObject
g - A Genomable
Returns:
an integer value

getHeight

public int getHeight(SimObject so,
                     Genomable g)
Description copied from interface: StatServer
Return the height of the SimObject

Specified by:
getHeight in interface StatServer
Parameters:
so - A SimObject
g - A Genomable object
Returns:
an integer value

getHeight

public int getHeight(java.lang.String className,
                     Genomable g)
Return the height of the SimObject

Specified by:
getHeight in interface StatServer
Parameters:
g - A Genomable object
Returns:
an integer value

getWidth

public int getWidth(java.lang.String className,
                    Genomable g)
Return the width of the SimObject given by the name

Specified by:
getWidth in interface StatServer
Parameters:
g - A Genomable
Returns:
an integer value

Logo

With the help of www.sourceforge.net and www.info.ucl.ac.be