I work on SIO2 and write this source code:
1
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
newobj = sio2ObjectDuplicate(fo , object->_SIO2transform, "name", 1);
float c = 2; angelA = 90 * ( sio2->_SIO2camera->_SIO2transform->dir->x); cath1 = cos( angelA/SIO2_RAD_TO_DEG )*c; cath2 = sqrtf(c*c - cath1*cath1); if(sio2->_SIO2camera->_SIO2transform->dir->x > 0) newobj->_SIO2transform->loc->x += fabs( cath2 ); if(sio2->_SIO2camera->_SIO2transform->dir->x < 0) newobj->_SIO2transform->loc->x -= fabs( cath2 ); if(sio2->_SIO2camera->_SIO2transform->dir->y > 0) newobj->_SIO2transform->loc->y += fabs( cath1 ); else if(sio2->_SIO2camera->_SIO2transform->dir->y < 0) newobj->_SIO2transform->loc->y -= fabs( cath1 ); |
I use Тригонометрические_функции and many others information …
but this code is not perfect !!!
Continue reading