cesium-native 0.43.0
Loading...
Searching...
No Matches
CesiumGeometry::AvailabilityAccessor Class Reference

Accessor for use with AvailabilityView in order to safely obtain the contents of the view. More...

#include <CesiumGeometry/Availability.h>

Public Member Functions

 AvailabilityAccessor (const AvailabilityView &view, const AvailabilitySubtree &subtree) noexcept
 Creates a new AvailabilityAccessor.
 
bool isBufferView () const noexcept
 Is this AvailabilityAccessor accessing a SubtreeBufferView?
 
bool isConstant () const noexcept
 Is this AvailabilityAccessor accessing a ConstantAvailability?
 
bool getConstant () const
 Obtains the constant value of the AvailabilityView.
 
const std::span< const std::byte > & getBufferAccessor () const
 Obtains an accessor to the buffer used by the AvailabilityView.
 
const std::byte & operator[] (size_t i) const
 Obtains the byte at the given index from the buffer used by the AvailabilityView.
 
size_t size () const
 Obtains the size of the buffer used by the AvailabilityView.
 

Detailed Description

Accessor for use with AvailabilityView in order to safely obtain the contents of the view.

Definition at line 137 of file Availability.h.

Constructor & Destructor Documentation

◆ AvailabilityAccessor()

CesiumGeometry::AvailabilityAccessor::AvailabilityAccessor ( const AvailabilityView & view,
const AvailabilitySubtree & subtree )
noexcept

Creates a new AvailabilityAccessor.

Parameters
viewThe view whose contents will be accessed by this accessor.
subtreeThe subtree that corresponds to the view.

Member Function Documentation

◆ getBufferAccessor()

const std::span< const std::byte > & CesiumGeometry::AvailabilityAccessor::getBufferAccessor ( ) const
inline

Obtains an accessor to the buffer used by the AvailabilityView.

Warning
Unsafe to use if isBufferView is false.
Returns
A reference to the span representing the range of the buffer specified by the SubtreeBufferView.

Definition at line 184 of file Availability.h.

◆ getConstant()

bool CesiumGeometry::AvailabilityAccessor::getConstant ( ) const
inline

Obtains the constant value of the AvailabilityView.

Warning
Unsafe to use if isConstant is false.
Returns
The constant value.

Definition at line 175 of file Availability.h.

◆ isBufferView()

bool CesiumGeometry::AvailabilityAccessor::isBufferView ( ) const
inlinenoexcept

Is this AvailabilityAccessor accessing a SubtreeBufferView?

Returns
True if the AvailabilityView is a SubtreeBufferView with a valid index, offset, and length, or false otherwise.

Definition at line 156 of file Availability.h.

◆ isConstant()

bool CesiumGeometry::AvailabilityAccessor::isConstant ( ) const
inlinenoexcept

Is this AvailabilityAccessor accessing a ConstantAvailability?

Returns
True if the AvailabilityView is a ConstantAvailability, false otherwise.

Definition at line 167 of file Availability.h.

◆ operator[]()

const std::byte & CesiumGeometry::AvailabilityAccessor::operator[] ( size_t i) const
inline

Obtains the byte at the given index from the buffer used by the AvailabilityView.

Warning
Unsafe to use if isBufferView is false.
Returns
The byte at the given index of the buffer accessor.

Definition at line 195 of file Availability.h.

◆ size()

size_t CesiumGeometry::AvailabilityAccessor::size ( ) const
inline

Obtains the size of the buffer used by the AvailabilityView.

Warning
Unsafe to use if isBufferView is false.
Returns
The byteLength property of the SubtreeBufferView.

Definition at line 206 of file Availability.h.


The documentation for this class was generated from the following file: