Ray representation.
More...
|
C3D_API | Ray (Castor::Point2i const &p_ptPoint, Camera const &p_camera) |
| Constructor from mouse coordinates and a viewport. More...
|
|
C3D_API | Ray (int p_x, int p_y, Camera const &p_camera) |
| Constructor from mouse coordinates and a viewport. More...
|
|
C3D_API | Ray (Castor::Point3r const &p_ptOrigin, Castor::Point3r const &p_ptDirection) |
| Constructor from mouse coordinates and a viewport. More...
|
|
C3D_API | Ray (Ray const &p_copy) |
| Copy constructor. More...
|
|
C3D_API | Ray (Ray &&p_copy) |
| Copy constructor. More...
|
|
C3D_API | ~Ray () |
| Destructor. More...
|
|
C3D_API real | Intersects (Castor::Point3r const &p_pt1, Castor::Point3r const &p_pt2, Castor::Point3r const &p_pt3) |
| Tells if the ray intersects the given triangle of vertices. More...
|
|
C3D_API real | Intersects (Face const &p_face, Submesh const &p_submesh) |
| Tells if the ray intersects the given face. More...
|
|
C3D_API real | Intersects (Castor::Point3r const &p_point) |
| Tells if the vertex is on the ray. More...
|
|
C3D_API real | Intersects (Castor::CubeBox const &p_box) |
| Tells if the ray intersects the given Combo box. More...
|
|
C3D_API real | Intersects (Castor::SphereBox const &p_sphere) |
| Tells if the ray intersects the given Sphere. More...
|
|
C3D_API real | Intersects (GeometrySPtr p_pGeometry, FaceSPtr *p_nearestFace, SubmeshSPtr *p_nearestSubmesh) |
| Tells if the ray intersects the given Geometry. More...
|
|
C3D_API bool | ProjectVertex (Castor::Point3r const &p_point, Castor::Point3r &p_result) |
| Projects the given vertex on the ray. More...
|
|
Ray representation.
A ray is an origin and a direction in 3D
- Author
- Sylvain DOREMUS
- Date
- 14/02/2010
◆ Ray() [1/5]
C3D_API Castor3D::Ray::Ray |
( |
Castor::Point2i const & |
p_ptPoint, |
|
|
Camera const & |
p_camera |
|
) |
| |
Constructor from mouse coordinates and a viewport.
- Parameters
-
[in] | p_ptPoint | The mouse coordinates |
[in] | p_camera | The camera from which to retrieve the ray |
◆ Ray() [2/5]
C3D_API Castor3D::Ray::Ray |
( |
int |
p_x, |
|
|
int |
p_y, |
|
|
Camera const & |
p_camera |
|
) |
| |
Constructor from mouse coordinates and a viewport.
- Parameters
-
[in] | p_x | The mouse x |
[in] | p_y | The mouse y |
[in] | p_camera | The camera from which to retrieve the ray |
◆ Ray() [3/5]
C3D_API Castor3D::Ray::Ray |
( |
Castor::Point3r const & |
p_ptOrigin, |
|
|
Castor::Point3r const & |
p_ptDirection |
|
) |
| |
Constructor from mouse coordinates and a viewport.
- Parameters
-
[in] | p_ptOrigin | The origin of the ray |
[in] | p_ptDirection | The The direction of the ray |
◆ Ray() [4/5]
C3D_API Castor3D::Ray::Ray |
( |
Ray const & |
p_copy | ) |
|
Copy constructor.
- Parameters
-
[in] | p_copy | The object to copy |
◆ Ray() [5/5]
C3D_API Castor3D::Ray::Ray |
( |
Ray && |
p_copy | ) |
|
Copy constructor.
- Parameters
-
[in] | p_copy | The object to copy |
◆ ~Ray()
C3D_API Castor3D::Ray::~Ray |
( |
| ) |
|
◆ Intersects() [1/6]
C3D_API real Castor3D::Ray::Intersects |
( |
Castor::Point3r const & |
p_pt1, |
|
|
Castor::Point3r const & |
p_pt2, |
|
|
Castor::Point3r const & |
p_pt3 |
|
) |
| |
Tells if the ray intersects the given triangle of vertices.
- Parameters
-
[in] | p_pt1 | The first triangle vertex |
[in] | p_pt2 | The second triangle vertex |
[in] | p_pt3 | The third triangle vertex |
- Returns
true
if the ray intersects the triangle, false if not
◆ Intersects() [2/6]
C3D_API real Castor3D::Ray::Intersects |
( |
Face const & |
p_face, |
|
|
Submesh const & |
p_submesh |
|
) |
| |
Tells if the ray intersects the given face.
- Parameters
-
[in] | p_face | The face to test |
[in] | p_submesh | The submesh holding the face |
- Returns
true
if the ray intersects the face, false if not
◆ Intersects() [3/6]
C3D_API real Castor3D::Ray::Intersects |
( |
Castor::Point3r const & |
p_point | ) |
|
Tells if the vertex is on the ray.
- Parameters
-
[in] | p_point | The face to test |
- Returns
true
if vertex is on the ray, false if not
◆ Intersects() [4/6]
C3D_API real Castor3D::Ray::Intersects |
( |
Castor::CubeBox const & |
p_box | ) |
|
Tells if the ray intersects the given Combo box.
- Parameters
-
- Returns
true
if the ray intersects the face, false if not
◆ Intersects() [5/6]
C3D_API real Castor3D::Ray::Intersects |
( |
Castor::SphereBox const & |
p_sphere | ) |
|
Tells if the ray intersects the given Sphere.
- Parameters
-
[in] | p_sphere | The sphere to test |
- Returns
true
if the ray intersects the face, false if not
◆ Intersects() [6/6]
C3D_API real Castor3D::Ray::Intersects |
( |
GeometrySPtr |
p_pGeometry, |
|
|
FaceSPtr * |
p_nearestFace, |
|
|
SubmeshSPtr * |
p_nearestSubmesh |
|
) |
| |
Tells if the ray intersects the given Geometry.
- Parameters
-
[in] | p_pGeometry | The sphere to test |
[out] | p_nearestFace | The intersected face |
[out] | p_nearestSubmesh | The intersected submesh |
- Returns
true
if the ray intersects the face, false if not
◆ ProjectVertex()
C3D_API bool Castor3D::Ray::ProjectVertex |
( |
Castor::Point3r const & |
p_point, |
|
|
Castor::Point3r & |
p_result |
|
) |
| |
Projects the given vertex on the ray.
- Parameters
-
[in] | p_point | The vertex we want to project |
[out] | p_result | The projecion result |
- Returns
true
if the vertex can be projected on the ray, false if not
◆ m_ptDirection
Castor::Point3r Castor3D::Ray::m_ptDirection |
◆ m_ptOrigin
Castor::Point3r Castor3D::Ray::m_ptOrigin |
The documentation for this class was generated from the following file:
- Z:/Projets/C++/Castor3D/source/Core/Castor3D/Src/Ray.hpp