|
DHART
|
Cast rays to determine if and where they intersect geometry. More...
Classes | |
| struct | double3 |
| class | EmbreeRayTracer |
| A wrapper for Intel's Embree Library. More... | |
| struct | HitStruct |
| A simple hit struct to carry all relevant information about hits. More... | |
| struct | MultiRT |
| class | NanoRTRayTracer |
| struct | RayRequest |
| struct | Triangle |
| A triangle. Used internally in Embree. More... | |
| struct | Vector3D |
| struct | Vertex |
| A vertex. Used internally in Embree. More... | |
Functions | |
| template<typename numeric1 , typename numeric2 , typename dist_type = float> | |
| RTCRayHit | ConstructHit (numeric1 x, numeric1 y, numeric1 z, numeric2 dx, numeric2 dy, numeric2 dz, dist_type distance=-1.0f, int mesh_id=-1) |
| template<typename numeric1 , typename numeric2 , typename dist_type = float> | |
| RTCRay | ConstructRay (numeric1 x, numeric1 y, numeric1 z, numeric2 dx, numeric2 dy, numeric2 dz, dist_type distance=-1.0f, int mesh_id=-1) |
| RTCError | CheckState (RTCDevice &device) |
| Check an embree device for errors. More... | |
| void | vectorsToBuffers (const std::vector< std::array< float, 3 > > &vertices, std::vector< Triangle > &Tribuffer, std::vector< Vertex > &Vbuffer) |
| Index a list of verticies and place them into a triangle and vertex buffer. More... | |
| void | buffersToStructs (std::vector< float > &in_vertices, std::vector< int > &in_indices, std::vector< Vertex > &out_vertices, std::vector< Triangle > &out_triangles) |
| Package raw arrays of floats and indices in buffers to the required Embree types. More... | |
| Vector3D | cross (const Vector3D &x, const Vector3D &y) |
| double | dot (const Vector3D &v1, const Vector3D &v2) |
| Vector3D | InvertVector (const Vector3D &V) |
| double | RayTriangleIntersection (const Vector3D &origin, const Vector3D &direction, const Vector3D &v1, const Vector3D &v2, const Vector3D &v3) |
| Determine the distance between a ray's origin and it's point of intersection with a triangle. More... | |
| Vector3D | GetPointFromBuffer (int index, Vertex *buffer) |
| bool | DidIntersect (int mesh_id) |
| void | Log (MultiRT::RT_Type type, std::string Message="") |
Variables | |
| const int | FAIL_ID = ((unsigned int)-1) |
Cast rays to determine if and where they intersect geometry.
The basics of raytracing entail casting a ray from an origin point in a specific direction and determining whether or not it intersects with a set of geometry. Certain functions can even determine where the intersection occured. Generally, every RayTracer will contain a set of geometry and provide functions for casting rays from an origin point in a specific direciton. Some generate an accelerated structure from geometry called a Bounding Volume Hierarchy, or BVH. A BVH can drastically decrease the time it takes to calculate ray intersections, but can be more complicated to manage compared to standard buffers of geometry.
| struct HF::RayTracer::Triangle |
A triangle. Used internally in Embree.
Definition at line 82 of file embree_raytracer.cpp.
Collaboration diagram for HF::RayTracer::Triangle:| Class Members | ||
|---|---|---|
| int | v0 | |
| int | v1 | |
| int | v2 | |
| struct HF::RayTracer::Vertex |
A vertex. Used internally in Embree.
Definition at line 77 of file embree_raytracer.cpp.
Collaboration diagram for HF::RayTracer::Vertex:| Class Members | ||
|---|---|---|
| float | x | |
| float | y | |
| float | z | |
|
inline |
Package raw arrays of floats and indices in buffers to the required Embree types.
| in_vertices | An array of floats in which every 3 floats represents a vertex. |
| in_indices | An array of integers in which every 3 integers represents a triangle. |
| out_vertices | Output array for vertexes. |
| out_triangles | Output array for triangles. |
Definition at line 141 of file embree_raytracer.cpp.
Referenced by HF::RayTracer::EmbreeRayTracer::AddMesh().
Here is the caller graph for this function:| RTCError HF::RayTracer::CheckState | ( | RTCDevice & | device | ) |
Check an embree device for errors.
| device | Device to check for errors |
| std::exception | Some error is found while casting rays. |
Definition at line 69 of file embree_raytracer.cpp.
Referenced by HF::RayTracer::EmbreeRayTracer::InsertGeom().
Here is the caller graph for this function:
|
inline |
Definition at line 24 of file embree_raytracer.cpp.
Referenced by HF::RayTracer::EmbreeRayTracer::Intersect_IMPL().
Here is the caller graph for this function:
|
inline |
Definition at line 48 of file embree_raytracer.cpp.
Referenced by HF::RayTracer::EmbreeRayTracer::Occluded_IMPL().
Here is the caller graph for this function:Definition at line 229 of file embree_raytracer.cpp.
References HF::RayTracer::Vector3D::x, HF::RayTracer::Vector3D::y, and HF::RayTracer::Vector3D::z.
Referenced by RayTriangleIntersection().
Here is the caller graph for this function:
|
inline |
Definition at line 23 of file HitStruct.h.
References FAIL_ID.
Referenced by HF::RayTracer::HitStruct< numeric_type >::DidHit(), and HF::RayTracer::EmbreeRayTracer::Intersect().
Here is the caller graph for this function:Definition at line 237 of file embree_raytracer.cpp.
References HF::RayTracer::Vector3D::x, HF::RayTracer::Vector3D::y, and HF::RayTracer::Vector3D::z.
Referenced by RayTriangleIntersection().
Here is the caller graph for this function:Definition at line 446 of file embree_raytracer.cpp.
References HF::RayTracer::Vertex::x, HF::RayTracer::Vertex::y, and HF::RayTracer::Vertex::z.
Referenced by HF::RayTracer::EmbreeRayTracer::GetTriangle().
Here is the caller graph for this function:Definition at line 241 of file embree_raytracer.cpp.
References HF::RayTracer::Vector3D::x, HF::RayTracer::Vector3D::y, and HF::RayTracer::Vector3D::z.
|
inline |
Definition at line 9 of file MultiRT.cpp.
References HF::RayTracer::MultiRT::EMBREE, and HF::RayTracer::MultiRT::NANO_RT.
| double HF::RayTracer::RayTriangleIntersection | ( | const Vector3D & | origin, |
| const Vector3D & | direction, | ||
| const Vector3D & | v1, | ||
| const Vector3D & | v2, | ||
| const Vector3D & | v3 | ||
| ) |
Determine the distance between a ray's origin and it's point of intersection with a triangle.
| origin | Origin point of the ray. |
| direction | Direction the ray was casted in |
| v1 | First vertex of the triangle |
| v2 | Second vertex of a triangle |
| v3 | Third vertex of a triangle |
Definition at line 246 of file embree_raytracer.cpp.
References cross(), and dot().
Referenced by HF::RayTracer::EmbreeRayTracer::CalculatePreciseDistance().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Index a list of verticies and place them into a triangle and vertex buffer.
| vertices | Mesh vertices. |
| Tribuffer | Output triangle buffer. |
| Vbuffer | Output Vertex Buffer. |
Internally, this uses a hashmap to create an index map of vertices.
Definition at line 92 of file embree_raytracer.cpp.
Referenced by HF::RayTracer::EmbreeRayTracer::EmbreeRayTracer(), and HF::RayTracer::EmbreeRayTracer::AddMesh().
Here is the caller graph for this function:| const int HF::RayTracer::FAIL_ID = ((unsigned int)-1) |
Definition at line 22 of file HitStruct.h.
Referenced by DidIntersect().