#include using namespace std; #include "NodoQuad.h" string nodoQuad::strStatus[] = { "RED ", "GREEN ", "BLUE ", "GRAY ", "WHITE " }; nodoQuad::nodoQuad(int x1, int y1, int x2, int y2, int status) { this->x1 = x1; this->y1 = y1; this->x2 = x2; this->y2 = y2; this->status = status; for(int i=0; i<4; i++) filhos[i] = NULL; } void nodoQuad::setColor(unsigned char r, unsigned char g, unsigned char b) { // neste versao estes atributos nõa são usados. } void nodoQuad::getColor(unsigned char &r, unsigned char &g, unsigned char &b) { // neste versao estes atributos nõa são usados. } nodoQuad* nodoQuad::getFilho(int n) { return filhos[n]; } void nodoQuad::setFilho(int n, nodoQuad *nodo ) { filhos[n] = nodo; } void nodoQuad::DrawBox(ImageClass *I) { I->DrawLineH(y1, x1, x2, 100,100,100); I->DrawLineH(y2, x1, x2, 100,100,100); I->DrawLineV(x1, y1, y2, 100,100,100); I->DrawLineV(x2, y1, y2, 100,100,100); } int nodoQuad::getStatus() { return status; } string nodoQuad::getStringStatus() { return strStatus[status]; } void nodoQuad::Imprime() { cout << "(" ; cout << x1 << "," ; cout << y1 << "-" ; cout << x2 << "," ; cout << y2; cout << ")" ; cout << " Status: " << strStatus[status] << endl; }