Tucano
0.1
A library for rapid prototyping with modern OpenGL and GLSL
|
Functions | |
bool | raySphereIntersection (const Eigen::Vector3f &ray_direction, const Eigen::Vector3f &ray_origin, const Eigen::Vector3f &sphere_center, float sphere_radius, Eigen::Vector3f &intersection) |
Computes the intersection point between a ray and a sphere. More... | |
bool | rayPlaneIntersection (const Eigen::Vector3f &ray_direction, const Eigen::Vector3f &ray_origin, const Eigen::Vector3f &plane_point, const Eigen::Vector3f &plane_normal, Eigen::Vector3f &intersection) |
Computes the intersection between a ray and a plane. More... | |
bool | rayRingIntersection (const Eigen::Vector3f &ray_direction, const Eigen::Vector3f &ray_origin, const Eigen::Vector3f &plane_point, const Eigen::Vector3f &plane_normal, float inner_radius, float outer_radius, Eigen::Vector3f &intersection) |
Computes the intersection between a ray and a ring in 3D space. More... | |
Eigen::Vector3f | rayDirection (const Eigen::Vector2f &pixel, const Eigen::Vector2i &viewport_size, const Eigen::Matrix4f &projection_matrix, const Eigen::Affine3f &view_matrix) |
Computes the ray direction given a pixel position and camera matrices. More... | |
|
inline |
|
inline |
Computes the intersection between a ray and a plane.
ray_direction | Ray direction vector normalized |
ray_origin | Origin of the ray |
plane_point | A point on the planed |
plane_normal | The normalized normal vector of the plane |
interection | Intersection point if any |
|
inline |
Computes the intersection between a ray and a ring in 3D space.
The ring is defined by the space between two concentric circles (with different radii) on a plane The ray intersects the plane with distance d from the center of the cicle if inner_radius >= d >= outer_radius
ray_direction | Ray direction vector normalized |
ray_origin | Origin of the ray |
plane_point | A point on the planed |
plane_normal | The normalized normal vector of the plane |
inner_radius | Radius of smaller circle |
outer_radius | Radius of larger circle |
intersection | Intersection point between ray and ring |
|
inline |
Computes the intersection point between a ray and a sphere.
ray_direction | Ray direction vector normalized |
ray_origin | Origin of the ray |
sphere_center | Center of the sphere in same space as ray origin |
sphere_radius | Radius of the sphere |
interection | Intersection point if any |