|
| Parametric_camera_gl_interface (double inear=10, double ifar=10000) |
|
| Parametric_camera_gl_interface (const Parametric_camera_gl_interface &) |
|
virtual
Parametric_camera_gl_interface & | operator= (const Parametric_camera_gl_interface &src) |
|
virtual
Parametric_camera_gl_interface * | clone () const |
|
virtual | ~Parametric_camera_gl_interface () |
|
virtual void | swap (Self &other) |
|
void | set_focal_length (double focal_length, double skew, double aspect_ratio) |
| sets the focal length More...
|
|
void | set_aspect_ratio (double aspect_ratio, double focal_length, double skew) |
| sets the aspect ratio More...
|
|
void | set_skew (double skew, double aspect_ratio, double focal_length) |
| sets the skew More...
|
|
void | set_principal_point_x (double px) |
| sets the x coordinate of the principal point More...
|
|
void | set_principal_point_y (double py) |
| sets the y coordinate of the principal point More...
|
|
void | set_principal_point (double px, double py) |
| sets both coordinates of the principal point More...
|
|
void | set_focal_no_skew (double focal_length, double aspect_ratio) |
| sets the focal length assuming no skew More...
|
|
void | set_focal_no_aspect_ratio (double focal_length, double skew) |
| sets the focal length assuming aspect_ratio=1 More...
|
|
void | set_focal_no_aspect_ratio_no_skew (double focal_length) |
| sets the focal length assuming aspect_ratio=1 and no skew More...
|
|
void | set_intrinsic_parameters (double focal_length, double aspect_ratio, double skew, double px, double py) |
| sets all the intrinsic parameters of the camera More...
|
|
void | set_camera_center (const kjb::Vector ¢er) |
| Sets the position of the camera center. More...
|
|
void | set_world_origin (const kjb::Vector ¢er) |
| Sets the world origin in camera coordinates (the "t" vector in Forsyth) More...
|
|
void | set_world_scale (double xscale, double yscale, double zscale) |
| Sets the world scale along the three major axes using glScaled. More...
|
|
void | set_rotation_angles (double pitch, double yaw, double roll) |
| Sets the rotation angles of this camera. More...
|
|
void | transform_point_to_camera_frame (kjb::Vector &point) const |
| Transform a point from the world coordinate system to the camera coordinate system. More...
|
|
void | rotate_point_to_camera_frame (kjb::Vector &point) const |
| Rotates a point from the world coordinate system to the camera coordinate system. More...
|
|
void | get_point_in_world_coordinates (const kjb::Vector &point_in_camera_coordinates, kjb::Vector &point_in_world_coordinates) const |
| Transforms a point in camera coordinates to world coordinates. More...
|
|
bool | Polygon_visibility_test (const kjb::Polygon &p, double epsilon=0) const |
|
bool | is_point_in_camera_frustum (const kjb::Vector &point_in_world_coordinates, double &ox, double &oy, unsigned int num_rows, unsigned int num_cols) const |
| Given a point in world coordinates, it returns true if the point is in the viewing frustum, false otherwise. More...
|
|
| Base_gl_interface (double inear=10, double ifar=10000) |
|
| Base_gl_interface (const Base_gl_interface &) |
| bgl the Base_gl_interface to copy into this one More...
|
|
virtual Base_gl_interface & | operator= (const Base_gl_interface &src) |
| bgl the Base_gl_interface to assign to this one More...
|
|
virtual | ~Base_gl_interface () |
|
virtual void | set_gl_modelview () const |
| Sets the gl modelview matrix based on the current camera parameters. More...
|
|
virtual void | set_gl_projection () const |
| Sets the gl projection matrix based on the current camera parameters. More...
|
|
virtual void | mult_gl_projection () const |
| Multiplies the current gl projection matrix with this camera's matrix. More...
|
|
void | prepare_for_rendering (bool clean_buffers) const |
| Prepares the opengl for rendering by setting the gl modelview and projection matrix based on the current camera parameters It also clears the depth and the color buffers, and sets the background color to black. More...
|
|
void | set_near_clipping_plane (double inear) |
| sets the near clipping plane distance from the camera More...
|
|
void | set_far_clipping_plane (double ifar) |
| sets the far clipping plane distance from the camera More...
|
|
void | set_clipping_planes (double inear, double ifar) |
| sets the near and far clipping plane distances from the camera More...
|
|
double | get_near () const |
| gets the near clipping plane distance from the camera More...
|
|
double | get_far () const |
| gets the far clipping plane distance from the camera More...
|
|
const Matrix & | get_modelview_matrix () const |
| returns the gl modelview matrix More...
|
|
const Matrix & | get_projection_matrix () const |
| returns the projection matrix; note: this needs to be preceeded by a glOrtho call with the window dimensions before sending this to opengl. More...
|
|
Matrix | get_gl_projection_matrix () const |
| returns the exact matrix that opengl uses for its projection matrix. this is effectively glOrtho(-vp_width/2, vp_width/2, -vp_height/2, vp_height/2, znear, zfar), followed by glMultMatrix(get_projection_matrix(). Note that if the viewport size changes, you'll likely need to re-call this, or understand that the pixels sizes will change. More...
|
|
void | project_point (double &x, double &y, double &z, const kjb::Vector &point3D, double img_height) const |
|
void | set_modelview_entry (unsigned int row, unsigned int col, double value) |
| sets an entry of the modelview matrix More...
|
|
void | set_projection_entry (unsigned int row, unsigned int col, double value) |
| sets an entry of the projection matrix More...
|
|
double & | get_modelview_entry (unsigned int row, unsigned int col) |
| returns an entry of the modelview matrix More...
|
|
double | get_modelview_entry (unsigned int row, unsigned int col) const |
| returns an entry of the modelview matrix More...
|
|
double & | get_projection_entry (unsigned int row, unsigned int col) |
| returns an entry of the projection matrix More...
|
|
double | get_projection_entry (unsigned int row, unsigned int col) const |
| returns an entry of the projection matrix More...
|
|
| Rigid_object () |
|
| Rigid_object (const Rigid_object &ro) |
|
virtual Rigid_object & | operator= (const Rigid_object &src) |
|
virtual | ~Rigid_object () |
|
virtual void | swap (Self &other) |
|
virtual void | rotate (double dpitch, double dyaw, double droll) |
| rotate this object around its x-axis by dpitch, the y-axis by dyaw, and its z-axis by droll (in this order, starting from the object's current position) More...
|
|
virtual void | compute_new_euler_angles_on_rotations (double dpitch, double dyaw, double droll, kjb::Vector &angles) const |
| computes the new values for the object's euler angles, after a rotation of dpitch around the object's x-axis, a rotation of dyaw around the object's y axis, and a rotation of droll around the object's z axis (in this order, starting from the object's current position). The state of this rigid object is not changed More...
|
|
virtual void | set_rotations (double pitch, double yaw, double roll) |
| rotate this object so that its pitch, yaw and roll match the input values More...
|
|
const Matrix & | get_rotations () const |
| Returns the current transformation matrix, that is used to store the rotation to be applied to the object. More...
|
|
const Vector & | get_euler_angles () const |
| returns vector [pitch, yaw, roll] More...
|
|
void | set_rotation_mode (kjb::Quaternion::Euler_mode imode) |
|
const kjb::Quaternion & | get_orientation () const |
| returns the quaternion defining this object's orientation More...
|
|
void | set_orientation (const Quaternion &orientation) |
| sets the orientation of this object from an input quaternion More...
|
|
virtual | ~Transformable () |
| Deletes this Transformable. More...
|
|
virtual | ~Transformable () |
| Deletes this Transformable_d. More...
|
|
virtual | ~Cloneable () |
| Deletes this Cloneable. More...
|
|
|
static double | get_gl_viewport_aspect () |
| returns the ratio between the gl viewport width and the gl viewport height More...
|
|
static double | get_gl_viewport_width () |
| returns the gl viewport width More...
|
|
static double | get_gl_viewport_height () |
| returns the gl viewport height More...
|
|
static void | get_gl_viewport_size (double *w, double *h) |
| gets the gl viewport width and height More...
|
|
static void | get_gl_viewport (double *x, double *y, double *w, double *h) |
| gets all the g; viewport parameters (x,y,width,height) More...
|
|
static void | set_gl_viewport_size (double, double) |
| sets the gl viewport size More...
|
|
static void | set_gl_viewport (double x, double y, double w, double h) |
| sets all the gl viewport parameters (x,y,width,length) More...
|
|
static void | capture_gl_view (kjb_c::KJB_image **img_out) |
| captures the gl view and stores it into a KJB_image More...
|
|
static void | capture_gl_view (const char *fname) |
| captures the gl view and saves into a file More...
|
|
static void | capture_gl_view (const char *fname_fmt, uint32_t N) |
| captures the gl view and saves into a file, by appending N to the filename More...
|
|
static void | capture_gl_view (kjb::Int_matrix &matrix) |
| captures the gl view and stores it into a Int_matrix. The four bytes used by GL to represent the four channels (R,G,B,A) are packaged into a single integer. More...
|
|
static void | capture_gl_view (Image &img_out) |
| captures the gl view and stores it into a c++ image More...
|
|
static void | set_gl_view (const kjb::Image &img_in) |
|
static void | construct_image_from_int_matrix (kjb::Image &im, kjb::Int_matrix &m) |
|
| Base_gl_interface (const Matrix &, const Matrix &, double near, double far) |
| constructs a Base_gl_interface from a modelview and a projection matrix More...
|
|
void | set_modelview_matrix (const Matrix &mv) |
| sets the modelview matrix More...
|
|
void | set_projection_matrix (const Matrix &pm) |
| sets the projection matrix More...
|
|
void | scale_modelview (double xscale, double yscale, double zscale) |
| scales the modelview matrix using glScale More...
|
|
provides an interface between OpenGL and a perspective camera parametrized in terms of extrinsic parameters (three rotations and camera center) and intrinsic parameters (focal length, principal point position, aspect ratio, skew). See Forsyth and Ponce for further details (Computer Vision, a modern approach). Rotations are handled using the classic Tait-Bryan formulation with pitch, yaw and roll. Please see