Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
rtcore_scene.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  __RTCScene
 Defines an opaque scene type. More...
 
enum  RTCSceneFlags {
  RTC_SCENE_STATIC = (0 << 0) , RTC_SCENE_DYNAMIC = (1 << 0) , RTC_SCENE_COMPACT = (1 << 8) , RTC_SCENE_COHERENT = (1 << 9) ,
  RTC_SCENE_INCOHERENT = (1 << 10) , RTC_SCENE_HIGH_QUALITY = (1 << 11) , RTC_SCENE_ROBUST = (1 << 16)
}
 
enum  RTCAlgorithmFlags {
  RTC_INTERSECT1 = (1 << 0) , RTC_INTERSECT4 = (1 << 1) , RTC_INTERSECT8 = (1 << 2) , RTC_INTERSECT16 = (1 << 3) ,
  RTC_INTERPOLATE = (1 << 4) , RTC_INTERSECTN = (1 << 5)
}
 
enum  RTCRayNFlags { RTC_RAYN_DEFAULT = (1 << 0) }
 
typedef struct __RTCSceneRTCScene
 Defines an opaque scene type.
 
typedef bool(* RTCProgressMonitorFunc) (void *ptr, const double n)
 Type of progress callback function.
 
RTCORE_DEPRECATED typedef RTCProgressMonitorFunc RTC_PROGRESS_MONITOR_FUNCTION
 
RTCORE_API RTCORE_DEPRECATED RTCScene rtcNewScene (RTCSceneFlags flags, RTCAlgorithmFlags aflags)
 
RTCORE_API RTCScene rtcDeviceNewScene (RTCDevice device, RTCSceneFlags flags, RTCAlgorithmFlags aflags)
 
RTCORE_API void rtcSetProgressMonitorFunction (RTCScene scene, RTCProgressMonitorFunc func, void *ptr)
 Sets the progress callback function which is called during hierarchy build of this scene.
 
RTCORE_API void rtcCommit (RTCScene scene)
 
RTCORE_API void rtcCommitThread (RTCScene scene, unsigned int threadID, unsigned int numThreads)
 
RTCORE_API void rtcGetBounds (RTCScene scene, RTCBounds &bounds_o)
 
RTCORE_API void rtcIntersect (RTCScene scene, RTCRay &ray)
 
RTCORE_API void rtcIntersect4 (const void *valid, RTCScene scene, RTCRay4 &ray)
 
RTCORE_API void rtcIntersect8 (const void *valid, RTCScene scene, RTCRay8 &ray)
 
RTCORE_API void rtcIntersect16 (const void *valid, RTCScene scene, RTCRay16 &ray)
 
RTCORE_API void rtcIntersectN (RTCScene scene, RTCRay *rayN, const size_t N, const size_t stride, const size_t flags=RTC_RAYN_DEFAULT)
 
RTCORE_API void rtcIntersectN_SOA (RTCScene scene, RTCRaySOA &rayN, const size_t N, const size_t streams, const size_t stride, const size_t flags=RTC_RAYN_DEFAULT)
 
RTCORE_API void rtcOccluded (RTCScene scene, RTCRay &ray)
 
RTCORE_API void rtcOccluded4 (const void *valid, RTCScene scene, RTCRay4 &ray)
 
RTCORE_API void rtcOccluded8 (const void *valid, RTCScene scene, RTCRay8 &ray)
 
RTCORE_API void rtcOccluded16 (const void *valid, RTCScene scene, RTCRay16 &ray)
 
RTCORE_API void rtcOccludedN (RTCScene scene, RTCRay *rayN, const size_t N, const size_t stride, const size_t flags=RTC_RAYN_DEFAULT)
 
RTCORE_API void rtcOccludedN_SOA (RTCScene scene, RTCRaySOA &rayN, const size_t N, const size_t streams, const size_t stride, const size_t flags=RTC_RAYN_DEFAULT)
 
RTCORE_API void rtcDeleteScene (RTCScene scene)
 

Class Documentation

◆ __RTCScene

struct __RTCScene

Defines an opaque scene type.

Typedef Documentation

◆ RTCProgressMonitorFunc

typedef bool(* RTCProgressMonitorFunc) (void *ptr, const double n)

Type of progress callback function.

◆ RTCScene

typedef struct __RTCScene* RTCScene

Defines an opaque scene type.

Enumeration Type Documentation

◆ RTCAlgorithmFlags

enabled algorithm flags

Enumerator
RTC_INTERSECT1 

enables the rtcIntersect1 and rtcOccluded1 functions for this scene

RTC_INTERSECT4 

enables the rtcIntersect4 and rtcOccluded4 functions for this scene

RTC_INTERSECT8 

enables the rtcIntersect8 and rtcOccluded8 functions for this scene

RTC_INTERSECT16 

enables the rtcIntersect16 and rtcOccluded16 functions for this scene

RTC_INTERPOLATE 

enables the rtcInterpolate function for this scene

RTC_INTERSECTN 

enables the rtcIntersectN and rtcOccludedN functions for this scene

49{
50 RTC_INTERSECT1 = (1 << 0),
51 RTC_INTERSECT4 = (1 << 1),
52 RTC_INTERSECT8 = (1 << 2),
53 RTC_INTERSECT16 = (1 << 3),
54 RTC_INTERPOLATE = (1 << 4),
55
56 RTC_INTERSECTN = (1 << 5),
57};
@ RTC_INTERSECT8
enables the rtcIntersect8 and rtcOccluded8 functions for this scene
Definition rtcore_scene.h:52
@ RTC_INTERSECT16
enables the rtcIntersect16 and rtcOccluded16 functions for this scene
Definition rtcore_scene.h:53
@ RTC_INTERSECT1
enables the rtcIntersect1 and rtcOccluded1 functions for this scene
Definition rtcore_scene.h:50
@ RTC_INTERPOLATE
enables the rtcInterpolate function for this scene
Definition rtcore_scene.h:54
@ RTC_INTERSECTN
enables the rtcIntersectN and rtcOccludedN functions for this scene
Definition rtcore_scene.h:56
@ RTC_INTERSECT4
enables the rtcIntersect4 and rtcOccluded4 functions for this scene
Definition rtcore_scene.h:51

◆ RTCRayNFlags

layout flags for ray streams

Enumerator
RTC_RAYN_DEFAULT 
61{
62 RTC_RAYN_DEFAULT = (1 << 0)
63};
@ RTC_RAYN_DEFAULT
Definition rtcore_scene.h:62

◆ RTCSceneFlags

scene flags

Enumerator
RTC_SCENE_STATIC 

specifies static scene

RTC_SCENE_DYNAMIC 

specifies dynamic scene

RTC_SCENE_COMPACT 

use memory conservative data structures

RTC_SCENE_COHERENT 

optimize data structures for coherent rays

RTC_SCENE_INCOHERENT 

optimize data structures for in-coherent rays (enabled by default)

RTC_SCENE_HIGH_QUALITY 

create higher quality data structures

RTC_SCENE_ROBUST 

use more robust traversal algorithms

32{
33 /* dynamic type flags */
34 RTC_SCENE_STATIC = (0 << 0),
35 RTC_SCENE_DYNAMIC = (1 << 0),
36
37 /* acceleration structure flags */
38 RTC_SCENE_COMPACT = (1 << 8),
39 RTC_SCENE_COHERENT = (1 << 9),
40 RTC_SCENE_INCOHERENT = (1 << 10),
41 RTC_SCENE_HIGH_QUALITY = (1 << 11),
42
43 /* traversal algorithm flags */
44 RTC_SCENE_ROBUST = (1 << 16)
45};
@ RTC_SCENE_DYNAMIC
specifies dynamic scene
Definition rtcore_scene.h:35
@ RTC_SCENE_COMPACT
use memory conservative data structures
Definition rtcore_scene.h:38
@ RTC_SCENE_ROBUST
use more robust traversal algorithms
Definition rtcore_scene.h:44
@ RTC_SCENE_HIGH_QUALITY
create higher quality data structures
Definition rtcore_scene.h:41
@ RTC_SCENE_COHERENT
optimize data structures for coherent rays
Definition rtcore_scene.h:39
@ RTC_SCENE_INCOHERENT
optimize data structures for in-coherent rays (enabled by default)
Definition rtcore_scene.h:40
@ RTC_SCENE_STATIC
specifies static scene
Definition rtcore_scene.h:34

Function Documentation

◆ rtcCommit()

RTCORE_API void rtcCommit ( RTCScene  scene)

Commits the geometry of the scene. After initializing or modifying geometries, commit has to get called before tracing rays.

Referenced by igl::embree::EmbreeIntersector::init().

+ Here is the caller graph for this function:

◆ rtcCommitThread()

RTCORE_API void rtcCommitThread ( RTCScene  scene,
unsigned int  threadID,
unsigned int  numThreads 
)

Commits the geometry of the scene. The calling threads will be used internally as a worker threads on some implementations. The function will wait until 'numThreads' threads have called this function and all threads return from the function after the scene commit is finished. The application threads will not be used as worker threads when the TBB tasking system is enabled (which is the default). On CPUs, we recommend also using TBB inside your application to share threads. We recommend using the rtcCommitThread feature to share threads on the Xeon Phi coprocessor.

◆ rtcDeleteScene()

RTCORE_API void rtcDeleteScene ( RTCScene  scene)

Deletes the scene. All contained geometry get also destroyed.

Referenced by igl::embree::EmbreeIntersector::deinit().

+ Here is the caller graph for this function:

◆ rtcDeviceNewScene()

RTCORE_API RTCScene rtcDeviceNewScene ( RTCDevice  device,
RTCSceneFlags  flags,
RTCAlgorithmFlags  aflags 
)

Creates a new scene.

◆ rtcGetBounds()

RTCORE_API void rtcGetBounds ( RTCScene  scene,
RTCBounds &  bounds_o 
)

Returns to AABB of the scene. rtcCommit has to get called previously to this function.

◆ rtcIntersect()

RTCORE_API void rtcIntersect ( RTCScene  scene,
RTCRay &  ray 
)

Intersects a single ray with the scene. The ray has to be aligned to 16 bytes. This function can only be called for scenes with the RTC_INTERSECT1 flag set.

Referenced by igl::embree::EmbreeIntersector::intersectRay(), igl::embree::EmbreeIntersector::intersectRay(), and igl::embree::EmbreeIntersector::intersectSegment().

+ Here is the caller graph for this function:

◆ rtcIntersect16()

RTCORE_API void rtcIntersect16 ( const void valid,
RTCScene  scene,
RTCRay16 &  ray 
)

Intersects a packet of 16 rays with the scene. The valid mask and ray have both to be aligned to 64 bytes. This function can only be called for scenes with the RTC_INTERSECT16 flag set. For performance reasons, the rtcIntersect16 function should only get called if the CPU supports the 16-wide SIMD instructions.

◆ rtcIntersect4()

RTCORE_API void rtcIntersect4 ( const void valid,
RTCScene  scene,
RTCRay4 &  ray 
)

Intersects a packet of 4 rays with the scene. The valid mask and ray have both to be aligned to 16 bytes. This function can only be called for scenes with the RTC_INTERSECT4 flag set.

◆ rtcIntersect8()

RTCORE_API void rtcIntersect8 ( const void valid,
RTCScene  scene,
RTCRay8 &  ray 
)

Intersects a packet of 8 rays with the scene. The valid mask and ray have both to be aligned to 32 bytes. This function can only be called for scenes with the RTC_INTERSECT8 flag set. For performance reasons, the rtcIntersect8 function should only get called if the CPU supports AVX.

◆ rtcIntersectN()

RTCORE_API void rtcIntersectN ( RTCScene  scene,
RTCRay *  rayN,
const size_t  N,
const size_t  stride,
const size_t  flags = RTC_RAYN_DEFAULT 
)

Intersects a stream of N rays in AOS layout with the scene. This function can only be called for scenes with the RTC_INTERSECTN flag set. The stride specifies the offset between rays in bytes.

◆ rtcIntersectN_SOA()

RTCORE_API void rtcIntersectN_SOA ( RTCScene  scene,
RTCRaySOA rayN,
const size_t  N,
const size_t  streams,
const size_t  stride,
const size_t  flags = RTC_RAYN_DEFAULT 
)

Intersects one or multiple streams of N rays in compact SOA layout with the scene. This function can only be called for scenes with the RTC_INTERSECTN flag set. 'streams' specifies the number of dense SOA ray streams, and 'stride' the offset in bytes between those.

◆ rtcNewScene()

Creates a new scene. WARNING: This function is deprecated, use rtcDeviceNewScene instead.

Referenced by igl::embree::EmbreeIntersector::init().

+ Here is the caller graph for this function:

◆ rtcOccluded()

RTCORE_API void rtcOccluded ( RTCScene  scene,
RTCRay &  ray 
)

Tests if a single ray is occluded by the scene. The ray has to be aligned to 16 bytes. This function can only be called for scenes with the RTC_INTERSECT1 flag set.

◆ rtcOccluded16()

RTCORE_API void rtcOccluded16 ( const void valid,
RTCScene  scene,
RTCRay16 &  ray 
)

Tests if a packet of 16 rays is occluded by the scene. The valid mask and ray have both to be aligned to 64 bytes. This function can only be called for scenes with the RTC_INTERSECT16 flag set. For performance reasons, the rtcOccluded16 function should only get called if the CPU supports the 16-wide SIMD instructions.

◆ rtcOccluded4()

RTCORE_API void rtcOccluded4 ( const void valid,
RTCScene  scene,
RTCRay4 &  ray 
)

Tests if a packet of 4 rays is occluded by the scene. This function can only be called for scenes with the RTC_INTERSECT4 flag set. The valid mask and ray have both to be aligned to 16 bytes.

◆ rtcOccluded8()

RTCORE_API void rtcOccluded8 ( const void valid,
RTCScene  scene,
RTCRay8 &  ray 
)

Tests if a packet of 8 rays is occluded by the scene. The valid mask and ray have both to be aligned to 32 bytes. This function can only be called for scenes with the RTC_INTERSECT8 flag set. For performance reasons, the rtcOccluded8 function should only get called if the CPU supports AVX.

◆ rtcOccludedN()

RTCORE_API void rtcOccludedN ( RTCScene  scene,
RTCRay *  rayN,
const size_t  N,
const size_t  stride,
const size_t  flags = RTC_RAYN_DEFAULT 
)

Tests if a stream of N rays on AOS layout is occluded by the scene. This function can only be called for scenes with the RTC_INTERSECTN flag set. The stride specifies the offset between rays in bytes.

◆ rtcOccludedN_SOA()

RTCORE_API void rtcOccludedN_SOA ( RTCScene  scene,
RTCRaySOA rayN,
const size_t  N,
const size_t  streams,
const size_t  stride,
const size_t  flags = RTC_RAYN_DEFAULT 
)

Intersects one or multiple streams of N rays in compact SOA layout with the scene. This function can only be called for scenes with the RTC_INTERSECTN flag set. 'streams' specifies the number of dense SOA ray streams, and 'stride' the offset in bytes between those.

◆ rtcSetProgressMonitorFunction()

RTCORE_API void rtcSetProgressMonitorFunction ( RTCScene  scene,
RTCProgressMonitorFunc  func,
void ptr 
)

Sets the progress callback function which is called during hierarchy build of this scene.

Variable Documentation

◆ RTC_PROGRESS_MONITOR_FUNCTION

RTCORE_DEPRECATED typedef RTCProgressMonitorFunc RTC_PROGRESS_MONITOR_FUNCTION