91 const double VelX()
const {
return mVel.
X; }
94 const double VelY()
const {
return mVel.
Y; }
123 void Move(
double delta_time );
136 mSquareSpeed = mVel.
X*mVel.
X + mVel.
Y*mVel.
Y;
137 mSpeed = sqrt(mSquareSpeed);
145 mutable double mSquareSpeed;
146 mutable double mSpeed;
147 mutable bool mSpeedChanged;
void InvertVelX()
Invert the velocity component along the X axis.
Definition: DynObj.h:97
void SetVelY(double y)
Set the velocity along the Y axis.
Definition: DynObj.h:77
const double VelY() const
Get the velocity component along the Y axis.
Definition: DynObj.h:94
void SetVel(double x, double y)
Set the velocity along the axes.
Definition: DynObj.h:62
const double Speed() const
Get the speed (recalculate it if needed)
Definition: DynObj.h:103
const double SquareSpeed() const
Get the square speed (recalculate it if needed)
Definition: DynObj.h:110
void SetVelX(double x)
Set the velocity along the X axis.
Definition: DynObj.h:70
Vector with two (double precision) coordinate values.
Definition: VecXy.h:59
A box-shaped object.
Definition: BoxObj.h:51
const VecXy & PrevPos() const
Definition: DynObj.h:118
const VecXy & Vel() const
Get the velocity vector.
Definition: DynObj.h:84
const double VelX() const
Get the velocity component along the X axis.
Definition: DynObj.h:91
double Y
Vertical coordinate.
Definition: VecXy.h:62
double X
Horizontal coordinate.
Definition: VecXy.h:61
void Stop()
Stop: reset the velocity.
Definition: DynObj.h:126
void UpdateSpeed() const
Update the scala speed values based on the velocity.
Definition: DynObj.h:134
DynObj()
Default constructor.
void InvertVelY()
Invert the velocity component along the Y axis.
Definition: DynObj.h:100
void Move(double delta_time)
Move according to the velocity.
Dynamic object with velocity control.
Definition: DynObj.h:52