#include <SlrShadingContext.h>
Classes | |
| struct | iterator |
| Iterator support. More... | |
Public Types | |
| using | ListT = std::vector< class ShadingSample * > |
| using | const_iterator = iterator |
Public Member Functions | |
| ~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 | |
| StxBundle (ThreadContext *) | |
| StxBundle (const StxBundle &)=delete | |
| void | operator= (const StxBundle &)=delete |
Protected Attributes | |
| class ThreadContext * | _sttx |
| ListT | _list |
Friends | |
| class | ThreadContext |
| class | SlrIntegratorContext |
| struct | SlrRayContext |
| class | RenderEngine |
| std::ostream & | operator<< (std::ostream &o, const StxBundle &) |
Stores a list of StxShadingContext generated by a ray trace call.
| SlrShadingContext & slr::StxBundle::getShadingContext | ( | int32_t | i | ) | const |
Retrieve the shading context at index i. No range checking or null testing performed! If the shading reference is empty (null) then an empty context is returned. Warning, accessing most of the empty context's methods may cause a crash, so check that it isValid() if in doubt.
| void slr::StxBundle::moveShadingContextToBundle | ( | int32_t | i, |
| StxBundle & | toBundle | ||
| ) |
Move/extract the shading context reference out of this bundle, transferring ownership of it to toBundle and setting the old reference to null. Note this does -NOT- change the size of the list, for performance reasons.
| void slr::StxBundle::clear | ( | ) |
Sets size of bundle to 0 after releasing all the shading contexts in the bundle. Use this if you want to reuse the same bundle in another trace call.
Referenced by slr::SlrRayContext::clearLayeringStack(), slr::StxLayeringStack::reset(), and ~StxBundle().
| ©2026 The Foundry Visionmongers, Ltd. All Rights Reserved. |