This commit is contained in:
iutbgdin 2025-10-10 15:32:57 +02:00
parent c00ccdaf9c
commit b38a84b51d
18 changed files with 156 additions and 70 deletions

View file

@ -9,13 +9,13 @@ Point::Point(std::string& txt) {
this->xyz.push_back(new float(std::stof(txt.substr(0, pos))));
txt.erase(0, pos + 1);
}
std::cout << txt << std::endl;
this->xyz.push_back(new float(std::stof(txt)));
}
if (this->xyz.size() != 3) {
this->xyz = {new float(0), new float(0), new float(0)};
}
}
uint16_t Point::translate3D() { return 0; }
@ -25,6 +25,6 @@ float Point::getY() { return (*this->xyz.at(1)); }
float Point::getZ() { return (*this->xyz.at(2)); }
std::ostream & operator<<(std::ostream& os, Point& p){
os << " - Point " << &p << "\n - X: " << p.getX() << "\n - Y: "<< p.getY() << "\n - Z: "<< p.getZ() << std::endl;
os << " - *Point " << &p << "*: *X*: " << p.getX() << ", *Y*: "<< p.getY() << ", *Z*: "<< p.getZ() << std::endl;
return os;
}