DHART
|
A wrapper for Intel's Embree Library. More...
#include <embree_raytracer.h>
Public Member Functions | |
EmbreeRayTracer (bool use_precise=false) | |
Construct an empty EmbreeRayTracer;. More... | |
EmbreeRayTracer (std::vector< HF::Geometry::MeshInfo< float > > &MI, bool use_precise_intersection=false) | |
Create a new EmbreeRayTracer and add a single mesh to the scene. More... | |
EmbreeRayTracer (HF::Geometry::MeshInfo< float > &MI, bool use_precise=false) | |
Construct the raytracer using only a single mesh. More... | |
EmbreeRayTracer (const EmbreeRayTracer &ERT2) | |
Construct a raytracer using another raytracer. More... | |
EmbreeRayTracer (const std::vector< std::array< float, 3 > > &geometry) | |
Create a new Raytracer and generate its BVH from a flat array of vertices. More... | |
bool | AddMesh (std::vector< std::array< float, 3 > > &Mesh, int ID, bool Commit=false) |
Add a new mesh to this raytracer's BVH with the specified ID. More... | |
bool | AddMesh (HF::Geometry::MeshInfo< float > &Mesh, bool Commit) |
Add a new mesh to the BVH with the specified ID. If False, then the addition failed, or the ID was already taken. More... | |
bool | AddMesh (std::vector< HF::Geometry::MeshInfo< float > > &Meshes, bool Commit=true) |
Add several new meshes to the BVH. More... | |
bool | PointIntersection (std::array< float, 3 > &origin, const std::array< float, 3 > &dir, float distance=-1, int mesh_id=-1) |
Cast a ray and overwrite the origin with the hitpoint if it intersects any geometry. More... | |
bool | PointIntersection (float &x, float &y, float &z, float dx, float dy, float dz, float distance=-1, int mesh_id=-1) |
Cast a single ray and get the hitpoint. x , y ,and z are overridden with the hitpoint on a successful hit. More... | |
std::vector< char > | PointIntersections (std::vector< std::array< float, 3 > > &origins, std::vector< std::array< float, 3 > > &directions, bool use_parallel=true, float max_distance=-1, int mesh_id=-1) |
Cast multiple rays and recieve hitpoints in return. More... | |
std::vector< char > | Occlusions (const std::vector< std::array< float, 3 > > &origins, const std::vector< std::array< float, 3 > > &directions, float max_distance=-1, bool use_parallel=true) |
Cast multiple occlusion rays in parallel. More... | |
template<typename return_type = double, class N , class V > | |
HitStruct< return_type > | Intersect (const N &node, const V &direction, float max_distance=-1.0f, int mesh_id=-0.1f) |
Cast a ray from origin in direction. More... | |
template<typename return_type = double, typename numeric1 = double, typename numeric2 = double> | |
HitStruct< return_type > | Intersect (numeric1 x, numeric1 y, numeric1 z, numeric2 dx, numeric2 dy, numeric2 dz, float distance=-1.0f, int mesh_id=-1) |
Cast a ray from origin in direction. More... | |
template<typename N , typename V , typename return_type > | |
bool | IntersectOutputArguments (const N &node, const V &direction, return_type &out_distance, int &out_meshid, float max_distance=-1.0f) |
Cast a ray from origin in direction and update the parameters instead of returning a hitstruct. More... | |
template<typename return_type , typename N , typename V > | |
std::vector< HitStruct< return_type > > | Intersections (const N &nodes, const V &directions, float max_distance=-1.0f, const bool use_parallel=false) |
Cast multiple rays in parallel. More... | |
template<typename N , typename V > | |
bool | Occluded (const N &origin, const V &direction, float max_distance=-1.0f, int mesh_id=-1) |
Determine if there is an intersection with any geometry. More... | |
template<typename numeric1 , typename numeric2 , typename dist_type = float> | |
bool | Occluded (numeric1 x, numeric1 y, numeric1 z, numeric2 dx, numeric2 dy, numeric2 dz, dist_type max_distance=-1.0, int mesh_id=-1) |
Determine if there is an intersection with any geometry. More... | |
void | operator= (const EmbreeRayTracer &ERT2) |
Increment reference counters to prevent destruction when a copy is made. More... | |
~EmbreeRayTracer () | |
Custom destructor to ensure cleanup of embree resources. More... | |
Private Member Functions | |
void | SetupScene () |
Performs all the necessary operations to set up the scene. More... | |
std::array< Vector3D, 3 > | GetTriangle (unsigned int geomID, unsigned int primID) const |
Get the vertices for a specific triangle in a mesh. More... | |
int | InsertGeom (RTCGeometry &geom, int id=-1) |
Attach geometry to the current scene. More... | |
double | CalculatePreciseDistance (unsigned int geom_id, unsigned int prim_id, const Vector3D &origin, const Vector3D &direction) const |
Calculate the distance from origin to the point of intersection using an algorithm with higher precision. More... | |
RTCRayHit | Intersect_IMPL (float x, float y, float z, float dx, float dy, float dz, float max_distance=-1, int mesh_id=-1) |
Implementation for fundamental ray intersection. More... | |
bool | Occluded_IMPL (float x, float y, float z, float dx, float dy, float dz, float distance=-1, int mesh_id=-1) |
Implementation for fundamental occlusion ray intersection. More... | |
bool | Occluded_IMPL (const std::array< float, 3 > &origin, const std::array< float, 3 > &direction, float max_dist=-1) |
Cast an occlusion ray using arrays as input. More... | |
RTCGeometry | ConstructGeometryFromBuffers (std::vector< Triangle > &tris, std::vector< Vertex > &verts) |
Create a new instance of RTCGeometry from a triangle and vertex buffer. More... | |
Private Attributes | |
RTCDevice | device |
All objects in Embree are created from this. https://www.embree.org/api.html#device-object. More... | |
RTCScene | scene |
Container for a set of geometries, and the BVH. https://www.embree.org/api.html#scene-object. More... | |
RTCIntersectContext | context |
Context to cast rays within. More... | |
Triangle * | triangles |
Triangle buffer. Is used in multiple places, but contents are dumped. More... | |
Vertex * | Vertices |
Vertex buffer. Is used in multiple places but contents are dumped. More... | |
bool | use_precise = false |
If true, use custom triangle intersection intersection instead of embree's. More... | |
std::vector< RTCGeometry > | geometry |
A wrapper for Intel's Embree Library.
Provides several functions to quickly and simply perform ray intersections using Embree. This class will automatically dispose of Embree buffers when destroyed, incrementing Embree's reference counters on copy, and decrementing them on deletion. This class also provides methods for adding geometry to Embree's geometry buffers.
Definition at line 80 of file embree_raytracer.h.
HF::RayTracer::EmbreeRayTracer::EmbreeRayTracer | ( | bool | use_precise = false | ) |
Construct an empty EmbreeRayTracer;.
use_precise | If set to true, use a more precise intesection algorithm to determine the distance between rays origin points and their points of intesection // Requires #include "embree_raytracer.h", #include "objloader.h"
// For brevity
// Create the EmbreeRayTracer, no arguments
EmbreeRayTracer ert;
A wrapper for Intel's Embree Library. Definition: embree_raytracer.h:80 |
Definition at line 166 of file embree_raytracer.cpp.
References SetupScene().
HF::RayTracer::EmbreeRayTracer::EmbreeRayTracer | ( | std::vector< HF::Geometry::MeshInfo< float > > & | MI, |
bool | use_precise_intersection = false |
||
) |
Create a new EmbreeRayTracer and add a single mesh to the scene.
MI | The mesh to use for scene construction. |
use_precise | If set to true, use a more precise intesection algorithm to determine the distance between rays origin pointsand their points of intesection |
Exception | Thrown if MI contains no vertices. |
throw;
which is meant to only be used to rethrow previously thrown exceptions. This should be throwing HF::Exceptions::InvalidOBJ Definition at line 172 of file embree_raytracer.cpp.
References AddMesh(), and SetupScene().
HF::RayTracer::EmbreeRayTracer::EmbreeRayTracer | ( | HF::Geometry::MeshInfo< float > & | MI, |
bool | use_precise = false |
||
) |
Construct the raytracer using only a single mesh.
MI | MeshInfo<float> instance to create the BVH with. |
use_precise | If set to true, use a more precise intesection algorithm to determine the distance between rays origin points and their points of intesection |
Definition at line 184 of file embree_raytracer.cpp.
References AddMesh(), SetupScene(), and use_precise.
HF::RayTracer::EmbreeRayTracer::EmbreeRayTracer | ( | const EmbreeRayTracer & | ERT2 | ) |
HF::RayTracer::EmbreeRayTracer::EmbreeRayTracer | ( | const std::vector< std::array< float, 3 > > & | geometry | ) |
Create a new Raytracer and generate its BVH from a flat array of vertices.
geometry | A vector of float arrays representing geometry. Every 3 arrays should form a single triangle of the mesh |
Use of this function is discouraged since it is slower and less memory efficent than building from an array of triangle indices and an array of vertices. Internally a hashmap is used to assign an ID to every vertex in order to generate the index array.
std::exception | Embree's geometry buffers could not be initialized. |
Definition at line 301 of file embree_raytracer.cpp.
References ConstructGeometryFromBuffers(), geometry, InsertGeom(), scene, SetupScene(), and HF::RayTracer::vectorsToBuffers().
HF::RayTracer::EmbreeRayTracer::~EmbreeRayTracer | ( | ) |
Custom destructor to ensure cleanup of embree resources.
Definition at line 644 of file embree_raytracer.cpp.
bool HF::RayTracer::EmbreeRayTracer::AddMesh | ( | HF::Geometry::MeshInfo< float > & | Mesh, |
bool | Commit | ||
) |
Add a new mesh to the BVH with the specified ID. If False, then the addition failed, or the ID was already taken.
Mesh | A vector of 3d points composing the mesh |
ID | the id of the mesh |
Commit | Whether or not to commit changes yet. This is slow, so only do this when you're done adding meshes. |
std::exception | RTC failed to allocate vertex and or index buffers. |
>>>Mesh insertion okay
Definition at line 375 of file embree_raytracer.cpp.
References HF::RayTracer::buffersToStructs(), ConstructGeometryFromBuffers(), HF::Geometry::MeshInfo< numeric_type >::GetIndexedVertices(), HF::Geometry::MeshInfo< numeric_type >::getRawIndices(), InsertGeom(), HF::Geometry::MeshInfo< numeric_type >::meshid, HF::Geometry::MeshInfo< numeric_type >::NumTris(), HF::Geometry::MeshInfo< numeric_type >::NumVerts(), and scene.
bool HF::RayTracer::EmbreeRayTracer::AddMesh | ( | std::vector< HF::Geometry::MeshInfo< float > > & | Meshes, |
bool | Commit = true |
||
) |
Add several new meshes to the BVH.
Meshes | A vector of meshinfo to each be added as a seperate mesh. |
Commit | Whether or not to commit changes to the scene after all meshes in Meshes have been added. |
Definition at line 398 of file embree_raytracer.cpp.
References AddMesh(), and scene.
bool HF::RayTracer::EmbreeRayTracer::AddMesh | ( | std::vector< std::array< float, 3 > > & | Mesh, |
int | ID, | ||
bool | Commit = false |
||
) |
Add a new mesh to this raytracer's BVH with the specified ID.
Mesh | A vector of 3d points composing the mesh |
ID | the id of the mesh |
Commit | Whether or not to commit changes yet. This is slow, so only do this when you're done adding meshes. |
std::exception | Embree failed to allocate vertex and or index buffers. |
>>>status okay
Definition at line 316 of file embree_raytracer.cpp.
References ConstructGeometryFromBuffers(), InsertGeom(), scene, and HF::RayTracer::vectorsToBuffers().
Referenced by EmbreeRayTracer(), AddMesh(), AddMesh(), and AddMeshes().
|
private |
Calculate the distance from origin to the point of intersection using an algorithm with higher precision.
geom_id | ID of the geometry the ray intersected |
prim_id | ID of the primitive in geometry the ray intersected |
origin | The origin point of the ray |
direction | the direction the ray was casted in |
Uses geom_id
to get the buffers of the intersected geometry, then uses prim_id
to get the 3 vertices comprising the intersected triangle. Once these are obtained, this function calls RayTriangleIntersection to calculate the precise point of intersection and returns the result. When use_precise is set to true, Intersect will call this function to calculate its distance value instead of returning the distance calculated by embree.
Definition at line 282 of file embree_raytracer.cpp.
References GetTriangle(), and HF::RayTracer::RayTriangleIntersection().
Referenced by Intersect().
|
private |
Create a new instance of RTCGeometry from a triangle and vertex buffer.
tris | Triangle buffer to construct new geometry with |
verts | Vertex buffer to construct geometry with |
Definition at line 336 of file embree_raytracer.cpp.
References device, geometry, triangles, and Vertices.
Referenced by EmbreeRayTracer(), and AddMesh().
|
private |
Get the vertices for a specific triangle in a mesh.
geomID | ID of the geometry the triangle belongs to |
primID | Id of the triangle to retrieve |
primID
in the geometry with id geomID
geomID
must be the ID of geometry that already exists within this raytracer's BVH primID
must be the ID of a triangle within the bounds of the geometry at geomID
's buffers Definition at line 450 of file embree_raytracer.cpp.
References HF::RayTracer::GetPointFromBuffer(), scene, HF::RayTracer::Triangle::v0, HF::RayTracer::Triangle::v1, and HF::RayTracer::Triangle::v2.
Referenced by CalculatePreciseDistance().
|
private |
Attach geometry to the current scene.
geom | Geometry to attach |
id | Id to attempt to attach with. If this ID is already taken, the next available ID will be assigned, and the new ID will be returned |
Definition at line 212 of file embree_raytracer.cpp.
References HF::RayTracer::CheckState(), device, InsertGeom(), and scene.
Referenced by EmbreeRayTracer(), AddMesh(), and InsertGeom().
|
inline |
Cast a ray from origin in direction.
return_type | Numeric type for the returned distance value i.e. double, long double, float, etc. |
N | X,Y,Z coordinates representing a point in space |
V | X,Y,Z Coordinates representing direction vector |
node | A point in space. Must atleast have [0], [1], and [2] defined. |
direction | Direction to cast the ray in. Same constraints as node, but can be a different type. |
max_distance | Maximum distance a ray can travel before intersections are ignored. Set to -1 for infinite distance. |
mesh_id | Only consider intersections with the mesh at this ID. Set to -1 to consider intersections with all meshes. |
use_precise
is set to true then this will use a more precise algorithm to calculate returned distance value. This is one of the most basic forms of intersection for the raytracer and many other functions will call this internally.Definition at line 1001 of file embree_raytracer.h.
Referenced by PreciseIntersection().
|
inline |
Cast a ray from origin in direction.
return_type | Numeric type used for the output distance value. |
numeric1 | Numeric type used for the x,y,z components of the origin |
numeric2 | Numeric type used for the x,y,z components of the direction |
x | X component of the ray's origin. |
y | Y component of the ray's origin. |
z | Z component of the ray's origin. |
dx | X component of the ray's direction. |
dy | Y component of the ray's direction. |
dz | Z component of the ray's direction. |
max_distance | Maximum distance a ray can travel before intersections are ignored. Set to -1 for infinite distance. |
mesh_id | Ignore intersections with any mesh other than the mesh with this ID. set to -1 to consider intersections with any geometry |
use_precise
is set to true then this will use a more precise algorithm to calculate returned distance value.This is one of the most basic forms of intersection for the raytracerand many other functions will call this internally.Definition at line 1041 of file embree_raytracer.h.
References CalculatePreciseDistance(), HF::RayTracer::DidIntersect(), HF::RayTracer::HitStruct< numeric_type >::distance, Intersect_IMPL(), and HF::RayTracer::HitStruct< numeric_type >::meshid.
|
private |
Implementation for fundamental ray intersection.
x | x component of the ray's origin. |
y | y component of the ray's origin. |
z | z component of the ray's origin. |
dx | x component of the ray's direction. |
dy | y component of the ray's direction. |
dz | z component of the ray's direction. |
max_distance | Maximum distance the ray can travel. Any intersections beyond this distance will be ignored. If set to -1, all intersections will be counted regardless of distance. |
mesh_id | (UNIMPLEMENTED) the id of the only mesh for this ray to collide with. Any geometry wihtout this ID is ignored. |
>>>1
>>>Miss
Definition at line 543 of file embree_raytracer.cpp.
References HF::RayTracer::ConstructHit(), context, and scene.
Referenced by Intersect().
|
inline |
Cast multiple rays in parallel.
return_type | Numeric type for the returned distance value i.e. double, long double, float, etc. |
N | X,Y,Z A container of objects holding x,y,z coordinates for the origin points of every ray |
V | X,Y,Z A container of objects holding x,y,z coordinates for the direction points of every ray |
node | Origin points to cast rays from. |
direction | Directions to cast rays in. |
max_distance | Maximum distance a ray can travel before intersections are ignored. Set to -1 for infinite distance. |
mesh_id | Only consider intersections with the mesh at this ID. Set to -1 to consider intersections with all meshes. |
use_precise
is set to true then this will use a more precise algorithm to calculate returned distance value. This is one of the most basic forms of intersection for the raytracer and many other functions will call this internally.Definition at line 1141 of file embree_raytracer.h.
|
inline |
Cast a ray from origin in direction and update the parameters instead of returning a hitstruct.
return_type | Numeric type for the returned distance value i.e. double, long double, float, etc. |
N | X,Y,Z coordinates representing a point in space |
V | X,Y,Z Coordinates representing direction vector |
node | Origin point of the ray. |
direction | Direction to cast the ray in. |
max_distance | Maximum distance a ray can travel before intersections are ignored. Set to -1 for infinite distance. |
out_distance | On intersection will be updated to contain the distance from origin to the point of intersection. |
out_meshid | updated to contain the ID of the intersected mesh. |
Definition at line 1098 of file embree_raytracer.h.
References HF::RayTracer::HitStruct< numeric_type >::DidHit(), HF::RayTracer::HitStruct< numeric_type >::distance, and HF::RayTracer::HitStruct< numeric_type >::meshid.
Referenced by CastRaysDistance(), and CastSingleRayDistance().
|
inline |
Determine if there is an intersection with any geometry.
N | X,Y,Z coordinates representing a point in space |
V | X,Y,Z Coordinates representing direction vector |
node | A point in space. Must atleast have [0], [1], and [2] defined. |
direction | Direction to cast the ray in. Same constraints as node, but can be a different type. |
max_distance | Maximum distance a ray can travel before intersections are ignored. Set to -1 for infinite distance. |
true
if the ray intersected with any geometry within max_distance, false
otherwisemax_distance
parameter.>>> True
>>> False
Definition at line 1186 of file embree_raytracer.h.
References Occluded_IMPL().
Referenced by HF::VisibilityGraph::HeightCheck(), and HF::VisibilityGraph::IsOcclusionBetween().
|
inline |
Determine if there is an intersection with any geometry.
numeric1 | Numeric type used for the x,y,z components of the origin |
numeric2 | Numeric type used for the x,y,z components of the direction |
dist_type | Numeric type used for the distance parameter. |
x | X component of the ray's origin. |
y | Y component of the ray's origin. |
z | Z component of the ray's origin. |
dx | X component of the ray's direction. |
dy | Y component of the ray's direction. |
dz | Z component of the ray's direction. |
max_distance | Maximum distance a ray can travel before intersections are ignored. Set to -1 for infinite distance. |
mesh_id | Ignore intersections with any mesh other than the mesh with this ID. set to -1 to consider intersections with any geometry |
true
if the ray intersected with any geometry within max_distance, false
otherwisemax_distance
parameter.>>> True
>>> False
Definition at line 1233 of file embree_raytracer.h.
References Occluded_IMPL().
|
private |
Cast an occlusion ray using arrays as input.
origin | Start point of the ray. |
direction | Direction of the ray. |
max_dist | Maximum distance of the ray. Any hits beyond this distance will not be counted. If negative, count all hits regardless of distance. |
Occulsion rays are faster than the other ray functions, but can only tell if a ray intersected any geometry or it didn't. use the other functions for information such as distance, hitpoint, or meshid.
>>> True
>>> False
Definition at line 555 of file embree_raytracer.cpp.
References Occluded_IMPL().
|
private |
Implementation for fundamental occlusion ray intersection.
x | x component of the ray's origin. |
y | y component of the ray's origin. |
z | z component of the ray's origin. |
dx | x component of the ray's direction. |
dy | y component of the ray's direction. |
dz | z component of the ray's direction. |
distance | Maximum distance of the ray. Any hits beyond this distance will not be counted. If negative, count all hits regardless of distance. |
mesh_id | (NOT IMPLEMENTED) The id of the only mesh for this ray to collide with. -1 for all. |
>>> True
>>> False
Definition at line 624 of file embree_raytracer.cpp.
References HF::RayTracer::ConstructRay(), context, and scene.
Referenced by Occluded(), Occluded_IMPL(), and Occlusions().
std::vector< char > HF::RayTracer::EmbreeRayTracer::Occlusions | ( | const std::vector< std::array< float, 3 > > & | origins, |
const std::vector< std::array< float, 3 > > & | directions, | ||
float | max_distance = -1 , |
||
bool | use_parallel = true |
||
) |
Cast multiple occlusion rays in parallel.
origins | A list of origins. If only one is supplied then it will be cast for every direction in directions. |
directions | A list of directions. If only one is supplied then it will be cast for every origin in origins |
max_distance | Maximum distance the ray can travel |
parallel | Whether or not to cast the rays in parallel. |
Can be cast in 3 configurations:
>>> [True, True, True, True, True, False, False, False, False, False]
Definition at line 563 of file embree_raytracer.cpp.
References Occluded_IMPL().
Referenced by CastOcclusionRays().
void HF::RayTracer::EmbreeRayTracer::operator= | ( | const EmbreeRayTracer & | ERT2 | ) |
Increment reference counters to prevent destruction when a copy is made.
ERT2 | Reference to EmbreeRayTracer, the right-hand side of the = statement |
Definition at line 632 of file embree_raytracer.cpp.
References context, device, geometry, scene, and use_precise.
bool HF::RayTracer::EmbreeRayTracer::PointIntersection | ( | float & | x, |
float & | y, | ||
float & | z, | ||
float | dx, | ||
float | dy, | ||
float | dz, | ||
float | distance = -1 , |
||
int | mesh_id = -1 |
||
) |
Cast a single ray and get the hitpoint. x , y ,and z are overridden with the hitpoint on a successful hit.
x | x component of the ray's origin. |
y | y component of the ray's origin. |
z | z component of the ray's origin. |
dx | x component of the ray's direction. |
dy | y component of the ray's direction. |
dz | z component of the ray's direction. |
distance | Any intersections beyond this distance are ignored. Set to -1 count any hit regardless of distance. |
mesh_id | (UNUSED) The id of the only mesh for this ray to collide with. Any geometry wihtout this ID is ignored |
>>>(0, 0, 0)
>>>Miss
Definition at line 420 of file embree_raytracer.cpp.
References HF::RayTracer::HitStruct< numeric_type >::DidHit(), and HF::RayTracer::HitStruct< numeric_type >::distance.
bool HF::RayTracer::EmbreeRayTracer::PointIntersection | ( | std::array< float, 3 > & | origin, |
const std::array< float, 3 > & | dir, | ||
float | distance = -1 , |
||
int | mesh_id = -1 |
||
) |
Cast a ray and overwrite the origin with the hitpoint if it intersects any geometry.
dir | Direction to cast the ray in. |
origin | Start point of the ray. Updated to contain the hitpoint if successful. |
distance | Any hits beyond this distance are ignored. Set to -1 to count all intersections regardless of distance. |
mesh_id | (UNUSED) The id of the only mesh for this ray to collide with. -1 for all |
>>>(0,0,0)
>>>Miss
Definition at line 411 of file embree_raytracer.cpp.
References PointIntersection().
Referenced by CastRay(), PointIntersection(), and PointIntersections().
std::vector< char > HF::RayTracer::EmbreeRayTracer::PointIntersections | ( | std::vector< std::array< float, 3 > > & | origins, |
std::vector< std::array< float, 3 > > & | directions, | ||
bool | use_parallel = true , |
||
float | max_distance = -1 , |
||
int | mesh_id = -1 |
||
) |
Cast multiple rays and recieve hitpoints in return.
origins | An array of x,y,z coordinates to cast rays from. |
directions | An array of x,y,z directions to cast in. |
use_parallel | Cast rays in parallel if true, if not cast in serial. All available cores will be used. |
max_distance | Maximum distance the ray can travel. Any intersections beyond this distance will be ignored. If set to 1, all intersections will be counted regardless of distance. |
mesh_id | (UNUSED) Only intersect with the mesh of this ID |
Can be cast in 3 configurations:
System.ArgumentException | Length of directions and origins did not match any of the valid cases. |
>>> [(0, 0, 0), (1.99, 0, 0), (3.98, 0, 0), (5.97, 0, 0), (7.96, 0, 0), (9.95, 0, 0), Miss, Miss, Miss, Miss]
Definition at line 480 of file embree_raytracer.cpp.
References PointIntersection().
Referenced by CastMultipleDirectionsOneOrigin(), CastMultipleOriginsOneDirection(), and CastMultipleRays().
|
private |
Performs all the necessary operations to set up the scene.
1) Creates device 2) Creates the scene using device 3) Sets the build quality of the scene 4) Sets scene flags 5) Inits Intersect_IMPL context
Definition at line 190 of file embree_raytracer.cpp.
References context, device, and scene.
Referenced by EmbreeRayTracer().
|
private |
Context to cast rays within.
Definition at line 86 of file embree_raytracer.h.
Referenced by EmbreeRayTracer(), Intersect_IMPL(), Occluded_IMPL(), operator=(), and SetupScene().
|
private |
All objects in Embree are created from this. https://www.embree.org/api.html#device-object.
Definition at line 82 of file embree_raytracer.h.
Referenced by EmbreeRayTracer(), ~EmbreeRayTracer(), ConstructGeometryFromBuffers(), InsertGeom(), operator=(), and SetupScene().
|
private |
Definition at line 94 of file embree_raytracer.h.
Referenced by EmbreeRayTracer(), ConstructGeometryFromBuffers(), and operator=().
|
private |
Container for a set of geometries, and the BVH. https://www.embree.org/api.html#scene-object.
Definition at line 84 of file embree_raytracer.h.
Referenced by EmbreeRayTracer(), ~EmbreeRayTracer(), AddMesh(), GetTriangle(), InsertGeom(), Intersect_IMPL(), Occluded_IMPL(), operator=(), and SetupScene().
|
private |
Triangle buffer. Is used in multiple places, but contents are dumped.
Definition at line 88 of file embree_raytracer.h.
Referenced by ConstructGeometryFromBuffers().
|
private |
If true, use custom triangle intersection intersection instead of embree's.
Definition at line 92 of file embree_raytracer.h.
Referenced by EmbreeRayTracer(), and operator=().
|
private |
Vertex buffer. Is used in multiple places but contents are dumped.
Definition at line 90 of file embree_raytracer.h.
Referenced by ConstructGeometryFromBuffers().