6#ifndef MATERIALX_HWTRANSFORMNODE_H
7#define MATERIALX_HWTRANSFORMNODE_H
11MATERIALX_NAMESPACE_BEGIN
21 virtual const string& getMatrix(
const string& fromSpace,
const string& toSpace)
const;
22 virtual const string& getModelToWorldMatrix()
const = 0;
23 virtual const string& getWorldToModelMatrix()
const = 0;
24 virtual string getHomogeneousCoordinate()
const = 0;
25 virtual bool shouldNormalize()
const {
return false; }
27 virtual string getFromSpace(
const ShaderNode&)
const;
28 virtual string getToSpace(
const ShaderNode&)
const;
30 static const string FROM_SPACE;
31 static const string TO_SPACE;
32 static const string MODEL;
33 static const string OBJECT;
34 static const string WORLD;
43 const string& getModelToWorldMatrix()
const override {
return HW::T_WORLD_MATRIX; }
44 const string& getWorldToModelMatrix()
const override {
return HW::T_WORLD_INVERSE_MATRIX; }
45 string getHomogeneousCoordinate()
const override {
return "0.0"; }
54 string getHomogeneousCoordinate()
const override {
return "1.0"; }
63 const string& getModelToWorldMatrix()
const override {
return HW::T_WORLD_INVERSE_TRANSPOSE_MATRIX; }
64 const string& getWorldToModelMatrix()
const override {
return HW::T_WORLD_TRANSPOSE_MATRIX; }
65 string getHomogeneousCoordinate()
const override {
return "0.0"; }
66 bool shouldNormalize()
const override {
return true; }
69MATERIALX_NAMESPACE_END
Hardware shader generator base class.
shared_ptr< ShaderNodeImpl > ShaderNodeImplPtr
Shared pointer to a ShaderNodeImpl.
Definition: Library.h:40
A context class for shader generation.
Definition: GenContext.h:31
Class containing all data needed during shader generation.
Definition: Shader.h:33
Class representing a node in the shader generation DAG.
Definition: ShaderNode.h:320
Class handling the shader generation implementation for a node.
Definition: ShaderNodeImpl.h:32
A shader stage, containing the state and resulting source code for the stage.
Definition: ShaderStage.h:139