Blender V2.61 - r43446
Defines | Functions

osl_services.cpp File Reference

#include <string.h>
#include "mesh.h"
#include "object.h"
#include "scene.h"
#include "osl_services.h"
#include "osl_shader.h"
#include "util_foreach.h"
#include "util_string.h"
#include "kernel_compat_cpu.h"
#include "kernel_globals.h"
#include "kernel_object.h"
#include "kernel_triangle.h"

Go to the source code of this file.

Defines

#define TO_MATRIX44(m)   (*(OSL::Matrix44*)&(m))

Functions

static bool get_mesh_attribute (KernelGlobals *kg, const ShaderData *sd, const OSLGlobals::Attribute &attr, bool derivatives, void *val)
static bool get_mesh_attribute_convert (KernelGlobals *kg, const ShaderData *sd, const OSLGlobals::Attribute &attr, const TypeDesc &type, bool derivatives, void *val)
static void get_object_attribute (const OSLGlobals::Attribute &attr, bool derivatives, void *val)

Define Documentation

#define TO_MATRIX44 (   m)    (*(OSL::Matrix44*)&(m))

Function Documentation

static bool get_mesh_attribute ( KernelGlobals *  kg,
const ShaderData sd,
const OSLGlobals::Attribute &  attr,
bool  derivatives,
void *  val 
) [static]
static bool get_mesh_attribute_convert ( KernelGlobals *  kg,
const ShaderData sd,
const OSLGlobals::Attribute &  attr,
const TypeDesc &  type,
bool  derivatives,
void *  val 
) [static]

Definition at line 188 of file osl_services.cpp.

References average(), get_mesh_attribute(), and make_float3().

Referenced by OSLRenderServices::get_attribute().

static void get_object_attribute ( const OSLGlobals::Attribute &  attr,
bool  derivatives,
void *  val 
) [static]

Definition at line 224 of file osl_services.cpp.

Referenced by OSLRenderServices::get_attribute().