22 #include <common_features/rectf.h>
23 #include <common_features/pointf.h>
24 #include <common_features/pge_texture.h>
56 virtual double posX();
57 virtual double posY();
64 void setTop(
double tp);
66 void setBottom(
double btm);
68 void setLeft(
double lf);
70 void setRight(
double rt);
72 void setSize(
float w,
float h);
73 void setWidth(
float w);
74 void setHeight(
float h);
76 virtual void setPos(
double x,
double y);
77 void setPosX(
double x);
78 void setPosY(
double y);
79 void setCenterPos(
double x,
double y);
80 void setCenterX(
double x);
81 void setCenterY(
double y);
87 void setSpeed(
double x,
double y);
88 void setSpeedX(
double x);
89 void setSpeedY(
double y);
90 void setDecelX(
double x);
91 void applyAccel(
double x,
double y);
93 double gravityScale();
94 void setGravityScale(
double scl);
96 void setGravityAccel(
float acl);
99 void _syncPositionAndSize();
101 void renderDebug(
float _camX,
float _camY);
103 void iterateStep(
float ticks);
104 virtual void updateCollisions();
106 double colliding_xSpeed;
107 double colliding_ySpeed;
110 float collided_slope_angle_ratio;
111 bool collided_slope_celling;
112 float collided_slope_angle_ratio_celling;
121 bool isWall(QVector<PGE_Phys_Object *> &blocks);
122 bool isFloor(QVector<PGE_Phys_Object *> &blocks,
bool *isCliff=0);
124 static const float _smbxTickTime;
125 static float SMBXTicksToTime(
float ticks);
168 bool slippery_surface;
173 virtual GLdouble zIndex();
179 virtual bool isVisible();
198 virtual void update();
199 virtual void update(
float ticks);
200 virtual void render(
double x,
double y);
203 void setPaused(
bool p);
214 #endif // BASE_OBJECT_H
double posCenterX()
Centered Position X.
Definition: lvl_base_object.cpp:92
double posCenterY()
Centered Position Y.
Definition: lvl_base_object.cpp:97
Definition: pge_texture.h:32
double _width
Synchronized with R-Tree Width.
Definition: lvl_base_object.h:144
double _velocityX_prev
X speed before last itertion step (pixels per 1/65 of second)
Definition: lvl_base_object.h:135
double _velocityY_add
additional Y acceleration
Definition: lvl_base_object.h:139
double _velocityY_prev
Y speed before last itertion step (pixels per 1/65 of second)
Definition: lvl_base_object.h:136
virtual double posX()
Position X.
Definition: lvl_base_object.cpp:82
double _posY
Synchronized with R-Tree position.
Definition: lvl_base_object.h:142
float decelerate_y
Deceleration of Y velocity in each second.
Definition: lvl_base_object.h:39
double _width_half
Half of width.
Definition: lvl_base_object.h:146
double _velocityX_add
additional X acceleration
Definition: lvl_base_object.h:138
double _realWidth
Width prepared to synchronize with R-Tree.
Definition: lvl_base_object.h:149
float max_vel_x
Max allowed X velocity.
Definition: lvl_base_object.h:35
PGE_RectF posRect
Real body geometry and position.
Definition: lvl_base_object.h:128
PGE_Phys_Object_Phys phys_setup
Settings of physics.
Definition: lvl_base_object.h:127
float gravityAccel
Item gravity acceleration.
Definition: lvl_base_object.h:41
float grd_dec_x
Soft deceleration if max X speed limit exited.
Definition: lvl_base_object.h:38
float gravityScale
Item specific gravity scaling.
Definition: lvl_base_object.h:40
double _velocityY
current Y speed (pixels per 1/65 of second)
Definition: lvl_base_object.h:133
double _posX
Synchronized with R-Tree position.
Definition: lvl_base_object.h:141
double _height
Synchronized with R-Tree Height.
Definition: lvl_base_object.h:145
Definition: lvl_section.h:34
double _realHeight
Height prepared to synchronize with R-Tree.
Definition: lvl_base_object.h:150
Definition: lvl_block.h:31
float max_vel_y
Max allowed Y velocity.
Definition: lvl_base_object.h:36
virtual double posY()
Position Y.
Definition: lvl_base_object.cpp:87
double _accelX
Delta of X velocity in a second.
Definition: lvl_base_object.h:129
double _velocityX
current X speed (pixels per 1/65 of second)
Definition: lvl_base_object.h:132
float decelerate_x
Deceleration of X velocity in each second.
Definition: lvl_base_object.h:37
double _accelY
Delta of Y velocity in a second.
Definition: lvl_base_object.h:130
float min_vel_y
Min allowed Y velocity.
Definition: lvl_base_object.h:34
The PGE_Phys_Object class.
Definition: lvl_base_object.h:51
float min_vel_x
Min allowed X velocity.
Definition: lvl_base_object.h:33
double _height_half
Half of height.
Definition: lvl_base_object.h:147
Definition: lvl_base_object.h:31