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

#include <ShaderNode.h>

+ Inheritance diagram for ShaderPort:

Public Member Functions

 ShaderPort (ShaderNode *node, 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 (TypeDesc type)
 Set the data type for this port. More...
 
TypeDesc getType () 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, bool authoredValue=true)
 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...
 
bool hasAuthoredValue () const
 
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

ShaderNode_node
 
TypeDesc _type
 
string _name
 
string _path
 
string _semantic
 
string _variable
 
ValuePtr _value
 
string _unit
 
string _colorspace
 
string _geomprop
 
ShaderMetadataVecPtr _metadata
 
uint32_t _flags
 

Detailed Description

An input or output port on a ShaderNode

Definition at line 123 of file ShaderNode.h.

Constructor & Destructor Documentation

ShaderPort::ShaderPort ( ShaderNode node,
TypeDesc  type,
const string name,
ValuePtr  value = nullptr 
)

Constructor.

Member Function Documentation

const string& ShaderPort::getColorSpace ( ) const
inline

Return the source color space for the value on this port.

Definition at line 185 of file ShaderNode.h.

bool ShaderPort::getFlag ( uint32_t  flag) const
inline

Return the on|off state of a given flag.

Definition at line 219 of file ShaderNode.h.

uint32_t ShaderPort::getFlags ( ) const
inline

Return flags set on this port.

Definition at line 210 of file ShaderNode.h.

string ShaderPort::getFullName ( ) const

Return the name of this port.

const string& ShaderPort::getGeomProp ( ) const
inline

Get geomprop name.

Definition at line 198 of file ShaderNode.h.

ShaderMetadataVecPtr ShaderPort::getMetadata ( )
inline

Get the metadata vector.

Definition at line 249 of file ShaderNode.h.

const ShaderMetadataVecPtr& ShaderPort::getMetadata ( ) const
inline

Get the metadata vector.

Definition at line 252 of file ShaderNode.h.

const string& ShaderPort::getName ( ) const
inline

Return the name of this port.

Definition at line 151 of file ShaderNode.h.

ShaderNode* ShaderPort::getNode ( )
inline

Return the node this port belongs to.

Definition at line 136 of file ShaderNode.h.

const ShaderNode* ShaderPort::getNode ( ) const
inline

Return the node this port belongs to.

Definition at line 139 of file ShaderNode.h.

const string& ShaderPort::getPath ( ) const
inline

Return the path to this port.

Definition at line 204 of file ShaderNode.h.

ShaderPortPtr ShaderPort::getSelf ( )
inline

Return a shared pointer instance of this object.

Definition at line 130 of file ShaderNode.h.

const string& ShaderPort::getSemantic ( ) const
inline

Return the variable semantic of this port.

Definition at line 166 of file ShaderNode.h.

TypeDesc ShaderPort::getType ( ) const
inline

Return the data type for this port.

Definition at line 145 of file ShaderNode.h.

const string& ShaderPort::getUnit ( ) const
inline

Return the unit type for the value on this port.

Definition at line 191 of file ShaderNode.h.

ValuePtr ShaderPort::getValue ( ) const
inline

Return the value set on this port.

Definition at line 176 of file ShaderNode.h.

string ShaderPort::getValueString ( ) const

Return the value set on this port as a string, or an empty string if there is no value.

const string& ShaderPort::getVariable ( ) const
inline

Return the variable name of this port.

Definition at line 160 of file ShaderNode.h.

bool ShaderPort::hasAuthoredValue ( ) const
inline

Definition at line 243 of file ShaderNode.h.

bool ShaderPort::isBindInput ( ) const
inline

Return the emitted state of this port.

Definition at line 240 of file ShaderNode.h.

bool ShaderPort::isEmitted ( ) const
inline

Return the emitted state of this port.

Definition at line 234 of file ShaderNode.h.

bool ShaderPort::isUniform ( ) const
inline

Return the uniform flag on this port.

Definition at line 228 of file ShaderNode.h.

void ShaderPort::setBindInput ( )
inline

Set the bind input state on this port to true.

Definition at line 237 of file ShaderNode.h.

void ShaderPort::setColorSpace ( const string colorspace)
inline

Set a source color space for the value on this port.

Definition at line 182 of file ShaderNode.h.

void ShaderPort::setEmitted ( )
inline

Set the emitted state on this port to true.

Definition at line 231 of file ShaderNode.h.

void ShaderPort::setFlag ( uint32_t  flag,
bool  value 
)
inline

Set the on|off state of a given flag.

Definition at line 213 of file ShaderNode.h.

void ShaderPort::setFlags ( uint32_t  flags)
inline

Set flags on this port.

Definition at line 207 of file ShaderNode.h.

void ShaderPort::setGeomProp ( const string geomprop)
inline

Set geomprop name if the input has a default geomprop to be assigned when it is unconnected.

Definition at line 195 of file ShaderNode.h.

void ShaderPort::setMetadata ( ShaderMetadataVecPtr  metadata)
inline

Set the metadata vector.

Definition at line 246 of file ShaderNode.h.

void ShaderPort::setName ( const string name)
inline

Set the name of this port.

Definition at line 148 of file ShaderNode.h.

void ShaderPort::setPath ( const string path)
inline

Set the path to this port.

Definition at line 201 of file ShaderNode.h.

void ShaderPort::setSemantic ( const string semantic)
inline

Set the variable semantic of this port.

Definition at line 163 of file ShaderNode.h.

void ShaderPort::setType ( TypeDesc  type)
inline

Set the data type for this port.

Definition at line 142 of file ShaderNode.h.

void ShaderPort::setUniform ( )
inline

Set the uniform flag this port to true.

Definition at line 225 of file ShaderNode.h.

void ShaderPort::setUnit ( const string unit)
inline

Set a unit type for the value on this port.

Definition at line 188 of file ShaderNode.h.

void ShaderPort::setValue ( ValuePtr  value,
bool  authoredValue = true 
)
inline

Set a value on this port.

Definition at line 169 of file ShaderNode.h.

void ShaderPort::setVariable ( const string name)
inline

Set the variable name of this port.

Definition at line 157 of file ShaderNode.h.

Member Data Documentation

string ShaderPort::_colorspace
protected

Definition at line 263 of file ShaderNode.h.

uint32_t ShaderPort::_flags
protected

Definition at line 266 of file ShaderNode.h.

string ShaderPort::_geomprop
protected

Definition at line 264 of file ShaderNode.h.

ShaderMetadataVecPtr ShaderPort::_metadata
protected

Definition at line 265 of file ShaderNode.h.

string ShaderPort::_name
protected

Definition at line 257 of file ShaderNode.h.

ShaderNode* ShaderPort::_node
protected

Definition at line 255 of file ShaderNode.h.

string ShaderPort::_path
protected

Definition at line 258 of file ShaderNode.h.

string ShaderPort::_semantic
protected

Definition at line 259 of file ShaderNode.h.

TypeDesc ShaderPort::_type
protected

Definition at line 256 of file ShaderNode.h.

string ShaderPort::_unit
protected

Definition at line 262 of file ShaderNode.h.

ValuePtr ShaderPort::_value
protected

Definition at line 261 of file ShaderNode.h.

string ShaderPort::_variable
protected

Definition at line 260 of file ShaderNode.h.


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