Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
ph::PrimitiveMetadata Class Referencefinal

Collection of attached components to a primitive. This type effectively "glues" various components that helps to describe additional properties related to a primitive. More...

#include <PrimitiveMetadata.h>

Public Member Functions

 PrimitiveMetadata ()
 
uint8 addChannel (const PrimitiveChannel &channel)
 Adds a channel to the metadata.
 
void setChannel (uint8 channelId, PrimitiveChannel channel)
 
const PrimitiveChannelgetChannel (uint8 channelId) const
 
const PrimitiveChannelgetDefaultChannel () const
 
bool isChannelIdValid (uint8 channelId) const
 
SurfaceBehaviorgetSurface ()
 
VolumeBehaviorgetInterior ()
 
VolumeBehaviorgetExterior ()
 
const SurfaceBehaviorgetSurface () const
 
const VolumeBehaviorgetInterior () const
 
const VolumeBehaviorgetExterior () const
 

Static Public Attributes

static constexpr auto INVALID_CHANNEL_ID = static_cast<uint8>(-1)
 
static constexpr auto DEFAULT_CHANNEL_ID = static_cast<uint8>( 0)
 

Detailed Description

Collection of attached components to a primitive. This type effectively "glues" various components that helps to describe additional properties related to a primitive.

Constructor & Destructor Documentation

◆ PrimitiveMetadata()

ph::PrimitiveMetadata::PrimitiveMetadata ( )

Member Function Documentation

◆ addChannel()

uint8 ph::PrimitiveMetadata::addChannel ( const PrimitiveChannel & channel)

Adds a channel to the metadata.

Returns
The channel's ID. Can be used to access the just-added channel.

◆ getChannel()

const PrimitiveChannel & ph::PrimitiveMetadata::getChannel ( uint8 channelId) const
inline

◆ getDefaultChannel()

const PrimitiveChannel & ph::PrimitiveMetadata::getDefaultChannel ( ) const
inline

◆ getExterior() [1/2]

VolumeBehavior & ph::PrimitiveMetadata::getExterior ( )
inline

◆ getExterior() [2/2]

const VolumeBehavior & ph::PrimitiveMetadata::getExterior ( ) const
inline

◆ getInterior() [1/2]

VolumeBehavior & ph::PrimitiveMetadata::getInterior ( )
inline

◆ getInterior() [2/2]

const VolumeBehavior & ph::PrimitiveMetadata::getInterior ( ) const
inline

◆ getSurface() [1/2]

SurfaceBehavior & ph::PrimitiveMetadata::getSurface ( )
inline

◆ getSurface() [2/2]

const SurfaceBehavior & ph::PrimitiveMetadata::getSurface ( ) const
inline

◆ isChannelIdValid()

bool ph::PrimitiveMetadata::isChannelIdValid ( uint8 channelId) const
inline

◆ setChannel()

void ph::PrimitiveMetadata::setChannel ( uint8 channelId,
PrimitiveChannel channel )

Member Data Documentation

◆ DEFAULT_CHANNEL_ID

auto ph::PrimitiveMetadata::DEFAULT_CHANNEL_ID = static_cast<uint8>( 0)
staticconstexpr

◆ INVALID_CHANNEL_ID

auto ph::PrimitiveMetadata::INVALID_CHANNEL_ID = static_cast<uint8>(-1)
staticconstexpr

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