![]() |
Prusa Slicer 2.6.0
|
#include <stddef.h>#include <sys/types.h>#include "rtcore_scene.h"#include "rtcore_geometry.h"#include "rtcore_geometry_user.h"
Include dependency graph for rtcore.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Classes | |
| struct | __RTCDevice |
| Defines an opaque device type. More... | |
Macros | |
| #define | RTCORE_API extern "C" |
| #define | RTCORE_ALIGN(...) __attribute__((aligned(__VA_ARGS__))) |
| #define | RTCORE_DEPRECATED |
| #define | RTCORE_VERSION_MAJOR 2 |
| #define | RTCORE_VERSION_MINOR 9 |
| #define | RTCORE_VERSION_PATCH 0 |
| #define | RTCORE_VERSION 20900 |
| enum | RTCParameter { RTC_SOFTWARE_CACHE_SIZE = 0 , RTC_CONFIG_INTERSECT1 = 1 , RTC_CONFIG_INTERSECT4 = 2 , RTC_CONFIG_INTERSECT8 = 3 , RTC_CONFIG_INTERSECT16 = 4 , RTC_CONFIG_INTERSECTN = 5 , RTC_CONFIG_RAY_MASK = 6 , RTC_CONFIG_BACKFACE_CULLING = 7 , RTC_CONFIG_INTERSECTION_FILTER = 8 , RTC_CONFIG_INTERSECTION_FILTER_RESTORE = 9 , RTC_CONFIG_BUFFER_STRIDE = 10 , RTC_CONFIG_IGNORE_INVALID_RAYS = 11 , RTC_CONFIG_TASKING_SYSTEM = 12 , RTC_CONFIG_VERSION_MAJOR = 13 , RTC_CONFIG_VERSION_MINOR = 14 , RTC_CONFIG_VERSION_PATCH = 15 , RTC_CONFIG_VERSION = 16 } |
| Parameters that can get configured using the rtcSetParameter functions. More... | |
| enum | RTCError { RTC_NO_ERROR = 0 , RTC_UNKNOWN_ERROR = 1 , RTC_INVALID_ARGUMENT = 2 , RTC_INVALID_OPERATION = 3 , RTC_OUT_OF_MEMORY = 4 , RTC_UNSUPPORTED_CPU = 5 , RTC_CANCELLED = 6 } |
| Error codes returned by the rtcGetError function. More... | |
| typedef struct __RTCDevice * | RTCDevice |
| Defines an opaque device type. | |
| typedef void(* | RTCErrorFunc) (const RTCError code, const char *str) |
| Type of error callback function. | |
| typedef bool(* | RTCMemoryMonitorFunc) (const ssize_t bytes, const bool post) |
| Type of memory consumption callback function. | |
| RTCORE_DEPRECATED typedef RTCErrorFunc | RTC_ERROR_FUNCTION |
| RTCORE_DEPRECATED typedef RTCMemoryMonitorFunc | RTC_MEMORY_MONITOR_FUNCTION |
| struct | RTCORE_ALIGN (16) RTCBounds |
| RTCORE_API RTCDevice | rtcNewDevice (const char *cfg=NULL) |
| Creates a new Embree device. | |
| RTCORE_API void | rtcDeleteDevice (RTCDevice device) |
| Deletes an Embree device. | |
| RTCORE_API RTCORE_DEPRECATED void | rtcInit (const char *cfg=NULL) |
| Initializes the Embree ray tracing core. | |
| RTCORE_API RTCORE_DEPRECATED void | rtcExit () |
| Shuts down Embree. | |
| RTCORE_API RTCORE_DEPRECATED void | rtcSetParameter1i (const RTCParameter parm, ssize_t val) |
| Configures some parameters. WARNING: This function is deprecated, use rtcDeviceSetParameter1i instead. | |
| RTCORE_API RTCORE_DEPRECATED ssize_t | rtcGetParameter1i (const RTCParameter parm) |
| Reads some device parameter. WARNING: This function is deprecated, use rtcDeviceGetParameter1i instead. | |
| RTCORE_API void | rtcDeviceSetParameter1i (RTCDevice device, const RTCParameter parm, ssize_t val) |
| Configures some device parameters. | |
| RTCORE_API ssize_t | rtcDeviceGetParameter1i (RTCDevice device, const RTCParameter parm) |
| Reads some device parameter. | |
| RTCORE_API RTCORE_DEPRECATED RTCError | rtcGetError () |
| Returns the value of the per-thread error flag. | |
| RTCORE_API RTCError | rtcDeviceGetError (RTCDevice device) |
| Returns the value of the per-thread error flag. | |
| RTCORE_API RTCORE_DEPRECATED void | rtcSetErrorFunction (RTCErrorFunc func) |
| Sets a callback function that is called whenever an error occurs. WARNING: This function is deprecated, use rtcDeviceSetErrorFunction instead. | |
| RTCORE_API void | rtcDeviceSetErrorFunction (RTCDevice device, RTCErrorFunc func) |
| Sets a callback function that is called whenever an error occurs. | |
| RTCORE_API RTCORE_DEPRECATED void | rtcSetMemoryMonitorFunction (RTCMemoryMonitorFunc func) |
| Sets the memory consumption callback function which is called before or after the library allocates or frees memory. WARNING: This function is deprecated, use rtcDeviceSetMemoryMonitorFunction instead. | |
| RTCORE_API void | rtcDeviceSetMemoryMonitorFunction (RTCDevice device, RTCMemoryMonitorFunc func) |
| Sets the memory consumption callback function which is called before or after the library allocates or frees memory. | |
| RTCORE_API RTCORE_DEPRECATED void | rtcDebug () |
| Implementation specific (do not call). | |
| RTCSceneFlags | operator| (const RTCSceneFlags a, const RTCSceneFlags b) |
| Helper to easily combing scene flags. | |
| RTCAlgorithmFlags | operator| (const RTCAlgorithmFlags a, const RTCAlgorithmFlags b) |
| Helper to easily combing algorithm flags. | |
| RTCGeometryFlags | operator| (const RTCGeometryFlags a, const RTCGeometryFlags b) |
| Helper to easily combing geometry flags. | |
Defines the Embree Ray Tracing Kernel API for C and C++
This file defines the Embree ray tracing kernel API for C and C++. The user is supposed to include this file, and alternatively the rtcore_ray.h file, but none of the other .h files in this folder.
Definition in file rtcore.h.
| struct __RTCDevice |
Defines an opaque device type.
| #define RTCORE_ALIGN | ( | ... | ) | __attribute__((aligned(__VA_ARGS__))) |
| #define RTCORE_API extern "C" |
| #define RTCORE_DEPRECATED |
| #define RTCORE_VERSION 20900 |
| #define RTCORE_VERSION_MAJOR 2 |
Embree API version
| #define RTCORE_VERSION_MINOR 9 |
| #define RTCORE_VERSION_PATCH 0 |
| typedef struct __RTCDevice* RTCDevice |
Defines an opaque device type.
Type of error callback function.
Type of memory consumption callback function.
| enum RTCError |
Error codes returned by the rtcGetError function.
| enum RTCParameter |
Parameters that can get configured using the rtcSetParameter functions.
|
inline |
Helper to easily combing algorithm flags.
|
inline |
Helper to easily combing geometry flags.
|
inline |
Helper to easily combing scene flags.
| RTCORE_API RTCORE_DEPRECATED void rtcDebug | ( | ) |
Implementation specific (do not call).
This function is implementation specific and only for debugging purposes. Do not call it.
| RTCORE_API void rtcDeleteDevice | ( | RTCDevice | device | ) |
Deletes an Embree device.
Deletes the Embree device again. After deletion, all scene handles are invalid. The application should invoke this call before terminating.
| RTCORE_API RTCError rtcDeviceGetError | ( | RTCDevice | device | ) |
Returns the value of the per-thread error flag.
If an error occurs this flag is set to an error code if it stores no previous error. The rtcGetError function reads and returns the currently stored error and clears the error flag again.
| RTCORE_API ssize_t rtcDeviceGetParameter1i | ( | RTCDevice | device, |
| const RTCParameter | parm | ||
| ) |
Reads some device parameter.
| RTCORE_API void rtcDeviceSetErrorFunction | ( | RTCDevice | device, |
| RTCErrorFunc | func | ||
| ) |
Sets a callback function that is called whenever an error occurs.
| RTCORE_API void rtcDeviceSetMemoryMonitorFunction | ( | RTCDevice | device, |
| RTCMemoryMonitorFunc | func | ||
| ) |
Sets the memory consumption callback function which is called before or after the library allocates or frees memory.
| RTCORE_API void rtcDeviceSetParameter1i | ( | RTCDevice | device, |
| const RTCParameter | parm, | ||
| ssize_t | val | ||
| ) |
Configures some device parameters.
| RTCORE_API RTCORE_DEPRECATED void rtcExit | ( | ) |
Shuts down Embree.
WARNING: This function is deprecated, use rtcDeleteDevice instead.
Shuts down the ray tracing core. After shutdown, all scene handles are invalid, and invoking any API call except rtcInit is not allowed. The application should invoke this call before terminating. It is safe to call rtcInit again after an rtcExit call.
Referenced by igl::embree::EmbreeIntersector::global_deinit().
Here is the caller graph for this function:| RTCORE_API RTCORE_DEPRECATED RTCError rtcGetError | ( | ) |
Returns the value of the per-thread error flag.
WARNING: This function is deprecated, use rtcDeviceGetError instead.
If an error occurs this flag is set to an error code if it stores no previous error. The rtcGetError function reads and returns the currently stored error and clears the error flag again.
Referenced by igl::embree::EmbreeIntersector::deinit(), igl::embree::EmbreeIntersector::global_init(), igl::embree::EmbreeIntersector::init(), and igl::embree::EmbreeIntersector::intersectRay().
Here is the caller graph for this function:| RTCORE_API RTCORE_DEPRECATED ssize_t rtcGetParameter1i | ( | const RTCParameter | parm | ) |
Reads some device parameter. WARNING: This function is deprecated, use rtcDeviceGetParameter1i instead.
| RTCORE_API RTCORE_DEPRECATED void rtcInit | ( | const char * | cfg = NULL | ) |
Initializes the Embree ray tracing core.
WARNING: This function is deprecated, use rtcNewDevice instead.
Initializes the ray tracing core and passed some configuration string. The configuration string allows to configure implementation specific parameters. If this string is NULL, a default configuration is used. The following configuration flags are supported by the Embree implementation of the API:
verbose = num, // sets verbosity level (default is 0)
If Embree is started on an unsupported CPU, rtcInit will fail and set the RTC_UNSUPPORTED_CPU error code.
Referenced by igl::embree::EmbreeIntersector::global_init().
Here is the caller graph for this function:| RTCORE_API RTCDevice rtcNewDevice | ( | const char * | cfg = NULL | ) |
Creates a new Embree device.
Creates a new Embree device to be used by the application. An application typically creates only a single Embree device, but it is valid to use multiple devices inside an application. A configuration string can be passed at construction time, that allows to configure implementation specific parameters. If this string is NULL, a default configuration is used. The following configuration flags are supported by the Embree implementation of the API:
verbose = num, // sets verbosity level (default is 0)
If Embree is started on an unsupported CPU, rtcNewDevice will fail and set the RTC_UNSUPPORTED_CPU error code.
| struct RTCORE_ALIGN | ( | 16 | ) |
Axis aligned bounding box representation
Ray structure for packets of 4 rays.
< x coordinate of ray origin
< y coordinate of ray origin
< z coordinate of ray origin
< x coordinate of ray direction
< y coordinate of ray direction
< z coordinate of ray direction
< Start of ray segment
< End of ray segment (set to hit distance)
< Time of this ray for motion blur
< Used to mask out objects during traversal
< x coordinate of geometry normal
< y coordinate of geometry normal
< z coordinate of geometry normal
< Barycentric u coordinate of hit
< Barycentric v coordinate of hit
< geometry ID
< primitive ID
< instance ID
| RTCORE_API RTCORE_DEPRECATED void rtcSetErrorFunction | ( | RTCErrorFunc | func | ) |
Sets a callback function that is called whenever an error occurs. WARNING: This function is deprecated, use rtcDeviceSetErrorFunction instead.
| RTCORE_API RTCORE_DEPRECATED void rtcSetMemoryMonitorFunction | ( | RTCMemoryMonitorFunc | func | ) |
Sets the memory consumption callback function which is called before or after the library allocates or frees memory. WARNING: This function is deprecated, use rtcDeviceSetMemoryMonitorFunction instead.
| RTCORE_API RTCORE_DEPRECATED void rtcSetParameter1i | ( | const RTCParameter | parm, |
| ssize_t | val | ||
| ) |
Configures some parameters. WARNING: This function is deprecated, use rtcDeviceSetParameter1i instead.
| RTCORE_DEPRECATED typedef RTCErrorFunc RTC_ERROR_FUNCTION |
| RTCORE_DEPRECATED typedef RTCMemoryMonitorFunc RTC_MEMORY_MONITOR_FUNCTION |