|
| using | traits = detail::array_traits< NativeVec, DataField > |
| | Array traits.
|
| |
| using | native_element_type = traits::native_element_type |
| | Native C library array element type.
|
| |
| using | element_type = std::conditional_t< std::is_void_v< float_t >, native_element_type, float_t > |
| | C++ array view element type.
|
| |
| using | value_type = element_type |
| | Value type (as in std::span).
|
| |
| using | span_type = traits::span_type |
| | std::span type of this array.
|
| |
| using | iterator = std::conditional_t< IsIdentity, typename span_type::iterator, detail::converting_iterator< native_element_type, element_type > > |
| | Iterator type.
|
| |
| using | reference = std::conditional_t< IsIdentity, const native_element_type &, element_type > |
| | Type returned by operator[] (a reference for identity arrays, a converted value otherwise).
|
| |
| constexpr size_t | size () const noexcept |
| | Returns size of this array.
|
| |
| constexpr bool_t | empty () const noexcept |
| | Returns true if array is empty.
|
| |
| constexpr const native_element_type * | data () const noexcept |
| | Returns pointer to the C data.
|
| |
| constexpr span_type | to_span () const noexcept |
| | Returns std::span over the C data.
|
| |
| constexpr iterator | begin () const noexcept |
| | Returns begin iterator.
|
| |
| constexpr iterator | end () const noexcept |
| | Returns end iterator.
|
| |
| constexpr reference | operator[] (const size_t index) const noexcept |
| | Returns element on given index (unchecked, like std::span).
|
| |
| constexpr result< element_type > | at (const size_t index) const noexcept |
| | Returns element on given index or error::INDEX_OUT_OF_RANGE.
|
| |
| constexpr reference | front () const noexcept |
| | Returns first element (unchecked).
|
| |
| constexpr reference | back () const noexcept |
| | Returns last element (unchecked).
|
| |
| constexpr auto | operator<=> (const array &rhs) const noexcept |
| | Three-way comparison operator (compares elements).
|
| |
| constexpr bool_t | operator== (const array &rhs) const noexcept |
| | Equality operator (compares elements).
|
| |
| constexpr span_type | _raw_span () const noexcept |
| | Returns std::span over the C data.
|
| |
template<class NativeVec>
struct tpbrt::vec_base< NativeVec >
Generic C++ wrapper for all tpbrt_vec*_t types.
- Template Parameters
-
| NativeVec | Type of the C struct. |