Nuke binary plugins 16.1.1
 
Loading...
Searching...
No Matches
slr::StxBundle Class Reference

#include <SlrShadingContext.h>

Inheritance diagram for slr::StxBundle:
slr::StxLayeringStack

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
 
SlrShadingContextoperator[] (int32_t i)
 
SlrShadingContextoperator[] (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.
 
SlrShadingContextgetShadingContext (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 &)
 

Detailed Description

Stores a list of StxShadingContext generated by a ray trace call.

Member Function Documentation

◆ getShadingContext()

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.

◆ moveShadingContextToBundle()

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.

◆ clear()

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.
www.foundry.com