cesium-native  0.41.0
Cesium3DTilesSelection::TileSelectionState Class Referencefinal

A description of the state of a Tile during the rendering process. More...

#include <Cesium3DTilesSelection/TileSelectionState.h>

Public Types

enum class  Result {
  None = 0 , Culled = 1 , Rendered = 2 , Refined = 3 ,
  RenderedAndKicked = 4 , RefinedAndKicked = 5
}
 Enumeration of possible results of a TileSelectionState. More...
 

Public Member Functions

constexpr TileSelectionState () noexcept
 Initializes a new instance with TileSelectionState::Result::None.
 
constexpr TileSelectionState (int32_t frameNumber, Result result) noexcept
 Initializes a new instance with a given TileSelectionState::Result. More...
 
constexpr int32_t getFrameNumber () const noexcept
 Gets the frame number in which selection took place.
 
constexpr Result getResult (int32_t frameNumber) const noexcept
 Gets the result of selection. More...
 
constexpr bool wasKicked (int32_t frameNumber) const noexcept
 Determines if this tile or its descendents were kicked from the render list. More...
 
constexpr Result getOriginalResult (int32_t frameNumber) const noexcept
 Gets the original selection result prior to being kicked. More...
 
constexpr void kick () noexcept
 Marks this tile as "kicked".
 

Detailed Description

A description of the state of a Tile during the rendering process.

Instances of this class combine a frame number and a TileSelectionState::Result that describes the actual state of the tile. Instances of this class are stored in a Tile, and are used to track the state of the tile during the rendering process. The Tileset updates this state while traversing the tile hierarchy, tracking whether a tile was rendered, culled, or refined in the last frame.

Definition at line 21 of file TileSelectionState.h.

Member Enumeration Documentation

◆ Result

Enumeration of possible results of a TileSelectionState.

Enumerator
None 

There was no selection result.

This may be the case when the tile wasn't visited last frame.

Culled 

This tile was deemed not visible and culled.

Rendered 

The tile was selected for rendering.

Refined 

This tile did not meet the required screen-space error and was refined.

RenderedAndKicked 

This tile was rendered but then removed from the render list.

This tile was originally rendered, but it got kicked out of the render list in favor of an ancestor because it is not yet renderable.

RefinedAndKicked 

This tile was refined but then removed from the render list.

This tile was originally refined, but its rendered descendants got kicked out of the render list in favor of an ancestor because it is not yet renderable.

Definition at line 26 of file TileSelectionState.h.

Constructor & Destructor Documentation

◆ TileSelectionState()

constexpr Cesium3DTilesSelection::TileSelectionState::TileSelectionState ( int32_t  frameNumber,
Result  result 
)
inlineconstexprnoexcept

Initializes a new instance with a given TileSelectionState::Result.

Parameters
frameNumberThe frame number in which the selection took place.
resultThe result of the selection.

Definition at line 82 of file TileSelectionState.h.

Member Function Documentation

◆ getOriginalResult()

constexpr Result Cesium3DTilesSelection::TileSelectionState::getOriginalResult ( int32_t  frameNumber) const
inlineconstexprnoexcept

Gets the original selection result prior to being kicked.

If the tile wasn't kicked, the original value is returned.

Parameters
frameNumberThe previous frame number.
Returns
The TileSelectionState::Result prior to being kicked.

Definition at line 134 of file TileSelectionState.h.

◆ getResult()

constexpr Result Cesium3DTilesSelection::TileSelectionState::getResult ( int32_t  frameNumber) const
inlineconstexprnoexcept

Gets the result of selection.

The given frame number must match the frame number in which selection last took place. Otherwise, TileSelectionState::Result::None is returned.

Parameters
frameNumberThe previous frame number.
Returns
The TileSelectionState::Result

Definition at line 102 of file TileSelectionState.h.

◆ wasKicked()

constexpr bool Cesium3DTilesSelection::TileSelectionState::wasKicked ( int32_t  frameNumber) const
inlineconstexprnoexcept

Determines if this tile or its descendents were kicked from the render list.

In other words, if its last selection result was TileSelectionState::Result::RenderedAndKicked or TileSelectionState::Result::RefinedAndKicked.

Parameters
frameNumberThe previous frame number.
Returns
true if the tile was kicked, and false otherwise

Definition at line 120 of file TileSelectionState.h.


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