Blender V5.0
TextureMapping Class Reference

#include <shader_nodes.h>

Public Types

enum  Type { POINT = 0 , TEXTURE = 1 , VECTOR = 2 , NORMAL = 3 }
enum  Mapping { NONE = 0 , X = 1 , Y = 2 , Z = 3 }
enum  Projection { FLAT , CUBE , TUBE , SPHERE }

Public Member Functions

 TextureMapping ()
Transform compute_transform ()
bool skip ()
void compile (SVMCompiler &compiler, const int offset_in, const int offset_out)
int compile (SVMCompiler &compiler, ShaderInput *vector_in)
void compile (OSLCompiler &compiler)
int compile_begin (SVMCompiler &compiler, ShaderInput *vector_in)
void compile_end (SVMCompiler &compiler, ShaderInput *vector_in, const int vector_offset)

Public Attributes

float3 translation
float3 rotation
float3 scale
float3 min
float3 max
bool use_minmax
Type type
Mapping x_mapping
Mapping y_mapping
Mapping z_mapping
Projection projection

Detailed Description

Definition at line 25 of file shader_nodes.h.

Member Enumeration Documentation

◆ Mapping

Enumerator
NONE 

Definition at line 47 of file shader_nodes.h.

◆ Projection

Enumerator
FLAT 
CUBE 
TUBE 
SPHERE 

Definition at line 50 of file shader_nodes.h.

◆ Type

Enumerator
POINT 
TEXTURE 
VECTOR 
NORMAL 

Definition at line 44 of file shader_nodes.h.

Constructor & Destructor Documentation

◆ TextureMapping()

TextureMapping::TextureMapping ( )
default

Member Function Documentation

◆ compile() [1/3]

void TextureMapping::compile ( OSLCompiler & compiler)

Definition at line 206 of file shader_nodes.cpp.

References compute_transform(), OSLCompiler::parameter(), and skip().

◆ compile() [2/3]

void TextureMapping::compile ( SVMCompiler & compiler,
const int offset_in,
const int offset_out )

◆ compile() [3/3]

int TextureMapping::compile ( SVMCompiler & compiler,
ShaderInput * vector_in )

◆ compile_begin()

int TextureMapping::compile_begin ( SVMCompiler & compiler,
ShaderInput * vector_in )

◆ compile_end()

void TextureMapping::compile_end ( SVMCompiler & compiler,
ShaderInput * vector_in,
const int vector_offset )

Definition at line 197 of file shader_nodes.cpp.

References skip(), SVMCompiler::stack_clear_offset(), and ShaderInput::type().

◆ compute_transform()

◆ skip()

bool TextureMapping::skip ( )

Member Data Documentation

◆ max

float3 TextureMapping::max

Definition at line 41 of file shader_nodes.h.

Referenced by compile().

◆ min

float3 TextureMapping::min

Definition at line 41 of file shader_nodes.h.

Referenced by compile().

◆ projection

Projection TextureMapping::projection

Definition at line 51 of file shader_nodes.h.

◆ rotation

float3 TextureMapping::rotation

Definition at line 38 of file shader_nodes.h.

Referenced by compute_transform(), and skip().

◆ scale

float3 TextureMapping::scale

Definition at line 39 of file shader_nodes.h.

Referenced by compute_transform(), and skip().

◆ translation

float3 TextureMapping::translation

Definition at line 37 of file shader_nodes.h.

Referenced by compute_transform(), and skip().

◆ type

Type TextureMapping::type

Definition at line 45 of file shader_nodes.h.

Referenced by compile(), and compute_transform().

◆ use_minmax

bool TextureMapping::use_minmax

Definition at line 42 of file shader_nodes.h.

Referenced by compile(), and skip().

◆ x_mapping

Mapping TextureMapping::x_mapping

Definition at line 48 of file shader_nodes.h.

Referenced by compute_transform(), and skip().

◆ y_mapping

Mapping TextureMapping::y_mapping

Definition at line 48 of file shader_nodes.h.

Referenced by compute_transform(), and skip().

◆ z_mapping

Mapping TextureMapping::z_mapping

Definition at line 48 of file shader_nodes.h.

Referenced by compute_transform(), and skip().


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