DD::Image::ChannelMap Class Reference

Public Member Functions

 ChannelMap ()
 make an empty channel map
 
 ChannelMap (const DD::Image::ChannelSet &channels)
 make a channel map based on a ChannelSet
 
 operator const ChannelSet & () const
 get a reference to the ChannelSet
 
bool contains (DD::Image::Channel z) const
 return whether or not the channel passed in is part of this set
 
size_t size () const
 return the number of channels in this map
 
bool empty () const
 return whether this ChannelMap is empty
 
bool containsAll (const DD::Image::ChannelSet &want) const
 returns true if this ChannelMap contains all of the channels in want
 
int chanNo (Channel z) const
 
bool operator== (const ChannelMap &chans) const
 compare to another ChannelMap. Returns true if they represent the same channels.
 
bool operator== (const ChannelSet &chans) const
 compare to a ChannelSet. Returns true if they represent the same channels.
 

Detailed Description

Helper class for doing quick lookups of channels within a ChannelSet

Member Function Documentation

int DD::Image::ChannelMap::chanNo ( Channel  z) const
inline

return the index of the passed in channel within the ChannelMap (e.g. Chan_Green in Mask_RGB is 1), Chan_Alpha in Mask_RGBA is 3

Referenced by DD::Image::DeepPixel::getUnorderedSample(), DD::Image::DeepPixel::makeSampleOrder(), and DD::Image::DeepLightSample::operator()().



©2022 The Foundry Visionmongers, Ltd. All Rights Reserved.
www.thefoundry.co.uk