C# 클래스 GPUGraph.Node

상속: ISerializable
파일 보기 프로젝트 열기: heyx3/GPUNoiseForUnity 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
Inputs List
Owner Graph
Pos UnityEngine.Rect
UID int

보호된 프로퍼티들

프로퍼티 타입 설명
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