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