[Orxonox-commit 4650] r9321 - code/branches/presentation2012merge/src/modules/pickup/items
landauf at orxonox.net
landauf at orxonox.net
Sat Jul 21 18:16:20 CEST 2012
Author: landauf
Date: 2012-07-21 18:16:19 +0200 (Sat, 21 Jul 2012)
New Revision: 9321
Modified:
code/branches/presentation2012merge/src/modules/pickup/items/ShrinkPickup.cc
code/branches/presentation2012merge/src/modules/pickup/items/ShrinkPickup.h
Log:
detail: moved functions from .h to .cc
Modified: code/branches/presentation2012merge/src/modules/pickup/items/ShrinkPickup.cc
===================================================================
--- code/branches/presentation2012merge/src/modules/pickup/items/ShrinkPickup.cc 2012-07-21 13:51:06 UTC (rev 9320)
+++ code/branches/presentation2012merge/src/modules/pickup/items/ShrinkPickup.cc 2012-07-21 16:16:19 UTC (rev 9321)
@@ -93,6 +93,48 @@
}
/**
+ @brief Sets the shrinking factor.
+ @param factor The factor, needs to greater than 1.
+ */
+ void ShrinkPickup::setShrinkFactor(float factor)
+ {
+ if(factor <= 1.0f)
+ {
+ orxout(internal_warning, context::pickups) << "Invalid shrinking factor in ShrinkPickup. Ignoring.." << endl;
+ return;
+ }
+ this->shrinkFactor_ = factor;
+ }
+
+ /**
+ @brief Set the duration for which the ship remains shrunken.
+ @param duration The duration, needs to be non-negative.
+ */
+ void ShrinkPickup::setDuration(float duration)
+ {
+ if(duration < 0.0f)
+ {
+ orxout(internal_warning, context::pickups) << "Invalid duration in ShrinkPickup. Ignoring.." << endl;
+ return;
+ }
+ this->duration_ = duration;
+ }
+
+ /**
+ @brief Set the shrink duration.
+ @param speed The shrink duration, needs to be positive.
+ */
+ void ShrinkPickup::setShrinkDuration(float speed)
+ {
+ if(speed <= 0.0f)
+ {
+ orxout(internal_warning, context::pickups) << "Invalid shrink duration in ShrinkPickup. Ignoring.." << endl;
+ return;
+ }
+ this->shrinkDuration_ = speed;
+ }
+
+ /**
@brief
Prepares for shrinking.
*/
Modified: code/branches/presentation2012merge/src/modules/pickup/items/ShrinkPickup.h
===================================================================
--- code/branches/presentation2012merge/src/modules/pickup/items/ShrinkPickup.h 2012-07-21 13:51:06 UTC (rev 9320)
+++ code/branches/presentation2012merge/src/modules/pickup/items/ShrinkPickup.h 2012-07-21 16:16:19 UTC (rev 9321)
@@ -86,36 +86,23 @@
*/
inline float getShrinkFactor(void) const
{ return this->shrinkFactor_; }
+ void setShrinkFactor(float factor);
+
/**
- @brief Sets the shrinking factor.
- @param factor The factor, needs to greater than 1.
- */
- inline void setShrinkFactor(float factor)
- { if(factor <= 1.0f) { orxout(internal_warning, context::pickups) << "Invalid shrinking factor in ShrinkPickup. Ignoring.." << endl; return; } this->shrinkFactor_ = factor; }
- /**
@brief Get the duration for which the ship remains shrunken.
@return Returns the duration.
*/
inline float getDuration(void) const
{ return this->duration_; }
+ void setDuration(float duration);
+
/**
- @brief Set the duration for which the ship remains shrunken.
- @param duration The duration, needs to be non-negative.
- */
- inline void setDuration(float duration)
- { if(duration < 0.0f) { orxout(internal_warning, context::pickups) << "Invalid duration in ShrinkPickup. Ignoring.." << endl; return; } this->duration_ = duration; }
- /**
@brief Get the shrink speed.
@return Returns the shrink speed.
*/
inline float getShrinkDuration(void) const
{ return this->shrinkDuration_; }
- /**
- @brief Set the shrink duration.
- @param speed The shrink duration, needs to be positive.
- */
- inline void setShrinkDuration(float speed)
- { if(speed <= 0.0f) { orxout(internal_warning, context::pickups) << "Invalid shrink duration in ShrinkPickup. Ignoring.." << endl; return; } this->shrinkDuration_ = speed; }
+ void setShrinkDuration(float speed);
private:
void initialize(void);
More information about the Orxonox-commit
mailing list