#include <SlrShadingContext.h>
Public Member Functions | |
| StxLayeringStack () | |
| Default ctor makes an invalid, empty bundle. | |
| StxLayeringStack (const SlrRayContext &) | |
| Shading stack owned by a ray. | |
| void | reset () |
| int32_t | rayIndex () const |
| Ray index for all shading contexts in stack. | |
| SlrShadingContext & | addHitPoint (const ndk::RayHitPointf &hitPoint) |
| ndk::OpacityTraitsMask | opacityOrMask () const |
| OpacityTraitsMask of all the surfaces OR'd together. | |
| ndk::OpacityTraitsMask | opacityAndMask () const |
| OpacityTraitsMask of all the surfaces AND'd together. | |
| bool | areAllHitsOpaqueSolid () const |
| bool | doAllHitsBlend () const |
| bool | doAllHitsBlendToOpaque () const |
Public Member Functions inherited from slr::StxBundle | |
| ~StxBundle () | |
| Releases all the shading contexts in the list. | |
| bool | isValid () const |
| Is the bundle bound to valid data? | |
| operator bool () const | |
| Returns true is bundle is not empty. | |
| int32_t | size () const |
| bool | empty () const |
| SlrShadingContext & | operator[] (int32_t i) |
| SlrShadingContext & | operator[] (int32_t i) const |
| void | sort (bool nearToFar=true) |
| Sort the shading contexts from near to far distance where the first in the list is nearest. | |
| void | sortNearToFar () |
| Sort the shading contexts from near to far distance where the first in the list is nearest. | |
| void | sortFarToNear () |
| Sort the shading contexts from far to near distance where the first in the list is farthest. | |
| SlrShadingContext & | getShadingContext (int32_t i) const |
| void | moveShadingContextToBundle (int32_t i, StxBundle &toBundle) |
| void | moveShadingContextToStack (int32_t i, StxLayeringStack &toStack) |
| Same but for layering stacks, which accumulate the opacity masks. | |
| void | clear () |
| iterator | begin () |
| const_iterator | begin () const |
| iterator | end () |
| const_iterator | end () const |
Protected Member Functions | |
| StxLayeringStack (ThreadContext *, struct RayData *) | |
| StxLayeringStack (const StxLayeringStack &)=delete | |
| void | operator= (const StxLayeringStack &)=delete |
Protected Member Functions inherited from slr::StxBundle | |
| StxBundle (ThreadContext *) | |
| StxBundle (const StxBundle &)=delete | |
| void | operator= (const StxBundle &)=delete |
Protected Attributes | |
| struct RayData * | _owner |
| ndk::OpacityTraitsMask | _opacityMaskOR |
| ndk::OpacityTraitsMask | _opacityMaskAND |
Protected Attributes inherited from slr::StxBundle | |
| class ThreadContext * | _sttx |
| ListT | _list |
Friends | |
| class | ThreadContext |
| class | SlrIntegratorContext |
| struct | RayData |
| std::ostream & | operator<< (std::ostream &o, const StxLayeringStack &b) |
Additional Inherited Members | |
Public Types inherited from slr::StxBundle | |
| using | ListT = std::vector< class ShadingSample * > |
| using | const_iterator = iterator |
A stack of surface shading contexts along a single ray path which can be layered together to form a flattened result.
| void slr::StxLayeringStack::reset | ( | ) |
Sets size of bundle to 0 after releasing all the shading contexts in the bundle and resets the global parameters. Use this if you want to reuse the same bundle in another trace call.
References slr::StxBundle::clear().
| bool slr::StxLayeringStack::areAllHitsOpaqueSolid | ( | ) | const |
All shading contexts are opaque-solid, that is we cannot see through the first surface and if desired can skip all other surfaces.
| bool slr::StxLayeringStack::doAllHitsBlend | ( | ) | const |
If false then only the first surface matters since we should never see through it. If true then all the surfaces need to be blended, and if doAllHitsBlendToOpaque() is also true then blending can be done front-to-back.
| bool slr::StxLayeringStack::doAllHitsBlendToOpaque | ( | ) | const |
If true all the surfaces do 'standard' blending that can result in 1.0 opacity. If false then at least one of the surfaces needs to do 'non-standard' blending (like min, max, plus) and blending should be done back-to-front.
| ©2026 The Foundry Visionmongers, Ltd. All Rights Reserved. |