#include #include "Irr2DLibObj.h" using namespace std; using namespace irr; using namespace core; using namespace scene; using namespace video; using namespace io; using namespace gui; Irr2DLibObj::~Irr2DLibObj() { //NewtonReleaseCollision(IrrPhysics::nworld, this->nwtn_collision); } float Irr2DLibObj::getX() { return this->x; } float Irr2DLibObj::getY() { return this->y; } void Irr2DLibObj::setX(float cord) { this->x = cord; } void Irr2DLibObj::setY(float cord) { this->y = cord; } void createObject() { //NewtonCreateBox(IrrPhysics::nworld, } irr::core::vector3d Irr2DLibObj::getPosition() { //this->nwtn_collision = //int rl = this->getLength() / 2; //int rh = this->getHeight() / 2; //this->pos.set(this->x-rl, this->y-rh, 0); float rx = this->x + (this->getLength() / 2); float ry = this->y + (this->getHeight() / 2); this->pos.set(rx, ry, 0); //this->pos.set(this->x, this->y, 0); return pos; } NewtonCollision* Irr2DLibObj::getNewtonCollision() { return this->nwtn_collision; } s32 Irr2DLibObj::getHeight() { return this->height; } s32 Irr2DLibObj::getLength() { return this->length; } void Irr2DLibObj::setHeight(s32 h) { this->height = h; } void Irr2DLibObj::setLength(s32 l) { this->length = l; }