LibCarna Version 3.4.0
Loading...
Searching...
No Matches
Ray.hpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2010 - 2016 Leonid Kostrykin
3 *
4 * Chair of Medical Engineering (mediTEC)
5 * RWTH Aachen University
6 * Pauwelsstr. 20
7 * 52074 Aachen
8 * Germany
9 *
10 *
11 * Copyright (C) 2021 - 2025 Leonid Kostrykin
12 *
13 */
14
15#ifndef RAY_H_6014714286
16#define RAY_H_6014714286
17
18#include <LibCarna/LibCarna.hpp>
20
26namespace LibCarna
27{
28
29namespace base
30{
31
32namespace math
33{
34
35
36
37// ----------------------------------------------------------------------------------
38// Ray
39// ----------------------------------------------------------------------------------
40
49template< typename VectorType >
50class Ray
51{
52
53public:
54
56
61
66
71
72}; // Ray
73
74
75
76// ----------------------------------------------------------------------------------
77// Ray3f
78// ----------------------------------------------------------------------------------
79
85class LIBCARNA Ray3f : public Ray< Vector3f >
86{
87
88public:
89
94 ( unsigned int frameX, unsigned int frameY
95 , const Viewport& vp
96 , const Matrix4f& inverseProjection
97 , const Matrix4f& inverseView );
98
103 ( unsigned int frameX, unsigned int frameY
104 , const Viewport& vp
105 , const Camera& cam );
106
107}; // Ray3f
108
109
110
111} // namespace LibCarna :: base :: math
112
113} // namespace LibCarna :: base
114
115} // namespace LibCarna
116
117#endif // RAY_H_6014714286
Contains forward-declarations.
Represents an association.
Represents the point-of-view and defines the 3D to 2D projection.
Definition Camera.hpp:43
Defines a rendering viewport. The viewport is a property of the current OpenGL context.
Definition Viewport.hpp:52
Defines ray in .
Definition Ray.hpp:86
void fromEye(unsigned int frameX, unsigned int frameY, const Viewport &vp, const Camera &cam)
Computes a ray in world space.
void fromEye(unsigned int frameX, unsigned int frameY, const Viewport &vp, const Matrix4f &inverseProjection, const Matrix4f &inverseView)
Computes a ray in world space.
Defines ray in where is the Scalar type derived from VectorType and is dimension of VectorType.
Definition Ray.hpp:51
VectorType direction
Holds the direction of this ray.
Definition Ray.hpp:70
VectorType Vector
Reflects the VectorType argument this class template was instantiated with.
Definition Ray.hpp:60
VectorType origin
Holds the origin of this ray.
Definition Ray.hpp:65
Defines LibCarna::base::math namespace and LIBCARNA_FOR_VECTOR3UI.
Eigen::Matrix< float, 4, 4, Eigen::ColMajor > Matrix4f
Defines matrix.
Definition math.hpp:197