tinypbrt 1.1.1
pbrt-v4 scene file parser for C11 with a header-only C++20 wrapper
Loading...
Searching...
No Matches
object_instance.hpp
Go to the documentation of this file.
1#pragma once
2#ifndef _TINYPBRT_OBJECT_INSTANCE_HPP_
3#define _TINYPBRT_OBJECT_INSTANCE_HPP_
4
6
8
10
11namespace tpbrt {
21 struct object_instance : detail::wrapper<object_instance, tpbrt_object_instance_t> {
23 using wrapper::wrapper;
24
26 [[nodiscard]] constexpr object_handle object() const noexcept { return _native->object; }
27
29 [[nodiscard]] constexpr transform_animated transform() const noexcept { return _native->transform; }
30
32 [[nodiscard]] constexpr auto reflect() const noexcept { return std::make_tuple(object(), transform()); }
33 };
34
40 : array<tpbrt_objects_instances_list_t, object_instance, &tpbrt_objects_instances_list_t::instances> {
42 using array::array;
43 };
44} // namespace tpbrt
45#endif // _TINYPBRT_OBJECT_INSTANCE_HPP_
Definition accelerator.hpp:14
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_object_handle_t.
Definition object.hpp:48
C++ wrapper for tpbrt_object_instance_t.
Definition object_instance.hpp:21
constexpr transform_animated transform() const noexcept
Returns transform value.
Definition object_instance.hpp:29
constexpr auto reflect() const noexcept
Conversion to tuple.
Definition object_instance.hpp:32
constexpr object_handle object() const noexcept
Returns object value.
Definition object_instance.hpp:26
C++ wrapper for tpbrt_objects_instances_list_t.
Definition object_instance.hpp:40
C++ wrapper for tpbrt_transform_animated_t.
Definition transform.hpp:39