Blender  V3.3
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
BufferParams Class Reference

#include <buffers.h>

Inheritance diagram for BufferParams:
Node

Public Member Functions

 BufferParams ()
 
 BufferParams (BufferParams &&other) noexcept=default
 
 BufferParams (const BufferParams &other)=default
 
BufferParamsoperator= (BufferParams &&other)=default
 
BufferParamsoperator= (const BufferParams &other)=default
 
 ~BufferParams ()=default
 
void update_passes ()
 
void update_passes (const vector< Pass * > &scene_passes)
 
int get_pass_offset (PassType type, PassMode mode=PassMode::NOISY) const
 
const BufferPassfind_pass (string_view name) const
 
const BufferPassfind_pass (PassType type, PassMode mode=PassMode::NOISY) const
 
const BufferPassget_actual_display_pass (PassType type, PassMode mode=PassMode::NOISY) const
 
const BufferPassget_actual_display_pass (const BufferPass *pass) const
 
void update_offset_stride ()
 
bool modified (const BufferParams &other) const
 
- Public Member Functions inherited from Node
 Node (const NodeType *type, ustring name=ustring())
 
virtual ~Node ()=0
 
void set (const SocketType &input, bool value)
 
void set (const SocketType &input, int value)
 
void set (const SocketType &input, uint value)
 
void set (const SocketType &input, float value)
 
void set (const SocketType &input, float2 value)
 
void set (const SocketType &input, float3 value)
 
void set (const SocketType &input, const char *value)
 
void set (const SocketType &input, ustring value)
 
void set (const SocketType &input, const Transform &value)
 
void set (const SocketType &input, Node *value)
 
template<class ValueType , typename std::enable_if_t< std::is_enum_v< ValueType >> * = nullptr>
void set (const SocketType &input, const ValueType &value)
 
void set (const SocketType &input, array< bool > &value)
 
void set (const SocketType &input, array< int > &value)
 
void set (const SocketType &input, array< float > &value)
 
void set (const SocketType &input, array< float2 > &value)
 
void set (const SocketType &input, array< float3 > &value)
 
void set (const SocketType &input, array< ustring > &value)
 
void set (const SocketType &input, array< Transform > &value)
 
void set (const SocketType &input, array< Node * > &value)
 
bool get_bool (const SocketType &input) const
 
int get_int (const SocketType &input) const
 
uint get_uint (const SocketType &input) const
 
float get_float (const SocketType &input) const
 
float2 get_float2 (const SocketType &input) const
 
float3 get_float3 (const SocketType &input) const
 
ustring get_string (const SocketType &input) const
 
Transform get_transform (const SocketType &input) const
 
Nodeget_node (const SocketType &input) const
 
const array< bool > & get_bool_array (const SocketType &input) const
 
const array< int > & get_int_array (const SocketType &input) const
 
const array< float > & get_float_array (const SocketType &input) const
 
const array< float2 > & get_float2_array (const SocketType &input) const
 
const array< float3 > & get_float3_array (const SocketType &input) const
 
const array< ustring > & get_string_array (const SocketType &input) const
 
const array< Transform > & get_transform_array (const SocketType &input) const
 
const array< Node * > & get_node_array (const SocketType &input) const
 
bool has_default_value (const SocketType &input) const
 
void set_default_value (const SocketType &input)
 
bool equals_value (const Node &other, const SocketType &input) const
 
void copy_value (const SocketType &input, const Node &other, const SocketType &other_input)
 
void set_value (const SocketType &input, const Node &other, const SocketType &other_input)
 
bool equals (const Node &other) const
 
void hash (MD5Hash &md5)
 
size_t get_total_size_in_bytes () const
 
bool is_a (const NodeType *type)
 
bool socket_is_modified (const SocketType &input) const
 
bool is_modified () const
 
void tag_modified ()
 
void clear_modified ()
 
void print_modified_sockets () const
 
const NodeOwnerget_owner () const
 
void set_owner (const NodeOwner *owner_)
 
int reference_count () const
 
void reference ()
 
void dereference ()
 
void clear_reference_count ()
 

Public Attributes

NODE_DECLARE int width = 0
 
int height = 0
 
int window_x = 0
 
int window_y = 0
 
int window_width = 0
 
int window_height = 0
 
int full_x = 0
 
int full_y = 0
 
int full_width = 0
 
int full_height = 0
 
int offset = -1
 
int stride = -1
 
int pass_stride = -1
 
vector< BufferPasspasses
 
ustring layer
 
ustring view
 
int samples = 0
 
float exposure = 1.0f
 
bool use_approximate_shadow_catcher = false
 
bool use_transparent_background = false
 
- Public Attributes inherited from Node
ustring name
 
const NodeTypetype
 
InternalNode internal
 
LeafNode leaf
 

Protected Member Functions

void reset_pass_offset ()
 
- Protected Member Functions inherited from Node
template<typename T >
void set_if_different (const SocketType &input, T value)
 
void set_if_different (const SocketType &input, Node *value)
 
template<typename T >
void set_if_different (const SocketType &input, array< T > &value)
 
void set_if_different (const SocketType &input, array< Node * > &value)
 
void dereference_all_used_nodes ()
 

Protected Attributes

int pass_offset_ [kNumPassOffsets]
 
- Protected Attributes inherited from Node
const NodeOwnerowner
 
int ref_count {0}
 
SocketModifiedFlags socket_modified
 

Static Protected Attributes

static constexpr int kNumPassOffsets = PASS_NUM * 2
 

Additional Inherited Members

- Static Protected Member Functions inherited from Node
template<typename T >
static Tget_socket_value (const Node *node, const SocketType &socket)
 

Detailed Description

Definition at line 66 of file buffers.h.

Constructor & Destructor Documentation

◆ BufferParams() [1/3]

BufferParams::BufferParams ( )

Definition at line 116 of file buffers.cpp.

References reset_pass_offset().

◆ BufferParams() [2/3]

BufferParams::BufferParams ( BufferParams &&  other)
defaultnoexcept

◆ BufferParams() [3/3]

BufferParams::BufferParams ( const BufferParams other)
default

◆ ~BufferParams()

BufferParams::~BufferParams ( )
default

Member Function Documentation

◆ find_pass() [1/2]

const BufferPass * BufferParams::find_pass ( PassType  type,
PassMode  mode = PassMode::NOISY 
) const

Definition at line 189 of file buffers.cpp.

References passes, and Node::type.

◆ find_pass() [2/2]

const BufferPass * BufferParams::find_pass ( string_view  name) const

◆ get_actual_display_pass() [1/2]

const BufferPass * BufferParams::get_actual_display_pass ( const BufferPass pass) const

◆ get_actual_display_pass() [2/2]

const BufferPass * BufferParams::get_actual_display_pass ( PassType  type,
PassMode  mode = PassMode::NOISY 
) const

Definition at line 200 of file buffers.cpp.

References find_pass(), and Node::type.

Referenced by PathTraceTile::get_pass_pixels().

◆ get_pass_offset()

int BufferParams::get_pass_offset ( PassType  type,
PassMode  mode = PassMode::NOISY 
) const

◆ modified()

bool BufferParams::modified ( const BufferParams other) const

◆ operator=() [1/2]

BufferParams& BufferParams::operator= ( BufferParams &&  other)
default

◆ operator=() [2/2]

BufferParams& BufferParams::operator= ( const BufferParams other)
default

◆ reset_pass_offset()

void BufferParams::reset_pass_offset ( )
protected

Definition at line 161 of file buffers.cpp.

References kNumPassOffsets, pass_offset_, and PASS_UNUSED.

Referenced by BufferParams(), and update_passes().

◆ update_offset_stride()

void BufferParams::update_offset_stride ( )

◆ update_passes() [1/2]

void BufferParams::update_passes ( )

◆ update_passes() [2/2]

void BufferParams::update_passes ( const vector< Pass * > &  scene_passes)

Definition at line 139 of file buffers.cpp.

References BufferPass::offset, pass_stride, PASS_UNUSED, passes, and update_passes().

Member Data Documentation

◆ exposure

float BufferParams::exposure = 1.0f

◆ full_height

int BufferParams::full_height = 0

◆ full_width

int BufferParams::full_width = 0

◆ full_x

int BufferParams::full_x = 0

◆ full_y

int BufferParams::full_y = 0

◆ height

int BufferParams::height = 0

◆ kNumPassOffsets

constexpr int BufferParams::kNumPassOffsets = PASS_NUM * 2
staticconstexprprotected

Definition at line 143 of file buffers.h.

Referenced by reset_pass_offset().

◆ layer

ustring BufferParams::layer

◆ offset

int BufferParams::offset = -1

◆ pass_offset_

int BufferParams::pass_offset_[kNumPassOffsets]
protected

Definition at line 148 of file buffers.h.

Referenced by get_pass_offset(), reset_pass_offset(), and update_passes().

◆ pass_stride

int BufferParams::pass_stride = -1

◆ passes

vector<BufferPass> BufferParams::passes

◆ samples

int BufferParams::samples = 0

Definition at line 99 of file buffers.h.

Referenced by Session::do_delayed_reset().

◆ stride

int BufferParams::stride = -1

◆ use_approximate_shadow_catcher

bool BufferParams::use_approximate_shadow_catcher = false

Definition at line 101 of file buffers.h.

Referenced by Session::do_delayed_reset(), PathTraceTile::get_pass_pixels(), and modified().

◆ use_transparent_background

bool BufferParams::use_transparent_background = false

Definition at line 102 of file buffers.h.

Referenced by Session::do_delayed_reset(), PathTraceTile::get_pass_pixels(), and modified().

◆ view

ustring BufferParams::view

Definition at line 98 of file buffers.h.

Referenced by get_layer_view_name(), modified(), and BlenderSession::render().

◆ width

NODE_DECLARE int BufferParams::width = 0

◆ window_height

int BufferParams::window_height = 0

◆ window_width

int BufferParams::window_width = 0

◆ window_x

int BufferParams::window_x = 0

◆ window_y

int BufferParams::window_y = 0

The documentation for this class was generated from the following files: