Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class rigidBody3D {
- public:
- void setPosition(float x, float y, float z);
- rigidBody* rb;
- };
- class box3D : public rigidBody3D {
- public:
- box3D(float w float h, float l);
- ..other box functions..
- };
- class rigidBody2D {
- public:
- rigidBody2D();
- void setPosition(float x, float y);
- rigidBody3D body;
- };
- class box2D : public rigidBody2D {
- public:
- box2D(float w, float h);
- box3D box;
- };
- void rigidBody2D::setPosition(float x, float y)
- {
- body.setPosition(x,y,0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement