Documentation for Ray + New method intersection Ray-Triangle

Former-commit-id: 29989ec859e609582fdb60a67a7fb353a03091a0
This commit is contained in:
Gawaboumga
2015-12-30 15:33:55 +01:00
parent 9efce81eac
commit 137bc33770
2 changed files with 361 additions and 24 deletions

View File

@@ -24,9 +24,9 @@ namespace Nz
public:
Ray() = default;
Ray(T X, T Y, T Z, T directionX, T directionY, T directionZ);
Ray(const Vector3<T>& origin, const Vector3<T>& direction);
Ray(const T origin[3], const T direction[3]);
Ray(const Plane<T>& planeOne, const Plane<T>& planeTwo);
Ray(const Vector3<T>& origin, const Vector3<T>& direction);
template<typename U> explicit Ray(const Ray<U>& ray);
template<typename U> explicit Ray(const Vector3<U>& origin, const Vector3<U>& direction);
Ray(const Ray<T>& ray) = default;
@@ -42,16 +42,17 @@ namespace Nz
bool Intersect(const OrientedBox<T>& orientedBox, T* closestHit = nullptr, T* furthestHit = nullptr) const;
bool Intersect(const Plane<T>& plane, T* hit = nullptr) const;
bool Intersect(const Sphere<T>& sphere, T* closestHit = nullptr, T* furthestHit = nullptr) const;
bool Intersect(const Vector3<T>& firstPoint, const Vector3<T>& secondPoint, const Vector3<T>& thirdPoint, T* hit = nullptr) const;
Ray& MakeAxisX();
Ray& MakeAxisY();
Ray& MakeAxisZ();
Ray& Set(T X, T Y, T Z, T directionX, T directionY, T directionZ);
Ray& Set(const Vector3<T>& origin, const Vector3<T>& direction);
Ray& Set(const T origin[3], const T direction[3]);
Ray& Set(const Plane<T>& planeOne, const Plane<T>& planeTwo);
Ray& Set(const Ray& ray);
Ray& Set(const Vector3<T>& origin, const Vector3<T>& direction);
template<typename U> Ray& Set(const Ray<U>& ray);
template<typename U> Ray& Set(const Vector3<U>& origin, const Vector3<U>& direction);