Carna Version 3.3.3
Loading...
Searching...
No Matches
Ray.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2010 - 2015 Leonid Kostrykin
3 *
4 * Chair of Medical Engineering (mediTEC)
5 * RWTH Aachen University
6 * Pauwelsstr. 20
7 * 52074 Aachen
8 * Germany
9 *
10 */
11
12#ifndef RAY_H_6014714286
13#define RAY_H_6014714286
14
15#include <Carna/Carna.h>
16#include <Carna/base/math.h>
17
22namespace Carna
23{
24
25namespace base
26{
27
28namespace math
29{
30
31
32
33// ----------------------------------------------------------------------------------
34// Ray
35// ----------------------------------------------------------------------------------
36
46template< typename VectorType >
47class Ray
48{
49
50public:
51
53
58
63
68
69}; // Ray
70
71
72
73// ----------------------------------------------------------------------------------
74// Ray3f
75// ----------------------------------------------------------------------------------
76
83class CARNA_LIB Ray3f : public Ray< Vector3f >
84{
85
86public:
87
92 ( unsigned int frameX, unsigned int frameY
93 , const Viewport& vp
94 , const Matrix4f& inverseProjection
95 , const Matrix4f& inverseView );
96
101 ( unsigned int frameX, unsigned int frameY
102 , const Viewport& vp
103 , const Camera& cam );
104
105}; // Ray3f
106
107
108
109} // namespace Carna :: base :: math
110
111} // namespace Carna :: base
112
113} // namespace Carna
114
115#endif // RAY_H_6014714286
Represents an association.
Definition Association.h:45
Represents the point-of-view and defines the 3D to 2D projection.
Definition Camera.h:40
Defines a rendering viewport. The viewport is a property of the current OpenGL context.
Definition Viewport.h:49
Defines ray in .
Definition Ray.h:84
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.h:48
VectorType origin
Holds the origin of this ray.
Definition Ray.h:62
VectorType Vector
Reflects the VectorType argument this class template was instantiated with.
Definition Ray.h:57
VectorType direction
Holds the direction of this ray.
Definition Ray.h:67
Defines Carna::base::math namespace and CARNA_FOR_VECTOR3UI.
Eigen::Matrix< float, 4, 4, Eigen::ColMajor > Matrix4f
Defines matrix.
Definition math.h:193