16 , mPixelAspectRatio(1.0)
22 VL_DEBUG_SET_OBJECT_NAME()
66 proj.
e(2, 2) = ( - zfar - znear ) / ( zfar - znear );
67 proj.
e(2, 3) = - 2 * zfar * znear / ( zfar - znear );
78 if ( widthScale < heightScale ) {
92 printf(
"\nVL Calibration params:\n");
93 printf(
"Cxy: %.2f, %.2f\n",
mCx,
mCy);
94 printf(
"Fxy: %.2f, %.2f\n",
mFx,
mFy);
96 printf(
"Z near & far: %.2f, %.2f\n", znear, zfar);
97 printf(
"VP: %d, %d, %d, %d\n", vpx, vpy, vpw, vph);
98 printf(
"\nProjection matrix:\n");
99 double* m = proj.
ptr();
100 for(
int i=0; i<4; ++i, m += 4) {
101 printf(
"%.2f, %.2f, %.2f, %.2f\n", m[0], m[1], m[2], m[3]);
const T_Scalar & e(int i, int j) const
void set(int x, int y, int w, int h)
void setScreenSize(int width, int height)
Usually you don't need to call this as the renderer takes care of keeping it up to date with whatever...
Viewport * viewport()
The viewport bound to a camera.
Visualization Library main namespace.
void setCalibratedImageSize(int width, int height, float pixelaspect=1.0)
Set the size of the image in pixels that was used while calibrating the camera model.
void updateCalibration()
Recomputes the projection matrix and viewport based on the calibration data specified by setCalibrate...
void setProjectionMatrix(const mat4 &mat, EProjectionMatrixType proj_type)
The Camera's projection matrix.
Unknown or other projection type.
void setIntrinsicParameters(float fx, float fy, float cx, float cy)
Set the intrinsic parameters as determined from camera calibration.