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_NORMAL_ORIENTED_BEZIER_CURVE,  RTC_GEOMETRY_TYPE_NOR‐
52       MAL_ORIENTED_BSPLINE_CURVE    types),    grid    meshes     (RTC_GEOME‐
53       TRY_TYPE_GRID),   point   geometries   (RTC_GEOMETRY_TYPE_SPHERE_POINT,
54       RTC_GEOMETRY_TYPE_DISC_POINT,            RTC_TYPE_ORIENTED_DISC_POINT),
55       user-defined   geometries   (RTC_GEOMETRY_TYPE_USER),   and   instances
56       (RTC_GEOMETRY_TYPE_INSTANCE).
57
58       The   types   RTC_GEOMETRY_TYPE_ROUND_BEZIER_CURVE    and    RTC_GEOME‐
59       TRY_TYPE_ROUND_BSPLINE_CURVE will treat the curve as a sweep surface of
60       a varying-radius circle swept tangentially along the curve.  The  types
61       RTC_GEOMETRY_TYPE_FLAT_BEZIER_CURVE            and           RTC_GEOME‐
62       TRY_TYPE_FLAT_BSPLINE_CURVE    use    ray-facing    ribbons    as     a
63       faster-to-intersect approximation.
64
65       After  construction, geometries are enabled by default and not attached
66       to any scene.  Geometries can be  disabled  (rtcDisableGeometry  call),
67       and enabled again (rtcEnableGeometry call).  A geometry can be attached
68       to a single scene using the rtcAttachGeometry call (or  rtcAttachGeome‐
69       tryByID  call),  and detached using the rtcDetachGeometry call.  During
70       attachment, a geometry ID is assigned to the geometry (or  assigned  by
71       the  user  when  using  the rtcAttachGeometryByID call), which uniquely
72       identifies the geometry inside that scene.  This identifier is returned
73       when  primitives  of  the geometry are hit in later ray queries for the
74       scene.
75
76       Geometries can also be modified, including their vertex and index  buf‐
77       fers.  After modifying a buffer, rtcUpdateGeometryBuffer must be called
78       to notify that the buffer got modified.
79
80       The application can use the rtcSetGeometryUserData function  to  set  a
81       user  data  pointer  to its own geometry representation, and later read
82       out this pointer using the rtcGetGeometryUserData function.
83
84       After setting up the geometry or modifying it,  rtcCommitGeometry  must
85       be called to finish the geometry setup.  After committing the geometry,
86       vertex data interpolation can be performed using the rtcInterpolate and
87       rtcInterpolateN functions.
88
89       A  build quality can be specified for a geometry using the rtcSetGeome‐
90       tryBuildQuality function, to  balance  between  acceleration  structure
91       build  performance  and  ray  query performance.  The build quality per
92       geometry will be used if a two-level acceleration  structure  is  built
93       internally,  which  is  the case if the RTC_BUILD_QUALITY_LOW is set as
94       the scene build quality.   See  Section  [rtcSetSceneBuildQuality]  for
95       more details.
96
97   EXIT STATUS
98       On  failure  NULL  is  returned  and  an  error code is set that can be
99       queried using rtcGetDeviceError.
100
101   SEE ALSO
102       [rtcEnableGeometry], [rtcDisableGeometry], [rtcAttachGeometry], [rtcAt‐
103       tachGeometryByID], [rtcUpdateGeometryBuffer], [rtcSetGeometryUserData],
104       [rtcGetGeometryUserData],    [rtcCommitGeometry],     [rtcInterpolate],
105       [rtcInterpolateN], [rtcSetGeometryBuildQuality], [rtcSetSceneBuildQual‐
106       ity],      [RTC_GEOMETRY_TYPE_TRIANGLE],      [RTC_GEOMETRY_TYPE_QUAD],
107       [RTC_GEOMETRY_TYPE_SUBDIVISION], [RTC_GEOMETRY_TYPE_CURVE], [RTC_GEOME‐
108       TRY_TYPE_GRID],  [RTC_GEOMETRY_TYPE_POINT],   [RTC_GEOMETRY_TYPE_USER],
109       [RTC_GEOMETRY_TYPE_INSTANCE]
110
111
112
113                                                             rtcNewGeometry(3)
Impressum