tinypbrt 1.1.1
pbrt-v4 scene file parser for C11 with a header-only C++20 wrapper
Loading...
Searching...
No Matches
shape.hpp
Go to the documentation of this file.
1#pragma once
2#ifndef _TINYPBRT_SHAPE_HPP_
3#define _TINYPBRT_SHAPE_HPP_
4
6
8
13
14namespace tpbrt {
44
51 [[nodiscard]] constexpr std::string_view to_string(const shape_type type) noexcept {
52 using enum shape_type;
53 switch (type) {
54 case BILINEAR_MESH: return "bilinearmesh";
55 case CURVE: return "curve";
56 case CYLINDER: return "cylinder";
57 case DISK: return "disk";
58 case SPHERE: return "sphere";
59 case TRIANGLE_MESH: return "trianglemesh";
60 case PLY_MESH: return "plymesh";
61 case LOOP_SUBDIV: return "loopsubdiv";
62 case MAX_NUM: return "maxnum";
63 default: return "UNKNOWN";
64 }
65 }
66
79
86 [[nodiscard]] constexpr std::string_view to_string(const shape_curve_basis basis) noexcept {
87 using enum shape_curve_basis;
88 switch (basis) {
89 case BEZIER: return "bezier";
90 case BSPLINE: return "bspline";
91 case MAX_NUM: return "maxnum";
92 default: return "UNKNOWN";
93 }
94 }
95
106
113 [[nodiscard]] constexpr std::string_view to_string(const shape_curve_degree degree) noexcept {
114 using enum shape_curve_degree;
115 switch (degree) {
116 case DEGREE_2: return "2";
117 case DEGREE_3: return "3";
118 default: return "UNKNOWN";
119 }
120 }
121
136
143 [[nodiscard]] constexpr std::string_view to_string(const shape_curve_type type) noexcept {
144 using enum shape_curve_type;
145 switch (type) {
146 case FLAT: return "flat";
147 case CYLINDER: return "cylinder";
148 case RIBBON: return "ribbon";
149 case MAX_NUM: return "maxnum";
150 default: return "UNKNOWN";
151 }
152 }
153
158 struct shape_bilinear_mesh_params : detail::wrapper<shape_bilinear_mesh_params, tpbrt_shape_bilinear_mesh_params_t> {
160 using wrapper::wrapper;
161
163 [[nodiscard]] constexpr uint_array indices() const noexcept { return _native->indices; }
164
166 [[nodiscard]] constexpr point3_array p() const noexcept { return _native->p; }
167
169 [[nodiscard]] constexpr normal_array n() const noexcept { return _native->n; }
170
172 [[nodiscard]] constexpr point2_array uv() const noexcept { return _native->uv; }
173
175 [[nodiscard]] constexpr auto reflect() const noexcept { return std::make_tuple(indices(), p(), n(), uv()); }
176 };
177
182 struct shape_curve_params : detail::wrapper<shape_curve_params, tpbrt_shape_curve_params_t> {
185
188
189
191 using wrapper::wrapper;
192
194 [[nodiscard]] constexpr p_array_type p() const noexcept { return _native->p; }
195
197 [[nodiscard]] constexpr n_array_type n() const noexcept { return _native->n; }
198
200 [[nodiscard]] constexpr float_t width() const noexcept { return _native->width; }
201
203 [[nodiscard]] constexpr opt_float width0() const noexcept { return _native->width0; }
204
206 [[nodiscard]] constexpr opt_float width1() const noexcept { return _native->width1; }
207
209 [[nodiscard]] constexpr uint_t split_depth() const noexcept { return _native->split_depth; }
210
212 [[nodiscard]] constexpr shape_curve_basis basis() const noexcept {
213 return static_cast<shape_curve_basis>(_native->basis);
214 }
215
217 [[nodiscard]] constexpr shape_curve_degree degree() const noexcept {
218 return static_cast<shape_curve_degree>(_native->degree);
219 }
220
222 [[nodiscard]] constexpr shape_curve_type type() const noexcept { return static_cast<shape_curve_type>(_native->type); }
223
225 [[nodiscard]] constexpr auto reflect() const noexcept {
226 return std::make_tuple(p(), n(), width(), width0(), width1(), split_depth(), basis(), degree(), type());
227 }
228 };
229
234 struct shape_cylinder_params : detail::wrapper<shape_cylinder_params, tpbrt_shape_cylinder_params_t> {
236 using wrapper::wrapper;
237
239 [[nodiscard]] constexpr float_t radius() const noexcept { return _native->radius; }
240
242 [[nodiscard]] constexpr float_t z_min() const noexcept { return _native->z_min; }
243
245 [[nodiscard]] constexpr float_t z_max() const noexcept { return _native->z_max; }
246
248 [[nodiscard]] constexpr float_t phi_max() const noexcept { return _native->phi_max; }
249
251 [[nodiscard]] constexpr auto reflect() const noexcept { return std::make_tuple(radius(), z_min(), z_max(), phi_max()); }
252 };
253
258 struct shape_disk_params : detail::wrapper<shape_disk_params, tpbrt_shape_disk_params_t> {
260 using wrapper::wrapper;
261
263 [[nodiscard]] constexpr float_t height() const noexcept { return _native->height; }
264
266 [[nodiscard]] constexpr float_t radius() const noexcept { return _native->radius; }
267
269 [[nodiscard]] constexpr float_t inner_radius() const noexcept { return _native->inner_radius; }
270
272 [[nodiscard]] constexpr float_t phi_max() const noexcept { return _native->phi_max; }
273
275 [[nodiscard]] constexpr auto reflect() const noexcept {
276 return std::make_tuple(height(), radius(), inner_radius(), phi_max());
277 }
278 };
279
284 struct shape_sphere_params : detail::wrapper<shape_sphere_params, tpbrt_shape_sphere_params_t> {
286 using wrapper::wrapper;
287
289 [[nodiscard]] constexpr float_t radius() const noexcept { return _native->radius; }
290
292 [[nodiscard]] constexpr float_t z_min() const noexcept { return _native->z_min; }
293
295 [[nodiscard]] constexpr float_t z_max() const noexcept { return _native->z_max; }
296
298 [[nodiscard]] constexpr float_t phi_max() const noexcept { return _native->phi_max; }
299
301 [[nodiscard]] constexpr auto reflect() const noexcept { return std::make_tuple(radius(), z_min(), z_max(), phi_max()); }
302 };
303
308 struct shape_triangle_mesh_params : detail::wrapper<shape_triangle_mesh_params, tpbrt_shape_triangle_mesh_params_t> {
310 using wrapper::wrapper;
311
313 [[nodiscard]] constexpr uint_array indices() const noexcept { return _native->indices; }
314
316 [[nodiscard]] constexpr point3_array p() const noexcept { return _native->p; }
317
319 [[nodiscard]] constexpr normal_array n() const noexcept { return _native->n; }
320
322 [[nodiscard]] constexpr vec3_array s() const noexcept { return _native->s; }
323
325 [[nodiscard]] constexpr point2_array uv() const noexcept { return _native->uv; }
326
328 [[nodiscard]] constexpr auto reflect() const noexcept { return std::make_tuple(indices(), p(), n(), s(), uv()); }
329 };
330
335 struct shape_ply_mesh_params : detail::wrapper<shape_ply_mesh_params, tpbrt_shape_ply_mesh_params_t> {
337 using wrapper::wrapper;
338
340 [[nodiscard]] constexpr string file_name() const noexcept { return _native->file_name; }
341
343 [[nodiscard]] constexpr texture_handle displacement() const noexcept { return _native->displacement; }
344
346 [[nodiscard]] constexpr float_t edge_length() const noexcept { return _native->edge_length; }
347
349 [[nodiscard]] constexpr auto reflect() const noexcept {
350 return std::make_tuple(file_name(), displacement(), edge_length());
351 }
352 };
353
358 struct shape_loop_subdiv_params : detail::wrapper<shape_loop_subdiv_params, tpbrt_shape_loop_subdiv_params_t> {
360 using wrapper::wrapper;
361
363 [[nodiscard]] constexpr uint_array indices() const noexcept { return _native->indices; }
364
366 [[nodiscard]] constexpr point_array p() const noexcept { return _native->p; }
367
369 [[nodiscard]] constexpr uint_t levels() const noexcept { return _native->levels; }
370
372 [[nodiscard]] constexpr auto reflect() const noexcept { return std::make_tuple(indices(), p(), levels()); }
373 };
374
379 struct shape
380 : detail::wrapper<shape, tpbrt_shape_t>,
381 detail::with_variant<shape, shape_bilinear_mesh_params, shape_curve_params, shape_cylinder_params, shape_disk_params,
382 shape_sphere_params, shape_triangle_mesh_params, shape_ply_mesh_params, shape_loop_subdiv_params> {
384 using wrapper::wrapper;
385
387 [[nodiscard]] constexpr texture_handle alpha() const noexcept { return _native->alpha; }
388
390 [[nodiscard]] constexpr transform_animated transform() const noexcept { return _native->transform; }
391
393 [[nodiscard]] constexpr material_handle material() const noexcept { return _native->material; }
394
396 [[nodiscard]] constexpr area_light_handle area_light() const noexcept { return _native->area_light; }
397
399 [[nodiscard]] constexpr media_handle interior_media_handle() const noexcept { return _native->interior_media_handle; }
400
402 [[nodiscard]] constexpr media_handle exterior_media_handle() const noexcept { return _native->exterior_media_handle; }
403
405 [[nodiscard]] constexpr bool_t reverse_orientation() const noexcept { return _native->reverse_orientation; }
406
408 [[nodiscard]] constexpr shape_type type() const noexcept { return static_cast<shape_type>(_native->type); }
409
411 [[nodiscard]] constexpr bool_t is_bilinear_mesh() const noexcept { return type() == shape_type::BILINEAR_MESH; }
412
414 [[nodiscard]] constexpr bool_t is_curve() const noexcept { return type() == shape_type::CURVE; }
415
417 [[nodiscard]] constexpr bool_t is_cylinder() const noexcept { return type() == shape_type::CYLINDER; }
418
420 [[nodiscard]] constexpr bool_t is_disk() const noexcept { return type() == shape_type::DISK; }
421
423 [[nodiscard]] constexpr bool_t is_sphere() const noexcept { return type() == shape_type::SPHERE; }
424
426 [[nodiscard]] constexpr bool_t is_triangle_mesh() const noexcept { return type() == shape_type::TRIANGLE_MESH; }
427
429 [[nodiscard]] constexpr bool_t is_ply_mesh() const noexcept { return type() == shape_type::PLY_MESH; }
430
432 [[nodiscard]] constexpr bool_t is_loop_subdiv() const noexcept { return type() == shape_type::LOOP_SUBDIV; }
433
435 [[nodiscard]] constexpr std::optional<shape_bilinear_mesh_params> as_bilinear_mesh() const noexcept {
436 if (!is_bilinear_mesh()) { return std::nullopt; }
437 return _native->as.bilinear_mesh;
438 }
439
441 [[nodiscard]] constexpr std::optional<shape_curve_params> as_curve() const noexcept {
442 if (!is_curve()) { return std::nullopt; }
443 return _native->as.curve;
444 }
445
447 [[nodiscard]] constexpr std::optional<shape_cylinder_params> as_cylinder() const noexcept {
448 if (!is_cylinder()) { return std::nullopt; }
449 return _native->as.cylinder;
450 }
451
453 [[nodiscard]] constexpr std::optional<shape_disk_params> as_disk() const noexcept {
454 if (!is_disk()) { return std::nullopt; }
455 return _native->as.disk;
456 }
457
459 [[nodiscard]] constexpr std::optional<shape_sphere_params> as_sphere() const noexcept {
460 if (!is_sphere()) { return std::nullopt; }
461 return _native->as.sphere;
462 }
463
465 [[nodiscard]] constexpr std::optional<shape_triangle_mesh_params> as_triangle_mesh() const noexcept {
466 if (!is_triangle_mesh()) { return std::nullopt; }
467 return _native->as.triangle_mesh;
468 }
469
471 [[nodiscard]] constexpr std::optional<shape_ply_mesh_params> as_ply_mesh() const noexcept {
472 if (!is_ply_mesh()) { return std::nullopt; }
473 return _native->as.ply_mesh;
474 }
475
477 [[nodiscard]] constexpr std::optional<shape_loop_subdiv_params> as_loop_subdiv() const noexcept {
478 if (!is_loop_subdiv()) { return std::nullopt; }
479 return _native->as.loop_subdiv;
480 }
481
483 [[nodiscard]] constexpr variant_type to_variant() const noexcept {
484 using enum shape_type;
485 switch (type()) {
486 case BILINEAR_MESH: return _native->as.bilinear_mesh;
487 case CURVE: return _native->as.curve;
488 case CYLINDER: return _native->as.cylinder;
489 case DISK: return _native->as.disk;
490 case SPHERE: return _native->as.sphere;
491 case TRIANGLE_MESH: return _native->as.triangle_mesh;
492 case PLY_MESH: return _native->as.ply_mesh;
493 case LOOP_SUBDIV: return _native->as.loop_subdiv;
494 case MAX_NUM: [[fallthrough]];
495 default: break;
496 }
497 return std::nullopt;
498 }
499
501 [[nodiscard]] constexpr auto reflect() const noexcept {
502 return std::make_tuple(alpha(), transform(), material(), area_light(), interior_media_handle(),
504 }
505 };
506
511 struct shapes_list : array<tpbrt_shapes_list_t, shape, &tpbrt_shapes_list_t::shapes> {
513 using array::array;
514 };
515} // namespace tpbrt
516#endif // _TINYPBRT_SHAPE_HPP_
constexpr std::string_view to_string(const accelerator_type type) noexcept
Converts accelerator_type enum value to string.
Definition accelerator.hpp:39
@ MAX_NUM
Count of available accelerator types.
tpbrt_uchar_t uchar_t
Unsigned char type.
Definition fwd.hpp:34
tpbrt_uint_t uint_t
Unsigned int type.
Definition fwd.hpp:92
bool bool_t
Bool type.
Definition fwd.hpp:82
tpbrt_float_t float_t
Float type.
Definition fwd.hpp:97
shape_curve_type
Curve shape type.
Definition shape.hpp:126
shape_type
Shape types.
Definition shape.hpp:24
shape_curve_basis
Curve shape basis.
Definition shape.hpp:71
shape_curve_degree
Curve shape degree.
Definition shape.hpp:100
@ RIBBON
Curve has a fixed orientation.
@ FLAT
Curve is always oriented to face the incident ray.
@ PLY_MESH
Ply file mesh.
@ BILINEAR_MESH
Bilinear mesh.
@ LOOP_SUBDIV
Loop subdivision.
@ CYLINDER
Cylinder.
@ TRIANGLE_MESH
Triangle mesh.
@ BSPLINE
BSpline curve.
@ TPBRT_SHAPE_CURVE_DEGREE_3
3 Degree.
Definition shape.h:68
@ TPBRT_SHAPE_CURVE_DEGREE_2
2 Degree.
Definition shape.h:66
@ TPBRT_SHAPE_CURVE_TYPE_FLAT
Curve is always oriented to face the incident ray.
Definition shape.h:77
@ TPBRT_SHAPE_CURVE_TYPE_RIBBON
Curve has a fixed orientation.
Definition shape.h:81
@ TPBRT_SHAPE_CURVE_TYPE_CYLINDER
Alternative includes a shading normal that causes the curve to appear to have a cylindrical cross sec...
Definition shape.h:79
@ TPBRT_SHAPE_CURVE_TYPE_MAX_NUM
Count of available curve types.
Definition shape.h:83
@ TPBRT_SHAPE_TYPE_BILINEAR_MESH
Bilinear mesh.
Definition shape.h:28
@ TPBRT_SHAPE_TYPE_SPHERE
Sphere.
Definition shape.h:36
@ TPBRT_SHAPE_TYPE_PLY_MESH
Ply file mesh.
Definition shape.h:40
@ TPBRT_SHAPE_TYPE_LOOP_SUBDIV
Loop subdivision.
Definition shape.h:42
@ TPBRT_SHAPE_TYPE_CYLINDER
Cylinder.
Definition shape.h:32
@ TPBRT_SHAPE_TYPE_TRIANGLE_MESH
Triangle mesh.
Definition shape.h:38
@ TPBRT_SHAPE_TYPE_MAX_NUM
Count of available shape types.
Definition shape.h:44
@ TPBRT_SHAPE_TYPE_DISK
Disk.
Definition shape.h:34
@ TPBRT_SHAPE_TYPE_CURVE
Curve.
Definition shape.h:30
@ TPBRT_SHAPE_CURVE_BASIS_BEZIER
Bezier curve.
Definition shape.h:53
@ TPBRT_SHAPE_CURVE_BASIS_BSPLINE
BSpline curve.
Definition shape.h:55
@ TPBRT_SHAPE_CURVE_BASIS_MAX_NUM
Count of available curve shape basis.
Definition shape.h:57
Definition accelerator.hpp:14
C++ wrapper for tpbrt_area_light_handle_t.
Definition light.hpp:403
Generic C++ array view with type conversion (a non owning view on memory owned by the C library).
Definition common.hpp:448
C++ wrapper for tpbrt_material_handle_t.
Definition material.hpp:81
C++ wrapper for tpbrt_media_handle_t.
Definition media.hpp:458
C++ wrapper for tpbrt_opt_float_t.
Definition math.hpp:24
C++ wrapper for tpbrt_shape_bilinear_mesh_params_t.
Definition shape.hpp:158
constexpr uint_array indices() const noexcept
Returns indices value.
Definition shape.hpp:163
constexpr auto reflect() const noexcept
Conversion to tuple.
Definition shape.hpp:175
constexpr point3_array p() const noexcept
Returns p value.
Definition shape.hpp:166
constexpr point2_array uv() const noexcept
Returns uv value.
Definition shape.hpp:172
constexpr normal_array n() const noexcept
Returns n value.
Definition shape.hpp:169
C++ wrapper for tpbrt_shape_curve_params_t.
Definition shape.hpp:182
constexpr auto reflect() const noexcept
Conversion to tuple.
Definition shape.hpp:225
constexpr shape_curve_basis basis() const noexcept
Returns basis value.
Definition shape.hpp:212
constexpr uint_t split_depth() const noexcept
Returns split_depth value.
Definition shape.hpp:209
constexpr n_array_type n() const noexcept
Returns n value.
Definition shape.hpp:197
constexpr p_array_type p() const noexcept
Returns p value.
Definition shape.hpp:194
constexpr float_t width() const noexcept
Returns width value.
Definition shape.hpp:200
constexpr shape_curve_degree degree() const noexcept
Returns degree value.
Definition shape.hpp:217
constexpr opt_float width1() const noexcept
Returns width1 value.
Definition shape.hpp:206
constexpr opt_float width0() const noexcept
Returns width0 value.
Definition shape.hpp:203
constexpr shape_curve_type type() const noexcept
Returns type value.
Definition shape.hpp:222
C++ wrapper for tpbrt_shape_cylinder_params_t.
Definition shape.hpp:234
constexpr float_t z_max() const noexcept
Returns z_max value.
Definition shape.hpp:245
constexpr float_t radius() const noexcept
Returns radius value.
Definition shape.hpp:239
constexpr float_t phi_max() const noexcept
Returns phi_max value.
Definition shape.hpp:248
constexpr auto reflect() const noexcept
Conversion to tuple.
Definition shape.hpp:251
constexpr float_t z_min() const noexcept
Returns z_min value.
Definition shape.hpp:242
C++ wrapper for tpbrt_shape_disk_params_t.
Definition shape.hpp:258
constexpr float_t phi_max() const noexcept
Returns phi_max value.
Definition shape.hpp:272
constexpr float_t height() const noexcept
Returns height value.
Definition shape.hpp:263
constexpr auto reflect() const noexcept
Conversion to tuple.
Definition shape.hpp:275
constexpr float_t inner_radius() const noexcept
Returns inner_radius value.
Definition shape.hpp:269
constexpr float_t radius() const noexcept
Returns radius value.
Definition shape.hpp:266
C++ wrapper for tpbrt_shape_loop_subdiv_params_t.
Definition shape.hpp:358
constexpr point_array p() const noexcept
Returns p value.
Definition shape.hpp:366
constexpr auto reflect() const noexcept
Conversion to tuple.
Definition shape.hpp:372
constexpr uint_array indices() const noexcept
Returns indices value.
Definition shape.hpp:363
constexpr uint_t levels() const noexcept
Returns levels value.
Definition shape.hpp:369
C++ wrapper for tpbrt_shape_ply_mesh_params_t.
Definition shape.hpp:335
constexpr string file_name() const noexcept
Returns file_name value.
Definition shape.hpp:340
constexpr texture_handle displacement() const noexcept
Returns displacement value.
Definition shape.hpp:343
constexpr float_t edge_length() const noexcept
Returns edge_length value.
Definition shape.hpp:346
constexpr auto reflect() const noexcept
Conversion to tuple.
Definition shape.hpp:349
C++ wrapper for tpbrt_shape_sphere_params_t.
Definition shape.hpp:284
constexpr auto reflect() const noexcept
Conversion to tuple.
Definition shape.hpp:301
constexpr float_t phi_max() const noexcept
Returns phi_max value.
Definition shape.hpp:298
constexpr float_t z_min() const noexcept
Returns z_min value.
Definition shape.hpp:292
constexpr float_t z_max() const noexcept
Returns z_max value.
Definition shape.hpp:295
constexpr float_t radius() const noexcept
Returns radius value.
Definition shape.hpp:289
C++ wrapper for tpbrt_shape_triangle_mesh_params_t.
Definition shape.hpp:308
constexpr normal_array n() const noexcept
Returns n value.
Definition shape.hpp:319
constexpr point3_array p() const noexcept
Returns p value.
Definition shape.hpp:316
constexpr point2_array uv() const noexcept
Returns uv value.
Definition shape.hpp:325
constexpr uint_array indices() const noexcept
Returns indices value.
Definition shape.hpp:313
constexpr vec3_array s() const noexcept
Returns s value.
Definition shape.hpp:322
constexpr auto reflect() const noexcept
Conversion to tuple.
Definition shape.hpp:328
C++ wrapper for tpbrt_shape_t.
Definition shape.hpp:382
constexpr texture_handle alpha() const noexcept
Returns alpha value.
Definition shape.hpp:387
constexpr std::optional< shape_ply_mesh_params > as_ply_mesh() const noexcept
Returns shape parameters as ply_mesh.
Definition shape.hpp:471
constexpr bool_t is_curve() const noexcept
Returns true if type is curve.
Definition shape.hpp:414
constexpr std::optional< shape_disk_params > as_disk() const noexcept
Returns shape parameters as disk.
Definition shape.hpp:453
constexpr material_handle material() const noexcept
Returns material value.
Definition shape.hpp:393
constexpr bool_t is_bilinear_mesh() const noexcept
Returns true if type is bilinear_mesh.
Definition shape.hpp:411
constexpr std::optional< shape_curve_params > as_curve() const noexcept
Returns shape parameters as curve.
Definition shape.hpp:441
constexpr shape_type type() const noexcept
Returns type value.
Definition shape.hpp:408
constexpr std::optional< shape_bilinear_mesh_params > as_bilinear_mesh() const noexcept
Returns shape parameters as bilinear_mesh.
Definition shape.hpp:435
constexpr bool_t is_cylinder() const noexcept
Returns true if type is cylinder.
Definition shape.hpp:417
constexpr bool_t reverse_orientation() const noexcept
Returns reverse_orientation value.
Definition shape.hpp:405
constexpr bool_t is_loop_subdiv() const noexcept
Returns true if type is loop_subdiv.
Definition shape.hpp:432
constexpr std::optional< shape_loop_subdiv_params > as_loop_subdiv() const noexcept
Returns shape parameters as loop_subdiv.
Definition shape.hpp:477
constexpr bool_t is_sphere() const noexcept
Returns true if type is sphere.
Definition shape.hpp:423
constexpr bool_t is_disk() const noexcept
Returns true if type is disk.
Definition shape.hpp:420
constexpr media_handle exterior_media_handle() const noexcept
Returns exterior_media_handle value.
Definition shape.hpp:402
constexpr std::optional< shape_sphere_params > as_sphere() const noexcept
Returns shape parameters as sphere.
Definition shape.hpp:459
constexpr auto reflect() const noexcept
Conversion to tuple.
Definition shape.hpp:501
constexpr area_light_handle area_light() const noexcept
Returns area_light value.
Definition shape.hpp:396
constexpr bool_t is_triangle_mesh() const noexcept
Returns true if type is triangle_mesh.
Definition shape.hpp:426
constexpr media_handle interior_media_handle() const noexcept
Returns interior_media_handle value.
Definition shape.hpp:399
constexpr transform_animated transform() const noexcept
Returns transform value.
Definition shape.hpp:390
constexpr variant_type to_variant() const noexcept
Conversion to variant.
Definition shape.hpp:483
constexpr bool_t is_ply_mesh() const noexcept
Returns true if type is ply_mesh.
Definition shape.hpp:429
constexpr std::optional< shape_cylinder_params > as_cylinder() const noexcept
Returns shape parameters as cylinder.
Definition shape.hpp:447
constexpr std::optional< shape_triangle_mesh_params > as_triangle_mesh() const noexcept
Returns shape parameters as triangle_mesh.
Definition shape.hpp:465
C++ wrapper for tpbrt_shapes_list_t.
Definition shape.hpp:511
C++ wrapper for tpbrt_texture_handle_t.
Definition texture.hpp:53
C++ wrapper for tpbrt_transform_animated_t.
Definition transform.hpp:39
C++ wrapper for tpbrt_uint_array_t.
Definition math.hpp:69
C++ wrapper for tpbrt_vec2_array_t.
Definition math.hpp:198
C++ wrapper for tpbrt_vec3_array_t.
Definition math.hpp:207