|
| Camera (Type type=Type::PERSPECTIVE) |
|
void | set_type (Type type) |
|
Type | get_type () const |
|
void | set_position (const Eigen::Vector3f &pos) |
|
void | set_lookat (const Eigen::Vector3f &dir) |
|
void | set_position_up (const Eigen::Vector3f &pos, const Eigen::Vector3f &up) |
|
Eigen::Vector3f | get_lookat () const |
|
void | set_up (const Eigen::Vector3f &up) |
|
Eigen::Vector3f | get_position () const |
|
Eigen::Vector3f | get_direction () const |
|
Eigen::Vector3f | get_up () const |
|
float | get_far_plane () const |
|
float | get_near_plane () const |
|
void | set_window_dimensions (float width, float height) |
| Set the window dimensions. More...
|
|
void | set_aspect_ratio (float width, float height) |
|
void | set_fov (float fov) |
| Set the Field of View. More...
|
|
float | get_fov () const |
|
void | set_planes (float znear, float zfar) |
|
float | get_near () const |
|
float | get_far () const |
|
Eigen::Projective3f | get_perspective () const |
| Perspective matrix. More...
|
|
Eigen::Matrix4f | get_view () const |
| View matrix. More...
|
|
Eigen::Matrix4f | get_PV () const |
| Projection*View matrix. More...
|
|
Eigen::Matrix4f | get_view_inverse () const |
|
Eigen::Projective3f | get_perspective_inverse () const |
|
float | get_window_width () const |
|
float | get_window_height () const |
|
Eigen::Vector2f | get_window_size () const |
|
Ray | cast_ray (const Eigen::Vector2f &coord) const |
| shoots a ray from coord pixel More...
|
|
Eigen::Vector2f | project (const Eigen::Vector3f &pos) const |
| Projects 3D point to 2D pixel coordinates. More...
|
|
Eigen::Vector3f | project_with_depth (const Eigen::Vector3f &pos) const |
| Projects 3D point to 2D pixel coordinates and depth. More...
|
|
Eigen::Vector3f | unproject (const Eigen::Vector2f &screen, float z=0.0f) const |
| Unprojects 2D pixels to 3D point. More...
|
|
bool | get_ray_to_screen (const Eigen::Vector3f &rayOrigin, const Eigen::Vector3f &rayDir, Eigen::Vector2f *beginOut, Eigen::Vector2f *endOut) const |
| Projects a ray back to screen coordinates. More...
|
|
void | rotate_around_lookat (float angleRad) |
|
void | rotate_tumble (float yaw_delta, float pitch_delta) |
|
void | rotate_turntable (float yaw_delta, float pitch_delta, Eigen::Vector3f primary_axis=Eigen::Vector3f::Zero()) |
| Rotates camera by yaw and pitch angles. More...
|
|
void | rotate_arcball (const Eigen::Vector3f &camera_pos_start, const Eigen::Vector3f &camera_up_start, const Eigen::Vector2f &mouse_start, const Eigen::Vector2f &mouse_current) |
|
void | zoom (float delta) |
|
void | dolly (float delta) |
|
int | get_retina_scale () const |
|
void | set_retina_scale (int value) |
|
void | move_forward (float delta) |
|
void | move_right (float delta) |
|
void | move_up (float delta) |
|
void | set_ortho_viewport (Eigen::Vector4f viewport) |
| Set the orthographic viewport. More...
|
|
Eigen::Vector4f | get_ortho_viewport () const |
|
void | set_rotation_mode (RotationMode mode) |
|
RotationMode | get_rotation_mode () const |
|
Camera | transformed (const ViewportTransform &vt) const |
| Transform camera by ViewportTransform. More...
|
|
Eigen::Vector2f | inverse_viewport_transform (const ViewportTransform &vt, Eigen::Vector2f &pixel) const |
| Map pixel from transformed viewport to original viewport. More...
|
|
bool | is_pixel_in (const Eigen::Vector2f &p) const |
| Is pixel in camera.
|
|
bool | intersects_region (const Eigen::Vector2f &begin, const Eigen::Vector2f &end) const |
| Does camera intersect pixel region.
|
|
Eigen::Vector2f | get_window_origin () const |
|
void | set_window_origin (float x, float y) |
|
bool | is_orthogonal_direction (Dir dir) const |
| Is camera aligned to one of the six orthogonal Dir directions.
|
|
void | set_orthogonal_direction (Dir dir) |
| Aligns camera to one of the six orthogonal Dir directions.
|
|
std::pair< Eigen::Vector3f, Eigen::Vector3f > | get_orthogonal_direction (Dir dir) const |
| Returns position and up direction.
|
|
Frustum | get_frustum () const |
| Get the Camera's Frustum. More...
|
|
Frustum | get_frustum (Eigen::Vector2f min, Eigen::Vector2f max) const |
| Get the Camera's Frustum of a region. More...
|
|
Camera class.
Camera can be either Type::PERSPECTIVE or Type::ORTHOGRAPHIC
Camera is defined by: position, lookat point or direction, up vector, field of view or ortho_viewport, window dimensions, and far/near plane
Note: Caches view and perspective matrices and their inverses.