Migliore precisione per debug

This commit is contained in:
2026-05-31 12:34:59 +02:00
parent 8be8a2db00
commit 57412060b5
6 changed files with 1282 additions and 589 deletions
+1 -1
View File
@@ -59,7 +59,7 @@ void PivotJoint::rotate(unsigned int id){
childs[id]->body.setPos(rb::Vector3{fPos[0]+offset[id][0]+pivot[0],fPos[1]+offset[id][1]+pivot[1],fPos[2]+offset[id][2]+pivot[2]});
//printf("Offset = %f %f %f \n" , offN[0], offN[1], offN[2]);
printf("Offset = %f %f %f \n" , offN[0], offN[1], offN[2]);
oldRot = fRot; //aggiorno la rotazione per il ciclo successivo
oldCRot[id] = cRot;
+2 -2
View File
@@ -49,7 +49,7 @@ void State::update(){
for(PieceInterface* p : pieces){
p->update(clock);
//p->update(clock);
}
for(JointInterface* j : joints){
j->movechild();
@@ -114,7 +114,7 @@ void handle(const sf::Event::MouseMoved &mouseMoved, State &gs)
if (gs.selected != -1 && gs.rot_Piece){
rb::Vector3_s tmp = gs.pieces[gs.selected]->body.getRot();
_Float16 nrot = _Float16(offset.x)/10;
_Float16 nrot = _Float16(offset.x)/100;
gs.pieces[gs.selected]->body.setRot({tmp[0]+(nrot*_Float16(py)),tmp[1]+(nrot*_Float16(px)),tmp[2]});
//printf("Rotation : %f,%f,%f \n",gs.pieces[gs.selected]->body.getRot()[0],gs.pieces[gs.selected]->body.getRot()[1],gs.pieces[gs.selected]->body.getRot()[2]);