Blender V5.0
services.cpp File Reference

Go to the source code of this file.

Macros

#define READ_PATH_STATE(elem)

Functions

static CCL_NAMESPACE_BEGIN void copy_matrix (OSL::Matrix44 &m, const Transform &tfm)
static void copy_matrix (OSL::Matrix44 &m, const ProjectionTransform &tfm)
ccl_device_template_spec bool set_attribute (const dual1 v, TypeDesc type, bool derivatives, void *val)
ccl_device_template_spec bool set_attribute (const dual2 v, TypeDesc type, bool derivatives, void *val)
ccl_device_template_spec bool set_attribute (const dual3 v, TypeDesc type, bool derivatives, void *val)
ccl_device_template_spec bool set_attribute (const dual4 v, TypeDesc type, bool derivatives, void *val)
template<typename T>
ccl_device_inline bool set_attribute (const T f, const TypeDesc type, bool derivatives, void *val)
ccl_device_template_spec bool set_attribute (const int i, const TypeDesc type, bool derivatives, void *val)
ccl_device_template_spec bool set_attribute (ustring str, const TypeDesc type, bool derivatives, void *val)
static bool set_attribute_float3_3 (const float3 P[3], TypeDesc type, bool derivatives, void *val)
static bool set_attribute_matrix (const Transform &tfm, const TypeDesc type, void *val)
template<typename T>
bool get_object_attribute_impl (const ThreadKernelGlobalsCPU *kg, ShaderData *sd, const AttributeDescriptor &desc, const TypeDesc &type, bool derivatives, void *val)
static bool get_object_attribute (const ThreadKernelGlobalsCPU *kg, ShaderData *sd, const AttributeDescriptor &desc, const TypeDesc &type, bool derivatives, void *val)

Macro Definition Documentation

◆ READ_PATH_STATE

#define READ_PATH_STATE ( elem)
Value:
((state != nullptr) ? state->path.elem : \
(shadow_state != nullptr) ? shadow_state->shadow_path.elem : \
0)
static ulong state[N]

Referenced by OSLRenderServices::get_background_attribute().

Function Documentation

◆ copy_matrix() [1/2]

void copy_matrix ( OSL::Matrix44 & m,
const ProjectionTransform & tfm )
static

Definition at line 55 of file services.cpp.

References projection_transpose().

◆ copy_matrix() [2/2]

◆ get_object_attribute()

◆ get_object_attribute_impl()

template<typename T>
bool get_object_attribute_impl ( const ThreadKernelGlobalsCPU * kg,
ShaderData * sd,
const AttributeDescriptor & desc,
const TypeDesc & type,
bool derivatives,
void * val )
inline

Definition at line 585 of file services.cpp.

References data, primitive_surface_attribute(), and set_attribute().

Referenced by get_object_attribute().

◆ set_attribute() [1/7]

◆ set_attribute() [2/7]

ccl_device_template_spec bool set_attribute ( const dual2 v,
TypeDesc type,
bool derivatives,
void * val )

◆ set_attribute() [3/7]

ccl_device_template_spec bool set_attribute ( const dual3 v,
TypeDesc type,
bool derivatives,
void * val )

◆ set_attribute() [4/7]

ccl_device_template_spec bool set_attribute ( const dual4 v,
TypeDesc type,
bool derivatives,
void * val )

◆ set_attribute() [5/7]

ccl_device_template_spec bool set_attribute ( const int i,
const TypeDesc type,
bool derivatives,
void * val )

Definition at line 510 of file services.cpp.

References ccl_device_template_spec, and i.

◆ set_attribute() [6/7]

template<typename T>
ccl_device_inline bool set_attribute ( const T f,
const TypeDesc type,
bool derivatives,
void * val )

Definition at line 505 of file services.cpp.

References ccl_device_inline, set_attribute(), and T.

◆ set_attribute() [7/7]

ccl_device_template_spec bool set_attribute ( ustring str,
const TypeDesc type,
bool derivatives,
void * val )

Definition at line 530 of file services.cpp.

References ccl_device_template_spec, and str.

◆ set_attribute_float3_3()

bool set_attribute_float3_3 ( const float3 P[3],
TypeDesc type,
bool derivatives,
void * val )
static

Definition at line 552 of file services.cpp.

References copy_v3_v3(), and P.

Referenced by OSLRenderServices::get_object_standard_attribute().

◆ set_attribute_matrix()

bool set_attribute_matrix ( const Transform & tfm,
const TypeDesc type,
void * val )
static

Definition at line 574 of file services.cpp.

References copy_matrix().

Referenced by get_object_attribute().