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 PrimitiveChannel & getChannel (uint8 channelId) const
 
const PrimitiveChannel & getDefaultChannel () const
 
bool isChannelIdValid (uint8 channelId) const
 
SurfaceBehavior & getSurface ()
 
VolumeBehavior & getInterior ()
 
VolumeBehavior & getExterior ()
 
const SurfaceBehavior & getSurface () const
 
const VolumeBehavior & getInterior () const
 
const VolumeBehavior & getExterior () 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: