C# Класс GPUGraph.Node

Наследование: ISerializable
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Inputs List
Owner Graph
Pos UnityEngine.Rect
UID int

Защищенные свойства (Protected)

Свойство Тип Описание
InputDefaultVals List
InputNames List

Открытые методы

Метод Описание
AreFloatsDifferent ( float f1, float f2 ) : bool

Compares two floats like normal, except that if they are both NaN, they are considered to be *equal*.

Clone ( ) : Node

Generates a new node identical to this one, including the UID, but with no graph owner.

Clone ( Graph newOwner, bool addToOwner, int idOffset ) : Node

Generates a new node identical to this one, including the UID, but with a different graph owner.

EmitCode ( StringBuilder outCode ) : void

Appends the actual shader code that computes the output variable.

EmitDefs ( StringBuilder outCode ) : void

Appends any necessary definitions to the given shader.

EmitProperties ( StringBuilder outCode ) : void

Appends any necessary Shaderlab property definitions to the given shader.

GetInputDefaultValue ( int index ) : float
GetInputName ( int index ) : string
GetObjectData ( SerializationInfo info, StreamingContext context ) : void

Outputs class data to a serializer.

Node ( Rect pos, List inputs, List inputNames, List inputDefaultVals ) : System
Node ( SerializationInfo info, StreamingContext context ) : System
OnAddedToGraph ( ) : void

Called when this node's owner/uid is set.

OnGUI ( int &clickedInput, int isSelected ) : GUIResults

Runs the GUI display window for this node. Returns what happened.

OnGraphLoaded ( ) : void

Called after this node's owner is done loading from a file. This is better than a method with OnDeserializedAttribute because this method is only called *after* the graph itself is fully loaded.

OnPreProcess ( ) : IEnumerable

Called right before the graph generates a shader. Special nodes can take this opportunity to modify the graph however they want. Returns any new nodes that have been added to the graph.

Защищенные методы

Метод Описание
CustomGUI ( ) : bool

Child nodes can add custom GUI stuff through this method. Must return whether anything has actually changed.

MakeClone ( ) : Node

Should create the right type of node with the same properties as this one. The base properties of all nodes don't need to be filled in by this method.

Node ( ) : System

Описание методов

AreFloatsDifferent() публичный статический Метод

Compares two floats like normal, except that if they are both NaN, they are considered to be *equal*.
public static AreFloatsDifferent ( float f1, float f2 ) : bool
f1 float
f2 float
Результат bool

Clone() публичный Метод

Generates a new node identical to this one, including the UID, but with no graph owner.
public Clone ( ) : Node
Результат Node

Clone() публичный Метод

Generates a new node identical to this one, including the UID, but with a different graph owner.
public Clone ( Graph newOwner, bool addToOwner, int idOffset ) : Node
newOwner Graph
addToOwner bool
idOffset int
Результат Node

CustomGUI() защищенный Метод

Child nodes can add custom GUI stuff through this method. Must return whether anything has actually changed.
protected CustomGUI ( ) : bool
Результат bool

EmitCode() публичный Метод

Appends the actual shader code that computes the output variable.
public EmitCode ( StringBuilder outCode ) : void
outCode StringBuilder
Результат void

EmitDefs() публичный Метод

Appends any necessary definitions to the given shader.
public EmitDefs ( StringBuilder outCode ) : void
outCode StringBuilder
Результат void

EmitProperties() публичный Метод

Appends any necessary Shaderlab property definitions to the given shader.
public EmitProperties ( StringBuilder outCode ) : void
outCode StringBuilder
Результат void

GetInputDefaultValue() публичный Метод

public GetInputDefaultValue ( int index ) : float
index int
Результат float

GetInputName() публичный Метод

public GetInputName ( int index ) : string
index int
Результат string

GetObjectData() публичный Метод

Outputs class data to a serializer.
public GetObjectData ( SerializationInfo info, StreamingContext context ) : void
info System.Runtime.Serialization.SerializationInfo
context System.Runtime.Serialization.StreamingContext
Результат void

MakeClone() защищенный абстрактный Метод

Should create the right type of node with the same properties as this one. The base properties of all nodes don't need to be filled in by this method.
protected abstract MakeClone ( ) : Node
Результат Node

Node() защищенный Метод

protected Node ( ) : System
Результат System

Node() публичный Метод

public Node ( Rect pos, List inputs, List inputNames, List inputDefaultVals ) : System
pos UnityEngine.Rect
inputs List
inputNames List
inputDefaultVals List
Результат System

Node() публичный Метод

public Node ( SerializationInfo info, StreamingContext context ) : System
info System.Runtime.Serialization.SerializationInfo
context System.Runtime.Serialization.StreamingContext
Результат System

OnAddedToGraph() публичный Метод

Called when this node's owner/uid is set.
public OnAddedToGraph ( ) : void
Результат void

OnGUI() публичный Метод

Runs the GUI display window for this node. Returns what happened.
public OnGUI ( int &clickedInput, int isSelected ) : GUIResults
clickedInput int /// If the user clicked an input, /// the index of that input will be stored in this variable. ///
isSelected int /// If this node's output was previously selected, pass -1. /// If an input was selected, pass the index of that input. /// Otherwise, pass anything else. ///
Результат GUIResults

OnGraphLoaded() публичный Метод

Called after this node's owner is done loading from a file. This is better than a method with OnDeserializedAttribute because this method is only called *after* the graph itself is fully loaded.
public OnGraphLoaded ( ) : void
Результат void

OnPreProcess() публичный Метод

Called right before the graph generates a shader. Special nodes can take this opportunity to modify the graph however they want. Returns any new nodes that have been added to the graph.
public OnPreProcess ( ) : IEnumerable
Результат IEnumerable

Описание свойств

InputDefaultVals защищенное свойство

protected List InputDefaultVals
Результат List

InputNames защищенное свойство

protected List InputNames
Результат List

Inputs публичное свойство

The inputs into this node. Anyone outside this class should never modify it! Any child classes should take care that "InputNames" and "InputDefaultVals" always have the same number of elements as this list.
public List Inputs
Результат List

Owner публичное свойство

The graph that owns this instance.
public Graph,GPUGraph Owner
Результат Graph

Pos публичное свойство

This node's window's position in the editor.
public Rect,UnityEngine Pos
Результат UnityEngine.Rect

UID публичное свойство

A unique identifier in the graph.
public int UID
Результат int