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