LightWrap++
AC++wrapperfortheLightWave3DSDK
lwpp::NodeHandler Class Reference

#include <node_handler.h>

+ Inheritance diagram for lwpp::NodeHandler:
+ Collaboration diagram for lwpp::NodeHandler:

List of all members.

Public Member Functions

 NodeHandler (void *priv, void *context, LWError *err)
virtual ~NodeHandler ()
virtual void ChangeID (const LWItemID *id_list)
LWChanGroupID chanGrp ()
virtual void Cleanup ()
virtual void CustomPreview (int width, int height)
virtual const char * DescLn ()
void disconnect (LWNodeInput *nid)
virtual void Evaluate (LWNodalAccess *na, NodeOutputID outID, NodeValue value)
NodeInputID firstInput (void)
NodeOutputID firstOutput (void)
virtual unsigned int Flags ()
NodeID getID (void)
ConnectionType getType (NodeValue val)
void * getValue (NodeValue val)
virtual LWError Init (int mode)
NodeInputID inputByIndex (int n)
int inputGetIndex (NodeInputID nid)
virtual LWError Load (const LoadState &ls)
 Load data from a LWLoadState.
virtual LWError NewTime (LWFrame frame, LWTime time)
const char * nodeName ()
int numInputs (void)
int numOutputs (void)
NodeOutputID outputByIndex (int n)
int outputGetIndex (NodeOutputID nid)
virtual LWError Save (const SaveState &ss)
 Save data to a LWSaveState.
const char * serverUserName ()
void SetClassName (const char *n)
void SetDescription (const char *n)
void SetDescription (const std::string &s)
void setID (NodeID _id)
void SetName (const char *n)
void setNodeColor (int col[3])
 Set the GUI colours for this node.
void setNodeColor (int r, int g, int b)
 Set the GUI colours for this node.
void setNodePreviewType (NodePreviewType type)
void Update ()
void Update (const char *cName)
void UpdateNodePreview ()
 Immediately update the preview for this node.
virtual const LWItemID * UseItems ()
Inputs

Create nodal inputs

LWNodeInputaddColorInput (const std::string name="Color")
LWNodeInputaddColourInput (const std::string name="Colour")
LWNodeInputaddScalarInput (const std::string name="Scalar")
LWNodeInputaddVectorInput (const std::string name="Vector")
LWNodeInputaddIntegerInput (const std::string name="Integer")
LWNodeInputaddFunctionInput (const std::string name="Function")
LWNodeInputaddMaterialInput (const std::string name="Material")
auto_Inputs

Create nodal inputs handles by a std::auto_ptr

auto_NodeInput autoColorInput (const std::string name="Color")
auto_NodeInput autoColourInput (const std::string name="Colour")
auto_NodeInput autoScalarInput (const std::string name="Scalar")
auto_NodeInput autoVectorInput (const std::string name="Vector")
auto_NodeInput autoIntegerInput (const std::string name="Integer")
auto_NodeInput autoFunctionInput (const std::string name="Function")
auto_NodeInput autoMaterialInput (const std::string name="Material")
Returning values during the node evaluation

These functions can only be called in evaluate.

void setValue (NodeValue val, double *v)
void setValue (NodeValue val, LWDVector *v)
void setValue (NodeValue val, double a, double b, double c)
void setValue (NodeValue val, float v[3])
void setValue (NodeValue val, float v)
void setValue (NodeValue val, double v)
void setValue (NodeValue val, int *v)
void setValue (NodeValue val, unsigned int *v)
void setValue (NodeValue val, bool v)
void setValue (NodeValue val, LWNodalMaterial *material)
void setValue (NodeValue val, Vector3d &v)
Outputs

Adding node outputs

LWNodeOutputaddColorOutput (const std::string name="Color")
LWNodeOutputaddColourOutput (const std::string name="Colour")
LWNodeOutputaddScalarOutput (const std::string name="Scalar")
LWNodeOutputaddVectorOutput (const std::string name="Vector")
LWNodeOutputaddIntegerOutput (const std::string name="Integer")
LWNodeOutputaddFunctionOutput (const std::string name="Function")
LWNodeOutputaddMaterialOutput (const std::string name="Material")
auto_Outputs

Adding node outputs that are managed by std::auto_ptr

auto_NodeOutput autoColorOutput (const std::string name="Color")
auto_NodeOutput autoColourOutput (const std::string name="Colour")
auto_NodeOutput autoScalarOutput (const std::string name="Scalar")
auto_NodeOutput autoVectorOutput (const std::string name="Vector")
auto_NodeOutput autoIntegerOutput (const std::string name="Integer")
auto_NodeOutput autoFunctionOutput (const std::string name="Function")
auto_NodeOutput autoMaterialOutput (const std::string name="Material")
Node Inputs

Functions to add node inputs

LWNodeInputaddColorInput (const std::string name="Color", NodeInputEvent *inp_event=0)
LWNodeInputaddColourInput (const std::string name="Colour", NodeInputEvent *inp_event=0)
LWNodeInputaddScalarInput (const std::string name="Scalar", NodeInputEvent *inp_event=0)
LWNodeInputaddVectorInput (const std::string name="Vector", NodeInputEvent *inp_event=0)
LWNodeInputaddIntegerInput (const std::string name="Integer", NodeInputEvent *inp_event=0)
LWNodeInputaddFunctionInput (const std::string name="Function", NodeInputEvent *inp_event=0)
LWNodeInputaddMaterialInput (const std::string name="Material", NodeInputEvent *inp_event=0)

Protected Member Functions

virtual int NodeInputEvent (NodeInputID nid, LWNodalEvent nevent, ConnectionType type)

Static Protected Member Functions

static int CB_NodeInputEvent (void *userData, NodeInputID nid, LWNodalEvent nevent, ConnectionType type)

Protected Attributes

NodeID Context
LWFrame currentFrame
LWTime currentTime
lwpp::LWItemTracker ItemTracker
const char * m_className
std::string m_description
const char * m_pluginName
InstanceUpdate m_update
int renderMode

Constructor & Destructor Documentation

lwpp::NodeHandler::NodeHandler ( void *  priv,
void *  context,
LWError *  err 
)
inline
virtual lwpp::NodeHandler::~NodeHandler ( )
inlinevirtual

Member Function Documentation

LWNodeInput* lwpp::NodeHandler::addColorInput ( const std::string  name = "Color")
inline
LWNodeInput* lwpp::NodeInputHelper::addColorInput ( const std::string  name = "Color",
NodeInputEvent *  inp_event = 0 
)
inlineinherited
LWNodeOutput* lwpp::LWNode::addColorOutput ( const std::string  name = "Color")
inlineinherited
LWNodeInput* lwpp::NodeHandler::addColourInput ( const std::string  name = "Colour")
inline
LWNodeInput* lwpp::NodeInputHelper::addColourInput ( const std::string  name = "Colour",
NodeInputEvent *  inp_event = 0 
)
inlineinherited
LWNodeOutput* lwpp::LWNode::addColourOutput ( const std::string  name = "Colour")
inlineinherited
LWNodeInput* lwpp::NodeHandler::addFunctionInput ( const std::string  name = "Function")
inline
LWNodeInput* lwpp::NodeInputHelper::addFunctionInput ( const std::string  name = "Function",
NodeInputEvent *  inp_event = 0 
)
inlineinherited
LWNodeOutput* lwpp::LWNode::addFunctionOutput ( const std::string  name = "Function")
inlineinherited
LWNodeInput* lwpp::NodeHandler::addIntegerInput ( const std::string  name = "Integer")
inline
LWNodeInput* lwpp::NodeInputHelper::addIntegerInput ( const std::string  name = "Integer",
NodeInputEvent *  inp_event = 0 
)
inlineinherited
LWNodeOutput* lwpp::LWNode::addIntegerOutput ( const std::string  name = "Integer")
inlineinherited
LWNodeInput* lwpp::NodeHandler::addMaterialInput ( const std::string  name = "Material")
inline
LWNodeInput* lwpp::NodeInputHelper::addMaterialInput ( const std::string  name = "Material",
NodeInputEvent *  inp_event = 0 
)
inlineinherited
LWNodeOutput* lwpp::LWNode::addMaterialOutput ( const std::string  name = "Material")
inlineinherited
LWNodeInput* lwpp::NodeHandler::addScalarInput ( const std::string  name = "Scalar")
inline
LWNodeInput* lwpp::NodeInputHelper::addScalarInput ( const std::string  name = "Scalar",
NodeInputEvent *  inp_event = 0 
)
inlineinherited
LWNodeOutput* lwpp::LWNode::addScalarOutput ( const std::string  name = "Scalar")
inlineinherited
LWNodeInput* lwpp::NodeHandler::addVectorInput ( const std::string  name = "Vector")
inline
LWNodeInput* lwpp::NodeInputHelper::addVectorInput ( const std::string  name = "Vector",
NodeInputEvent *  inp_event = 0 
)
inlineinherited
LWNodeOutput* lwpp::LWNode::addVectorOutput ( const std::string  name = "Vector")
inlineinherited
auto_NodeInput lwpp::NodeHandler::autoColorInput ( const std::string  name = "Color")
inline
auto_NodeOutput lwpp::LWNode::autoColorOutput ( const std::string  name = "Color")
inlineinherited
auto_NodeInput lwpp::NodeHandler::autoColourInput ( const std::string  name = "Colour")
inline
auto_NodeOutput lwpp::LWNode::autoColourOutput ( const std::string  name = "Colour")
inlineinherited
auto_NodeInput lwpp::NodeHandler::autoFunctionInput ( const std::string  name = "Function")
inline
auto_NodeOutput lwpp::LWNode::autoFunctionOutput ( const std::string  name = "Function")
inlineinherited
auto_NodeInput lwpp::NodeHandler::autoIntegerInput ( const std::string  name = "Integer")
inline
auto_NodeOutput lwpp::LWNode::autoIntegerOutput ( const std::string  name = "Integer")
inlineinherited
auto_NodeInput lwpp::NodeHandler::autoMaterialInput ( const std::string  name = "Material")
inline
auto_NodeOutput lwpp::LWNode::autoMaterialOutput ( const std::string  name = "Material")
inlineinherited
auto_NodeInput lwpp::NodeHandler::autoScalarInput ( const std::string  name = "Scalar")
inline
auto_NodeOutput lwpp::LWNode::autoScalarOutput ( const std::string  name = "Scalar")
inlineinherited
auto_NodeInput lwpp::NodeHandler::autoVectorInput ( const std::string  name = "Vector")
inline
auto_NodeOutput lwpp::LWNode::autoVectorOutput ( const std::string  name = "Vector")
inlineinherited
static int lwpp::NodeHandler::CB_NodeInputEvent ( void *  userData,
NodeInputID  nid,
LWNodalEvent  nevent,
ConnectionType  type 
)
inlinestaticprotected
virtual void lwpp::ItemHandler::ChangeID ( const LWItemID *  id_list)
inlinevirtualinherited
LWChanGroupID lwpp::LWNode::chanGrp ( )
inlineinherited
virtual void lwpp::RenderHandler::Cleanup ( )
inlinevirtualinherited
virtual void lwpp::NodeHandler::CustomPreview ( int  width,
int  height 
)
inlinevirtual
virtual const char* lwpp::InstanceHandler::DescLn ( )
inlinevirtualinherited
void lwpp::LWNode::disconnect ( LWNodeInput nid)
inlineinherited
virtual void lwpp::NodeHandler::Evaluate ( LWNodalAccess *  na,
NodeOutputID  outID,
NodeValue  value 
)
inlinevirtual
NodeInputID lwpp::LWNode::firstInput ( void  )
inlineinherited
NodeOutputID lwpp::LWNode::firstOutput ( void  )
inlineinherited
virtual unsigned int lwpp::NodeHandler::Flags ( void  )
inlinevirtual
NodeID lwpp::LWNode::getID ( void  )
inlineinherited
ConnectionType lwpp::LWNode::getType ( NodeValue  val)
inlineinherited
void* lwpp::LWNode::getValue ( NodeValue  val)
inlineinherited
virtual LWError lwpp::RenderHandler::Init ( int  mode)
inlinevirtualinherited
NodeInputID lwpp::LWNode::inputByIndex ( int  n)
inlineinherited
int lwpp::LWNode::inputGetIndex ( NodeInputID  nid)
inlineinherited
virtual LWError lwpp::Storeable::Load ( const LoadState ls)
inlinevirtualinherited

Load data from a LWLoadState.

Parameters:
*lsLWLoadState to load from
Returns:
An error string if an error occured, 0 otherwise

Reimplemented in lwpp::LWItem, lwpp::FileName, lwpp::Image, lwpp::ColourManager, lwpp::NodeEditor, and lwpp::VParm.

virtual LWError lwpp::RenderHandler::NewTime ( LWFrame  frame,
LWTime  time 
)
inlinevirtualinherited
virtual int lwpp::NodeHandler::NodeInputEvent ( NodeInputID  nid,
LWNodalEvent  nevent,
ConnectionType  type 
)
inlineprotectedvirtual

Reimplemented in lwpp::XPanelNodeHandler.

const char* lwpp::LWNode::nodeName ( )
inlineinherited
int lwpp::LWNode::numInputs ( void  )
inlineinherited
int lwpp::LWNode::numOutputs ( void  )
inlineinherited
NodeOutputID lwpp::LWNode::outputByIndex ( int  n)
inlineinherited
int lwpp::LWNode::outputGetIndex ( NodeOutputID  nid)
inlineinherited
virtual LWError lwpp::Storeable::Save ( const SaveState ss)
inlinevirtualinherited

Save data to a LWSaveState.

Parameters:
*ssLWSaveState to save to
Returns:
An error string if an error occured, 0 otherwise

Reimplemented in lwpp::LWItem, lwpp::FileName, lwpp::Image, lwpp::ColourManager, lwpp::NodeEditor, and lwpp::VParm.

const char* lwpp::LWNode::serverUserName ( )
inlineinherited
void lwpp::InstanceHandler::SetClassName ( const char *  n)
inlineinherited
void lwpp::InstanceHandler::SetDescription ( const char *  n)
inlineinherited
void lwpp::InstanceHandler::SetDescription ( const std::string &  s)
inlineinherited
void lwpp::LWNode::setID ( NodeID  _id)
inlineinherited
void lwpp::InstanceHandler::SetName ( const char *  n)
inlineinherited
void lwpp::LWNode::setNodeColor ( int  col[3])
inlineinherited

Set the GUI colours for this node.

void lwpp::LWNode::setNodeColor ( int  r,
int  g,
int  b 
)
inlineinherited

Set the GUI colours for this node.

void lwpp::LWNode::setNodePreviewType ( NodePreviewType  type)
inlineinherited
void lwpp::LWNode::setValue ( NodeValue  val,
double *  v 
)
inlineinherited
void lwpp::LWNode::setValue ( NodeValue  val,
LWDVector *  v 
)
inlineinherited
void lwpp::LWNode::setValue ( NodeValue  val,
double  a,
double  b,
double  c 
)
inlineinherited
void lwpp::LWNode::setValue ( NodeValue  val,
float  v[3] 
)
inlineinherited
void lwpp::LWNode::setValue ( NodeValue  val,
float  v 
)
inlineinherited
void lwpp::LWNode::setValue ( NodeValue  val,
double  v 
)
inlineinherited
void lwpp::LWNode::setValue ( NodeValue  val,
int *  v 
)
inlineinherited
void lwpp::LWNode::setValue ( NodeValue  val,
unsigned int *  v 
)
inlineinherited
void lwpp::LWNode::setValue ( NodeValue  val,
bool  v 
)
inlineinherited
void lwpp::LWNode::setValue ( NodeValue  val,
LWNodalMaterial *  material 
)
inlineinherited
void lwpp::LWNode::setValue ( NodeValue  val,
Vector3d v 
)
inlineinherited
void lwpp::InstanceHandler::Update ( )
inlineinherited
void lwpp::InstanceHandler::Update ( const char *  cName)
inlineinherited
void lwpp::LWNode::UpdateNodePreview ( )
inlineinherited

Immediately update the preview for this node.

virtual const LWItemID* lwpp::ItemHandler::UseItems ( )
inlinevirtualinherited

Member Data Documentation

NodeID lwpp::NodeHandler::Context
protected
LWFrame lwpp::RenderHandler::currentFrame
protectedinherited
LWTime lwpp::RenderHandler::currentTime
protectedinherited
lwpp::LWItemTracker lwpp::ItemHandler::ItemTracker
protectedinherited
const char* lwpp::InstanceHandler::m_className
protectedinherited
std::string lwpp::InstanceHandler::m_description
protectedinherited
const char* lwpp::InstanceHandler::m_pluginName
protectedinherited
InstanceUpdate lwpp::InstanceHandler::m_update
protectedinherited
int lwpp::RenderHandler::renderMode
protectedinherited

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