Blender V4.5
Light Class Reference

#include <DNA_light_types.h>

Inherits Geometry.

Public Member Functions

 Light ()
 
void tag_update (Scene *scene)
 
bool has_contribution (const Scene *scene, const Object *object)
 
Shaderget_shader () const
 
float area (const Transform &tfm) const
 
void compute_bounds () override
 
void apply_transform (const Transform &tfm, const bool apply_to_motion) override
 
void get_uv_tiles (ustring map, unordered_set< int > &tiles) override
 
PrimitiveType primitive_type () const override
 
- Public Member Functions inherited from Geometry
 Geometry (const NodeType *node_type, const Type type)
 
 ~Geometry () override
 
virtual void clear (bool preserve_shaders=false)
 
bool need_attribute (Scene *scene, AttributeStandard std)
 
bool need_attribute (Scene *scene, ustring name)
 
AttributeRequestSet needed_attributes ()
 
float motion_time (const int step) const
 
int motion_step (const float time) const
 
void compute_bvh (Device *device, DeviceScene *dscene, SceneParams *params, Progress *progress, const size_t n, size_t total)
 
bool need_build_bvh (BVHLayout layout) const
 
bool is_instanced () const
 
bool has_true_displacement () const
 
virtual bool has_motion_blur () const
 
bool has_voxel_attributes () const
 
bool is_mesh () const
 
bool is_hair () const
 
bool is_pointcloud () const
 
bool is_volume () const
 
bool is_light () const
 
void tag_update (Scene *scene, bool rebuild)
 
- 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, const int value)
 
void set (const SocketType &input, const uint value)
 
void set (const SocketType &input, const uint64_t value)
 
void set (const SocketType &input, const float value)
 
void set (const SocketType &input, const float2 value)
 
void set (const SocketType &input, const 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 , std::enable_if_t< std::is_enum_v< ValueType >, bool > = true>
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
 
uint64_t get_uint64 (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 &socket) const
 
void copy_value (const SocketType &socket, const Node &other, const SocketType &other_socket)
 
void set_value (const SocketType &socket, const Node &other, const SocketType &other_socket)
 
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

ID id
 
struct AnimDataadt
 
short type
 
short flag
 
int mode
 
float r
 
float g
 
float b
 
float temperature
 
float energy
 
float exposure
 
float radius
 
float spotsize
 
float spotblend
 
short area_shape
 
short _pad1
 
float area_size
 
float area_sizey
 
float area_sizez
 
float area_spread
 
float sun_angle
 
short pr_texture
 
short use_nodes
 
float clipsta
 
float clipend_deprecated
 
float cascade_max_dist
 
float cascade_exponent
 
float cascade_fade
 
int cascade_count
 
float diff_fac
 
float spec_fac
 
float transmission_fac
 
float volume_fac
 
float att_dist
 
float shadow_filter_radius
 
float shadow_maximum_resolution
 
float shadow_jitter_overblur
 
struct PreviewImagepreview
 
struct bNodeTreenodetree
 
struct Ipo *ipo DNA_DEPRECATED
 
float energy_deprecated DNA_DEPRECATED
 
float _pad2
 
 NODE_DECLARE
 
- Public Attributes inherited from Geometry
Type geometry_type
 
AttributeSet attributes
 
BoundBox bounds
 
bool transform_applied
 
bool transform_negative_scaled
 
Transform transform_normal
 
unique_ptr< BVHbvh
 
size_t attr_map_offset
 
size_t prim_offset
 
bool has_volume
 
bool has_surface_bssrdf
 
bool need_update_rebuild
 
bool need_update_bvh_for_offset
 
size_t index
 
- Public Attributes inherited from Node
ustring name
 
const NodeTypetype
 
InternalNode internal
 
LeafNode leaf
 

Friends

class LightManager
 
class LightTree
 

Additional Inherited Members

- Public Types inherited from Geometry
enum  Type {
  MESH , HAIR , VOLUME , POINTCLOUD ,
  LIGHT
}
 
- Static Public Attributes inherited from Geometry
static const uint MAX_MOTION_STEPS = 129
 
- 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 ()
 
- Static Protected Member Functions inherited from Node
template<typename T >
static Tget_socket_value (const Node *node, const SocketType &socket)
 
- Protected Attributes inherited from Node
const NodeOwnerowner
 
int ref_count {0}
 
SocketModifiedFlags socket_modified
 

Detailed Description

Definition at line 22 of file DNA_light_types.h.

Constructor & Destructor Documentation

◆ Light()

Light::Light ( )

Definition at line 129 of file scene/light.cpp.

References Node::dereference_all_used_nodes().

Member Function Documentation

◆ apply_transform()

void Light::apply_transform ( const Transform & tfm,
const bool apply_to_motion )
overridevirtual

Implements Geometry.

Definition at line 186 of file scene/light.cpp.

◆ area()

◆ compute_bounds()

void Light::compute_bounds ( )
overridevirtual

Implements Geometry.

Definition at line 181 of file scene/light.cpp.

◆ get_shader()

Shader * Light::get_shader ( ) const

◆ get_uv_tiles()

void Light::get_uv_tiles ( ustring map,
unordered_set< int > & tiles )
overridevirtual

Implements Geometry.

Definition at line 191 of file scene/light.cpp.

◆ has_contribution()

bool Light::has_contribution ( const Scene * scene,
const Object * object )

◆ primitive_type()

PrimitiveType Light::primitive_type ( ) const
overridevirtual

Implements Geometry.

Definition at line 196 of file scene/light.cpp.

References PRIMITIVE_LAMP.

◆ tag_update()

void Light::tag_update ( Scene * scene)

Friends And Related Symbol Documentation

◆ LightManager

friend class LightManager
friend

Definition at line 81 of file scene/light.h.

◆ LightTree

friend class LightTree
friend

Definition at line 82 of file scene/light.h.

Member Data Documentation

◆ _pad1

short Light::_pad1

Definition at line 52 of file DNA_light_types.h.

◆ _pad2

float Light::_pad2

Definition at line 92 of file DNA_light_types.h.

◆ adt

struct AnimData* Light::adt

Animation data (must be immediately after id for utilities to use it).

Definition at line 31 of file DNA_light_types.h.

Referenced by acf_dslight_setting_ptr(), bc_getSceneLightAnimData(), make_new_animlistelem(), and AnimationImporter::translate_Animations().

◆ area_shape

◆ area_size

◆ area_sizey

◆ area_sizez

◆ area_spread

float Light::area_spread

Definition at line 56 of file DNA_light_types.h.

◆ att_dist

float Light::att_dist

Definition at line 78 of file DNA_light_types.h.

Referenced by DocumentImporter::writeLight().

◆ b

◆ cascade_count

int Light::cascade_count

Definition at line 71 of file DNA_light_types.h.

◆ cascade_exponent

float Light::cascade_exponent

Definition at line 69 of file DNA_light_types.h.

◆ cascade_fade

float Light::cascade_fade

Definition at line 70 of file DNA_light_types.h.

◆ cascade_max_dist

float Light::cascade_max_dist

Definition at line 68 of file DNA_light_types.h.

◆ clipend_deprecated

float Light::clipend_deprecated

Definition at line 66 of file DNA_light_types.h.

◆ clipsta

float Light::clipsta

Definition at line 65 of file DNA_light_types.h.

Referenced by DocumentImporter::writeLight().

◆ diff_fac

◆ DNA_DEPRECATED [1/2]

struct Ipo* ipo Light::DNA_DEPRECATED

Definition at line 90 of file DNA_light_types.h.

◆ DNA_DEPRECATED [2/2]

float energy_deprecated Light::DNA_DEPRECATED

Definition at line 91 of file DNA_light_types.h.

◆ energy

◆ exposure

◆ flag

short Light::flag

Definition at line 34 of file DNA_light_types.h.

Referenced by acf_dslight_setting_ptr(), and DocumentImporter::writeLight().

◆ g

◆ id

◆ mode

◆ NODE_DECLARE

Light::NODE_DECLARE

Definition at line 30 of file scene/light.h.

◆ nodetree

◆ pr_texture

short Light::pr_texture

Definition at line 62 of file DNA_light_types.h.

◆ preview

struct PreviewImage* Light::preview

◆ r

◆ radius

◆ shadow_filter_radius

float Light::shadow_filter_radius

Definition at line 79 of file DNA_light_types.h.

Referenced by blender::eevee::LightModule::begin_sync().

◆ shadow_jitter_overblur

float Light::shadow_jitter_overblur

◆ shadow_maximum_resolution

float Light::shadow_maximum_resolution

Definition at line 80 of file DNA_light_types.h.

Referenced by blender::eevee::LightModule::begin_sync().

◆ spec_fac

◆ spotblend

◆ spotsize

◆ sun_angle

◆ temperature

◆ transmission_fac

float Light::transmission_fac

Definition at line 75 of file DNA_light_types.h.

◆ type

◆ use_nodes

short Light::use_nodes

◆ volume_fac

float Light::volume_fac

Definition at line 76 of file DNA_light_types.h.


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