#include <layernode.h>


Public Member Functions | |
| layerNode_t (unsigned tflag, CFLOAT col_fac, CFLOAT var_fac, CFLOAT def_val, colorA_t def_col, mix_modes mmod) | |
| virtual void | eval (nodeStack_t &stack, const renderState_t &state, const surfacePoint_t &sp) const |
| virtual void | eval (nodeStack_t &stack, const renderState_t &state, const surfacePoint_t &sp, const vector3d_t &wo, const vector3d_t &wi) const |
| virtual void | evalDerivative (nodeStack_t &stack, const renderState_t &state, const surfacePoint_t &sp) const |
| virtual bool | isViewDependant () const |
| virtual bool | configInputs (const paraMap_t ¶ms, const nodeFinder_t &find) |
| virtual bool | getDependencies (std::vector< const shaderNode_t * > &dep) const |
Static Public Member Functions | |
| static shaderNode_t * | factory (const paraMap_t ¶ms, renderEnvironment_t &render) |
Protected Attributes | |
| const shaderNode_t * | input |
| const shaderNode_t * | upperLayer |
| unsigned int | texflag |
| CFLOAT | colfac |
| CFLOAT | valfac |
| CFLOAT | default_val |
| CFLOAT | upper_val |
| colorA_t | default_col |
| colorA_t | upper_col |
| mix_modes | mode |
| bool | do_color |
| bool | do_scalar |
| bool | color_input |
| bool | use_alpha |
Definition at line 17 of file layernode.h.
| layerNode_t::layerNode_t | ( | unsigned | tflag, | |
| CFLOAT | col_fac, | |||
| CFLOAT | var_fac, | |||
| CFLOAT | def_val, | |||
| colorA_t | def_col, | |||
| mix_modes | mmod | |||
| ) |
Definition at line 9 of file layernode.cc.
| bool layerNode_t::configInputs | ( | const paraMap_t & | params, | |
| const nodeFinder_t & | find | |||
| ) | [virtual] |
configure the inputs. gets the same paramMap the factory functions get, but shader nodes may be created in any order and linked afterwards, so inputs may not exist yet on instantiation
Implements shaderNode_t.
Definition at line 153 of file layernode.cc.
| void layerNode_t::eval | ( | nodeStack_t & | stack, | |
| const renderState_t & | state, | |||
| const surfacePoint_t & | sp, | |||
| const vector3d_t & | wo, | |||
| const vector3d_t & | wi | |||
| ) | const [virtual] |
evaluate the shader for given surface point and directions; otherwise same behavious than the other eval. Should only be called when the node returns true on isViewDependant()
Implements shaderNode_t.
Definition at line 89 of file layernode.cc.
| void layerNode_t::eval | ( | nodeStack_t & | stack, | |
| const renderState_t & | state, | |||
| const surfacePoint_t & | sp | |||
| ) | const [virtual] |
evaluate the shader for given surface point; result has to be put on stack (using stack[ID]). i know, could've passed const stack and have nodeResult_t return val, but this should be marginally more efficient, so do me the favour and just don't mess up other stack elements ;)
Implements shaderNode_t.
Definition at line 14 of file layernode.cc.
| void layerNode_t::evalDerivative | ( | nodeStack_t & | stack, | |
| const renderState_t & | state, | |||
| const surfacePoint_t & | sp | |||
| ) | const [virtual] |
evaluate the shader partial derivatives for given surface point (e.g. for bump mapping); attention: uses color component of node stack to store result, so only use a stack for either eval or evalDeriv!
Reimplemented from shaderNode_t.
Definition at line 94 of file layernode.cc.
| shaderNode_t * layerNode_t::factory | ( | const paraMap_t & | params, | |
| renderEnvironment_t & | render | |||
| ) | [static] |
Definition at line 194 of file layernode.cc.
| bool layerNode_t::getDependencies | ( | std::vector< const shaderNode_t * > & | dep | ) | const [virtual] |
Definition at line 184 of file layernode.cc.
| bool layerNode_t::isViewDependant | ( | ) | const [virtual] |
indicate whether the shader value depends on wi and wo
Reimplemented from shaderNode_t.
Definition at line 145 of file layernode.cc.
CFLOAT layerNode_t::colfac [protected] |
Definition at line 32 of file layernode.h.
bool layerNode_t::color_input [protected] |
Definition at line 37 of file layernode.h.
colorA_t layerNode_t::default_col [protected] |
Definition at line 35 of file layernode.h.
CFLOAT layerNode_t::default_val [protected] |
Definition at line 34 of file layernode.h.
bool layerNode_t::do_color [protected] |
Definition at line 37 of file layernode.h.
bool layerNode_t::do_scalar [protected] |
Definition at line 37 of file layernode.h.
const shaderNode_t* layerNode_t::input [protected] |
Definition at line 30 of file layernode.h.
mix_modes layerNode_t::mode [protected] |
Definition at line 36 of file layernode.h.
unsigned int layerNode_t::texflag [protected] |
Definition at line 31 of file layernode.h.
colorA_t layerNode_t::upper_col [protected] |
Definition at line 35 of file layernode.h.
CFLOAT layerNode_t::upper_val [protected] |
Definition at line 34 of file layernode.h.
const shaderNode_t * layerNode_t::upperLayer [protected] |
Definition at line 30 of file layernode.h.
bool layerNode_t::use_alpha [protected] |
Definition at line 37 of file layernode.h.
CFLOAT layerNode_t::valfac [protected] |
Definition at line 33 of file layernode.h.
1.6.1