Blender V4.5
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)
template<typename T>
bool set_attribute (const T v, const T dx, const T dy, TypeDesc type, bool derivatives, void *val)
void set_data_float (const float v, const float dx, const float dy, bool derivatives, void *val)
void set_data_float3 (const float3 v, const float3 dx, const float3 dy, bool derivatives, void *val)
void set_data_float4 (const float4 v, const float4 dx, const float4 dy, bool derivatives, void *val)
ccl_device_template_spec bool set_attribute (const float v, const float dx, const float dy, TypeDesc type, bool derivatives, void *val)
ccl_device_template_spec bool set_attribute (const float2 v, const float2 dx, const float2 dy, TypeDesc type, bool derivatives, void *val)
ccl_device_template_spec bool set_attribute (const float3 v, const float3 dx, const float3 dy, TypeDesc type, bool derivatives, void *val)
ccl_device_template_spec bool set_attribute (const float4 v, const float4 dx, const float4 dy, 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 54 of file services.cpp.

References projection_transpose().

◆ copy_matrix() [2/2]

◆ get_object_attribute()

bool get_object_attribute ( const ThreadKernelGlobalsCPU * kg,
ShaderData * sd,
const AttributeDescriptor & desc,
const TypeDesc & type,
bool derivatives,
void * val )
static

◆ 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 646 of file services.cpp.

References make_zero(), primitive_surface_attribute(), set_attribute(), T, and v.

Referenced by get_object_attribute().

◆ set_attribute() [1/8]

ccl_device_template_spec bool set_attribute ( const float v,
const float dx,
const float dy,
TypeDesc type,
bool derivatives,
void * val )

◆ set_attribute() [2/8]

ccl_device_template_spec bool set_attribute ( const float2 v,
const float2 dx,
const float2 dy,
TypeDesc type,
bool derivatives,
void * val )

◆ set_attribute() [3/8]

ccl_device_template_spec bool set_attribute ( const float3 v,
const float3 dx,
const float3 dy,
TypeDesc type,
bool derivatives,
void * val )

◆ set_attribute() [4/8]

ccl_device_template_spec bool set_attribute ( const float4 v,
const float4 dx,
const float4 dy,
TypeDesc type,
bool derivatives,
void * val )

◆ set_attribute() [5/8]

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

Definition at line 563 of file services.cpp.

References ccl_device_template_spec, and i.

◆ set_attribute() [6/8]

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

Definition at line 558 of file services.cpp.

References ccl_device_inline, make_zero(), set_attribute(), and T.

◆ set_attribute() [7/8]

template<typename T>
bool set_attribute ( const T v,
const T dx,
const T dy,
TypeDesc type,
bool derivatives,
void * val )
inline

◆ set_attribute() [8/8]

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

Definition at line 583 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 605 of file services.cpp.

References 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 635 of file services.cpp.

References copy_matrix().

Referenced by get_object_attribute().

◆ set_data_float()

void set_data_float ( const float v,
const float dx,
const float dy,
bool derivatives,
void * val )
inline

Definition at line 413 of file services.cpp.

References v.

Referenced by set_attribute(), set_attribute(), set_attribute(), and set_attribute().

◆ set_data_float3()

void set_data_float3 ( const float3 v,
const float3 dx,
const float3 dy,
bool derivatives,
void * val )
inline

Definition at line 424 of file services.cpp.

References v, float3::x, float3::y, and float3::z.

Referenced by set_attribute(), set_attribute(), set_attribute(), and set_attribute().

◆ set_data_float4()

void set_data_float4 ( const float4 v,
const float4 dx,
const float4 dy,
bool derivatives,
void * val )
inline

Definition at line 441 of file services.cpp.

References v.

Referenced by set_attribute(), set_attribute(), set_attribute(), and set_attribute().