OptiX  3.9
NVIDIA OptiX Acceleration Engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
optix_prime_private.h
1 /*
2  * Copyright (c) 2013 NVIDIA Corporation. All rights reserved.
3  *
4  * NVIDIA Corporation and its licensors retain all intellectual property and proprietary
5  * rights in and to this software, related documentation and any modifications thereto.
6  * Any use, reproduction, disclosure or distribution of this software and related
7  * documentation without an express license agreement from NVIDIA Corporation is strictly
8  * prohibited.
9  *
10  * TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED *AS IS*
11  * AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS OR IMPLIED,
12  * INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
13  * PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA OR ITS SUPPLIERS BE LIABLE FOR ANY
14  * SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT
15  * LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF
16  * BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR
17  * INABILITY TO USE THIS SOFTWARE, EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF
18  * SUCH DAMAGES
19  */
20 
21 // Doxygen-notice: no @file directive prevents this file from being documented
22 
23 #ifndef __optix_optix_prime_internal_h__
24 #define __optix_optix_prime_internal_h__
25 
26 #include "optix_prime.h"
27 
29 enum RTPcontexttypeex
30 {
31  RTP_CONTEXT_TYPE_CPU_NAIVE = 0x110,
32  RTP_CONTEXT_TYPE_CPU_ISPC = 0x111
33 };
34 
35 enum RTPmodelhintex
36 {
37  RTP_MODEL_HINT_INSTANCES_AFTER_COPY_SET = 0x2008
38 };
39 
49 enum RTPbuilderparamex {
50  RTP_BUILDER_PARAM_GENERIC = 0x810,
51  RTP_BUILDER_PARAM_STRING = 0x811
52 };
53 
54 #ifdef __cplusplus
55 extern "C" {
56 #endif
57 
79 RTPresult RTPAPI rtpModelEstimateMemoryUsage( RTPmodel model, RTPsize numIndices, RTPsize numVertices, /*out*/ RTPsize* finalized, /*out*/ RTPsize* maximum );
80 
81 
107 RTPresult RTPAPI rtpModelGetInternals( RTPmodel model, /*out*/ RTPsize* size, /*out*/ void* buffer );
108 
110 {
111  struct BvhNode
112  {
113  float bbmin0[3], bbmax0[3];
114  int index0[2];
115  float bbmin1[3], bbmax1[3];
116  int index1[2];
117  };
118 
120  {
121  float t[4], u[4], v[4];
122  };
123 
124  int numNodes;
125  int numEntities; // number of triangles or instances
126 
127  BvhNode* nodes; // [numNodes]
128  int* remap;
129  WoopTriangle* woopTriangles; // [numEntities] or NULL if using caller triangles
130 
131  int indexStride;
132  int vertexStride;
133  int* indices;
134  float* vertices;
135 
136  int matrixStride;
137  float* invMatrices; // [numEntities]
138  int* instanceToModelId; // [numEntities] Assumes that models are in the order of first appearance in original instance list
139 };
140 
141 
142 #ifdef __cplusplus
143 }
144 #endif
145 
146 #endif /* #ifndef __optix_optix_prime_internal_h__ */
Definition: optix_prime_private.h:109
OptiX Prime public API.
Definition: optix_prime_private.h:119
RTPresult
Definition: optix_prime_declarations.h:34
struct RTPmodel_api * RTPmodel
Definition: optix_prime.h:65
Definition: optix_prime_private.h:111