1rtcNewGeometry(3)        Embree Ray Tracing Kernels 3        rtcNewGeometry(3)
2
3
4
5   NAME
6              rtcNewGeometry - creates a new geometry object
7
8   SYNOPSIS
9              #include <embree3/rtcore.h>
10
11              enum RTCGeometryType
12              {
13               RTC_GEOMETRY_TYPE_TRIANGLE,
14               RTC_GEOMETRY_TYPE_QUAD,
15               RTC_GEOMETRY_TYPE_SUBDIVISION,
16               RTC_GEOMETRY_TYPE_FLAT_LINEAR_CURVE,
17               RTC_GEOMETRY_TYPE_FLAT_BEZIER_CURVE,
18               RTC_GEOMETRY_TYPE_FLAT_BSPLINE_CURVE,
19               RTC_GEOMETRY_TYPE_FLAT_HERMITE_CURVE,
20               RTC_GEOMETRY_TYPE_FLAT_CATMULL_ROM_CURVE,
21               RTC_GEOMETRY_TYPE_NORMAL_ORIENTED_BEZIER_CURVE,
22               RTC_GEOMETRY_TYPE_NORMAL_ORIENTED_BSPLINE_CURVE,
23               RTC_GEOMETRY_TYPE_NORMAL_ORIENTED_HERMITE_CURVE,
24               RTC_GEOMETRY_TYPE_NORMAL_ORIENTED_CATMULL_ROM_CURVE,
25               RTC_GEOMETRY_TYPE_ROUND_LINEAR_CURVE,
26               RTC_GEOMETRY_TYPE_ROUND_BEZIER_CURVE,
27               RTC_GEOMETRY_TYPE_ROUND_BSPLINE_CURVE,
28               RTC_GEOMETRY_TYPE_ROUND_HERMITE_CURVE,
29               RTC_GEOMETRY_TYPE_ROUND_CATMULL_ROM_CURVE,
30               RTC_GEOMETRY_TYPE_GRID,
31               RTC_GEOMETRY_TYPE_SPHERE_POINT,
32               RTC_GEOMETRY_TYPE_DISC_POINT,
33               RTC_GEOMETRY_TYPE_ORIENTED_DISC_POINT,
34               RTC_GEOMETRY_TYPE_USER,
35               RTC_GEOMETRY_TYPE_INSTANCE
36              };
37
38              RTCGeometry rtcNewGeometry(
39                RTCDevice device,
40                enum RTCGeometryType type
41              );
42
43   DESCRIPTION
44       Geometries  are  objects  that  represent an array of primitives of the
45       same type.  The rtcNewGeometry function creates a new geometry of spec‐
46       ified  type (type argument) bound to the specified device (device argu‐
47       ment) and returns a handle to this geometry.  The  geometry  object  is
48       reference  counted  with an initial reference count of 1.  The geometry
49       handle can be released using the rtcReleaseGeometry API call.
50
51       Supported geometry types are triangle meshes  (RTC_GEOMETRY_TYPE_TRIAN‐
52       GLE  type), quad meshes (triangle pairs) (RTC_GEOMETRY_TYPE_QUAD type),
53       Catmull-Clark   subdivision   surfaces   (RTC_GEOMETRY_TYPE_SUBDIVISION
54       type),    curve    geometries    with   different   bases   (RTC_GEOME‐
55       TRY_TYPE_FLAT_LINEAR_CURVE, RTC_GEOMETRY_TYPE_FLAT_BEZIER_CURVE,
56       RTC_GEOMETRY_TYPE_FLAT_BSPLINE_CURVE,       RTC_GEOMETRY_TYPE_FLAT_HER‐
57       MITE_CURVE,
58       RTC_GEOMETRY_TYPE_FLAT_CATMULL_ROM_CURVE, RTC_GEOMETRY_TYPE_NORMAL_ORI‐
59       ENTED_BEZIER_CURVE,    RTC_GEOMETRY_TYPE_NORMAL_ORIENTED_BSPLINE_CURVE,
60       RTC_GEOMETRY_TYPE_NORMAL_ORIENTED_HERMITE_CURVE, RTC_GEOMETRY_TYPE_NOR‐
61       MAL_ORIENTED_CATMULL_ROM_CURVE,   RTC_GEOMETRY_TYPE_ROUND_LINEAR_CURVE,
62       RTC_GEOMETRY_TYPE_ROUND_BEZIER_CURVE,                        RTC_GEOME‐
63       TRY_TYPE_ROUND_BSPLINE_CURVE,    RTC_GEOMETRY_TYPE_ROUND_HERMITE_CURVE,
64       RTC_GEOMETRY_TYPE_ROUND_CATMULL_ROM_CURVE types) grid meshes (RTC_GEOM‐
65       ETRY_TYPE_GRID),  point   geometries   (RTC_GEOMETRY_TYPE_SPHERE_POINT,
66       RTC_GEOMETRY_TYPE_DISC_POINT,  RTC_TYPE_ORIENTED_DISC_POINT),  user-de‐
67       fined geometries (RTC_GEOMETRY_TYPE_USER),  and  instances  (RTC_GEOME‐
68       TRY_TYPE_INSTANCE).
69
70       The      types     RTC_GEOMETRY_TYPE_ROUND_BEZIER_CURVE,     RTC_GEOME‐
71       TRY_TYPE_ROUND_BSPLINE_CURVE,     and      RTC_GEOMETRY_TYPE_ROUND_CAT‐
72       MULL_ROM_CURVE will treat the curve as a sweep surface of a varying-ra‐
73       dius circle swept tangentially along the curve.  The  types  RTC_GEOME‐
74       TRY_TYPE_FLAT_BEZIER_CURVE,  RTC_GEOMETRY_TYPE_FLAT_BSPLINE_CURVE,  and
75       RTC_GEOMETRY_TYPE_FLAT_CATMULL_ROM_CURVE use ray-facing  ribbons  as  a
76       faster-to-intersect approximation.
77
78       After  construction, geometries are enabled by default and not attached
79       to any scene.  Geometries can be  disabled  (rtcDisableGeometry  call),
80       and enabled again (rtcEnableGeometry call).  A geometry can be attached
81       to multiple scenes using the rtcAttachGeometry call (or rtcAttachGeome‐
82       tryByID  call),  and detached using the rtcDetachGeometry call.  During
83       attachment, a geometry ID is assigned to the geometry (or  assigned  by
84       the  user  when  using  the rtcAttachGeometryByID call), which uniquely
85       identifies the geometry inside that scene.  This identifier is returned
86       when  primitives  of  the geometry are hit in later ray queries for the
87       scene.
88
89       Geometries can also be modified, including their vertex and index  buf‐
90       fers.  After modifying a buffer, rtcUpdateGeometryBuffer must be called
91       to notify that the buffer got modified.
92
93       The application can use the rtcSetGeometryUserData function  to  set  a
94       user  data  pointer  to its own geometry representation, and later read
95       out this pointer using the rtcGetGeometryUserData function.
96
97       After setting up the geometry or modifying it,  rtcCommitGeometry  must
98       be called to finish the geometry setup.  After committing the geometry,
99       vertex data interpolation can be performed using the rtcInterpolate and
100       rtcInterpolateN functions.
101
102       A  build quality can be specified for a geometry using the rtcSetGeome‐
103       tryBuildQuality function, to  balance  between  acceleration  structure
104       build performance and ray query performance.  The build quality per ge‐
105       ometry will be used if a two-level acceleration structure is built  in‐
106       ternally,  which is the case if the RTC_BUILD_QUALITY_LOW is set as the
107       scene build quality.  See Section  [rtcSetSceneBuildQuality]  for  more
108       details.
109
110   EXIT STATUS
111       On  failure  NULL  is  returned  and  an  error code is set that can be
112       queried using rtcGetDeviceError.
113
114   SEE ALSO
115       [rtcEnableGeometry], [rtcDisableGeometry], [rtcAttachGeometry], [rtcAt‐
116       tachGeometryByID], [rtcUpdateGeometryBuffer], [rtcSetGeometryUserData],
117       [rtcGetGeometryUserData],    [rtcCommitGeometry],     [rtcInterpolate],
118       [rtcInterpolateN], [rtcSetGeometryBuildQuality], [rtcSetSceneBuildQual‐
119       ity], [RTC_GEOMETRY_TYPE_TRIANGLE], [RTC_GEOMETRY_TYPE_QUAD],  [RTC_GE‐
120       OMETRY_TYPE_SUBDIVISION],     [RTC_GEOMETRY_TYPE_CURVE],    [RTC_GEOME‐
121       TRY_TYPE_GRID],  [RTC_GEOMETRY_TYPE_POINT],   [RTC_GEOMETRY_TYPE_USER],
122       [RTC_GEOMETRY_TYPE_INSTANCE]
123
124
125
126                                                             rtcNewGeometry(3)
Impressum