Files
LifeProject/LifeGraphics/shaders/IShaderGraphNode.h
T
2025-05-13 02:46:21 +03:00

36 lines
1.0 KiB
C++

#ifndef IShaderGraphNode_h__
#define IShaderGraphNode_h__
#include <LString.h>
#include "IShaderTypes.h"
#include <vector>
#include "IPropertyHolder.h"
#include <delegate/Delegate.h>
#include "shaders/IShaderGraphNodePort.h"
namespace LifeGraphics
{
class IShaderGraphNode : public LifeCore::IPropertyHolder
{
public:
int resource_id;
ShaderNodeType NodeType;
String Name;
bool checked;
int id;
typedef std::vector<IShaderGraphNodePort*> PortCollection;
typedef std::vector<IShaderGraphNodePort*>::iterator PortCollectionItr;
PortCollection Inputs;
PortCollection Outputs;
IShaderGraphNode();
IShaderGraphNodePort* GetInputPortByName(const String& name);
IShaderGraphNodePort* GetInputPort(size_t id);
IShaderGraphNodePort* GetOutputPortByName(const String& name);
IShaderGraphNodePort* GetOutputPortByID(size_t id);
bool Serialize(LifeCore::IMemoryStream* stm);
bool Deserialize(LifeCore::IMemoryStream* stm);
size_t GetOutputID(IShaderGraphNodePort* port);
};
}
#endif // IShaderGraphNode_h__