gmsh-TingyuanDoc
0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
|
Go to the documentation of this file.
15 #include "GmshConfig.h"
22 : on(false), stereoEnable(false), Lc(1.), glFnear(0.0001), glFfar(10000)
170 Lc = sqrt(1. * W * W + 1. * H * H + 1. * P * P);
216 std::cout <<
" ------------ GENERAL PARAMETERS ------------" << std::endl;
223 std::cout <<
" ------------ CAMERA PARAMETERS ------------" << std::endl;
228 std::cout <<
" up " <<
up.
x <<
"," <<
up.
y <<
"," <<
up.
z << std::endl;
234 std::cout <<
" focallength " <<
focallength << std::endl;
235 std::cout <<
" aperture " <<
aperture << std::endl;
237 std::cout <<
" eyesep " <<
eyesep << std::endl;
238 std::cout <<
" screenwidth " <<
screenwidth << std::endl;
239 std::cout <<
" screenheight " <<
screenheight << std::endl;
240 std::cout <<
" distance " <<
distance << std::endl;
241 std::cout <<
" ref_distance " <<
ref_distance << std::endl;
245 std::cout <<
" stereoEnable " <<
stereoEnable << std::endl;
246 std::cout <<
" Lc " <<
Lc << std::endl;
247 std::cout <<
" eye_sep_ratio " <<
eye_sep_ratio << std::endl;
248 std::cout <<
" closeness " <<
closeness << std::endl;
249 std::cout <<
" glFnear " <<
glFnear << std::endl;
250 std::cout <<
" glFfar " <<
glFfar << std::endl;
251 std::cout <<
" radians " <<
radians << std::endl;
252 std::cout <<
" wd2 " <<
wd2 << std::endl;
289 up = omega *
up * conj;
300 double _thetafront,
double _thetaright,
301 double _thetaup,
double _azimut,
double _elevation)
305 omega_up.
x = sin(_thetaup) *
up.
x;
306 omega_up.
y = sin(_thetaup) *
up.
y;
307 omega_up.
z = sin(_thetaup) *
up.
z;
308 omega_up.
w = cos(_thetaup);
311 omega_right.
x = sin(_thetaright) *
right.
x;
312 omega_right.
y = sin(_thetaright) *
right.
y;
313 omega_right.
z = sin(_thetaright) *
right.
z;
314 omega_right.
w = cos(_thetaright);
317 omega_front.
x = sin(_thetafront) *
front.
x;
318 omega_front.
y = sin(_thetafront) *
front.
y;
319 omega_front.
z = sin(_thetafront) *
front.
z;
320 omega_front.
w = cos(_thetafront);
323 omega = omega_up * omega_right * omega_front;
327 up = omega *
up * conj;
335 _elevation = std::min(_elevation, 1.57);
336 _elevation = std::max(_elevation, -1.57);
337 look = cos(_azimut) *
front - sin(_azimut) *
right;
338 newlook = cos(_elevation) * look + sin(_elevation) *
up;
348 return sqrt(q.
x * q.
x + q.
y * q.
y + q.
z * q.
z + q.
w * q.
w);
355 double sina = sin(acos(q.
w));
358 l = (q.
x * q.
x + q.
y * q.
y + q.
z * q.
z) / (sina * sina);
389 XYZ::XYZ(
double _x,
double _y,
double _z) : x(_x), y(_y),
z(_z) {}
391 void XYZ::set(
const double &_x,
const double &_y,
const double &_z)
462 C.
x = A.
w * B.
x + A.
x * B.
w + A.
y * B.
z - A.
z * B.
y;
463 C.
y = A.
w * B.
y - A.
x * B.
z + A.
y * B.
w + A.
z * B.
x;
464 C.
z = A.
w * B.
z + A.
x * B.
y - A.
y * B.
x + A.
z * B.
w;
465 C.
w = A.
w * B.
w - A.
x * B.
x - A.
y * B.
y - A.
z * B.
z;
XYZ operator*(const double &a, const XYZ &T)
void set(const double &_x, const double &_y, const double &_z)
Quaternion conjugate(Quaternion quat)
void zoom(double &factor)
void rotate(const Quaternion &omega, XYZ axe)
void move_and_look(double _movfront, double _movright, double _movup, double _rotfront, double _rotright, double _rotup, double _azimut, double _elevation)
Quaternion mult(const Quaternion &A, const Quaternion &B)
void moveUp(double &theta)
double length(Quaternion &q)
void moveRight(double &theta)
void giveViewportDimension(const int &W, const int &H)
void normalize(Quaternion &q)
XYZ operator-(const XYZ &L, const XYZ &R)
void normalize_axe(Quaternion &q)
XYZ operator+(const XYZ &L, const XYZ &R)