00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifdef __cplusplus
00024
00025 # ifndef OGS_CORE_STRENGTH_H
00026 # define OGS_CORE_STRENGTH_H
00027
00028 # include <ogs/core/Ability.h>
00029 # include <ogs/core/Namespace.h>
00030 # include <ogs/core/Size.h>
00031
00032 OGS_BEGIN_CORE_NAMESPACE
00033
00043 class Strength: public Ability {
00044 public:
00045 Strength ();
00046 Strength (Ability::Method& method);
00047
00048 float getLightLoad (Size::Type sizeType = Size::MEDIUM) const;
00049 float getMediumLoad (Size::Type sizeType = Size::MEDIUM) const;
00050 float getHeavyLoad (Size::Type sizeType = Size::MEDIUM) const;
00051
00052 private:
00053 float getMediumSizeHeavyLoad () const;
00054 static float getLoadFactor (Size::Type size);
00055 };
00056
00061 inline
00062 Strength::Strength ():
00063 Ability (Ability::STR) {
00064
00065 }
00066
00072 inline
00073 Strength::Strength (Ability::Method& method):
00074 Ability (Ability::STR, method) {
00075
00076 }
00077
00084 inline float
00085 Strength::getLightLoad (Size::Type sizeType) const {
00086 return (getHeavyLoad (sizeType) / 3);
00087 }
00088
00095 inline float
00096 Strength::getMediumLoad (Size::Type sizeType) const {
00097 return ((2 * getHeavyLoad (sizeType)) / 3);
00098 }
00099
00106 inline float
00107 Strength::getHeavyLoad (Size::Type sizeType) const {
00108 return (getMediumSizeHeavyLoad () * getLoadFactor (sizeType));
00109 }
00110
00111 OGS_END_CORE_NAMESPACE
00112
00113 # endif
00114
00115 #endif
00116