HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ShaderInput Class Reference

#include <ShaderNode.h>

+ Inheritance diagram for ShaderInput:

Public Member Functions

 ShaderInput (ShaderNode *node, const TypeDesc *type, const string &name)
 
ShaderOutputgetConnection ()
 
const ShaderOutputgetConnection () const
 
void makeConnection (ShaderOutput *src)
 Make a connection from the given source output to this input. More...
 
void breakConnection ()
 Break the connection to this input. More...
 
void setChannels (const string &channels)
 Set optional channels value. More...
 
const stringgetChannels () const
 Get optional channels value. More...
 
ShaderNodegetConnectedSibling () const
 
- Public Member Functions inherited from ShaderPort
 ShaderPort (ShaderNode *node, const TypeDesc *type, const string &name, ValuePtr value=nullptr)
 Constructor. More...
 
ShaderPortPtr getSelf ()
 Return a shared pointer instance of this object. More...
 
ShaderNodegetNode ()
 Return the node this port belongs to. More...
 
const ShaderNodegetNode () const
 Return the node this port belongs to. More...
 
void setType (const TypeDesc *type)
 Set the data type for this port. More...
 
const TypeDescgetType () const
 Return the data type for this port. More...
 
void setName (const string &name)
 Set the name of this port. More...
 
const stringgetName () const
 Return the name of this port. More...
 
string getFullName () const
 Return the name of this port. More...
 
void setVariable (const string &name)
 Set the variable name of this port. More...
 
const stringgetVariable () const
 Return the variable name of this port. More...
 
void setSemantic (const string &semantic)
 Set the variable semantic of this port. More...
 
const stringgetSemantic () const
 Return the variable semantic of this port. More...
 
void setValue (ValuePtr value)
 Set a value on this port. More...
 
ValuePtr getValue () const
 Return the value set on this port. More...
 
string getValueString () const
 Return the value set on this port as a string, or an empty string if there is no value. More...
 
void setColorSpace (const string &colorspace)
 Set a source color space for the value on this port. More...
 
const stringgetColorSpace () const
 Return the source color space for the value on this port. More...
 
void setUnit (const string &unit)
 Set a unit type for the value on this port. More...
 
const stringgetUnit () const
 Return the unit type for the value on this port. More...
 
void setGeomProp (const string &geomprop)
 
const stringgetGeomProp () const
 Get geomprop name. More...
 
void setPath (const string &path)
 Set the path to this port. More...
 
const stringgetPath () const
 Return the path to this port. More...
 
void setFlags (uint32_t flags)
 Set flags on this port. More...
 
uint32_t getFlags () const
 Return flags set on this port. More...
 
void setFlag (uint32_t flag, bool value)
 Set the on|off state of a given flag. More...
 
bool getFlag (uint32_t flag) const
 Return the on|off state of a given flag. More...
 
void setUniform ()
 Set the uniform flag this port to true. More...
 
bool isUniform () const
 Return the uniform flag on this port. More...
 
void setEmitted ()
 Set the emitted state on this port to true. More...
 
bool isEmitted () const
 Return the emitted state of this port. More...
 
void setBindInput ()
 Set the bind input state on this port to true. More...
 
bool isBindInput () const
 Return the emitted state of this port. More...
 
void setMetadata (ShaderMetadataVecPtr metadata)
 Set the metadata vector. More...
 
ShaderMetadataVecPtr getMetadata ()
 Get the metadata vector. More...
 
const ShaderMetadataVecPtrgetMetadata () const
 Get the metadata vector. More...
 

Protected Attributes

ShaderOutput_connection
 
string _channels
 
- Protected Attributes inherited from ShaderPort
ShaderNode_node
 
const TypeDesc_type
 
string _name
 
string _path
 
string _semantic
 
string _variable
 
ValuePtr _value
 
string _unit
 
string _colorspace
 
string _geomprop
 
ShaderMetadataVecPtr _metadata
 
uint32_t _flags
 

Friends

class ShaderOutput
 

Detailed Description

An input on a ShaderNode

Definition at line 263 of file ShaderNode.h.

Constructor & Destructor Documentation

ShaderInput::ShaderInput ( ShaderNode node,
const TypeDesc type,
const string name 
)

Member Function Documentation

void ShaderInput::breakConnection ( )

Break the connection to this input.

const string& ShaderInput::getChannels ( ) const
inline

Get optional channels value.

Definition at line 286 of file ShaderNode.h.

ShaderNode* ShaderInput::getConnectedSibling ( ) const

Return the sibling node connected upstream, or nullptr if there is no sibling upstream.

ShaderOutput* ShaderInput::getConnection ( )
inline

Return a connection to an upstream node output, or nullptr if not connected.

Definition at line 270 of file ShaderNode.h.

const ShaderOutput* ShaderInput::getConnection ( ) const
inline

Return a connection to an upstream node output, or nullptr if not connected.

Definition at line 274 of file ShaderNode.h.

void ShaderInput::makeConnection ( ShaderOutput src)

Make a connection from the given source output to this input.

void ShaderInput::setChannels ( const string channels)
inline

Set optional channels value.

Definition at line 283 of file ShaderNode.h.

Friends And Related Function Documentation

friend class ShaderOutput
friend

Definition at line 295 of file ShaderNode.h.

Member Data Documentation

string ShaderInput::_channels
protected

Definition at line 294 of file ShaderNode.h.

ShaderOutput* ShaderInput::_connection
protected

Definition at line 293 of file ShaderNode.h.


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