SwiftclassShaderGraph
class ShaderGraph.ShaderGraph
Structure
What a query’s scopes step through. Every node here can be matched — see the syntax.
inherits{}
- protocolSwift.Equatable
Members 35
- deinit
deinit - field
var functionConstantInputs: [String]+0x30 - field
var inputDefaultValues: [String : ShaderGraph.ShaderGraph.Value?]+0x20 - field
var materialXVersion: ShaderGraph.ShaderGraph.NodeLibrary.Version?+0x10 - field
var primvarMappings: [String : ShaderGraph.ShaderGraph.TextureCoordinate]+0x28 - field
var sgGraph: ShaderGraph.SGGraph+0x18 - func
addConstant(_: ShaderGraph.ShaderGraph.Value, named: String) throws -> String - func
addConstant(ShaderGraph.ShaderGraph.Value) throws -> String - func
addEdge(ShaderGraph.ShaderGraph.Edge) throws -> () - func
addNode(ShaderGraph.ShaderGraph.Node) throws -> String - func
canAddEdge(ShaderGraph.ShaderGraph.Edge) -> Bool - func
canAddNode(ShaderGraph.ShaderGraph.Node) -> Bool - func
connect(_: ShaderGraph.ShaderGraph.Node, outputPort: String?, to: ShaderGraph.ShaderGraph.Node, inputPort: String) throws -> () - func
connect(_: String, outputPort: String?, to: String, inputPort: String) throws -> () - func
containsEdge(ShaderGraph.ShaderGraph.Edge) -> Bool - func
encode() throws -> Foundation.Data - func
removeEdge(ShaderGraph.ShaderGraph.Edge) throws -> () - func
removeNode(String) throws -> () - func
replace(nodes: [String : ShaderGraph.ShaderGraph.Node], edges: [ShaderGraph.ShaderGraph.Edge]) throws -> () - func
uniqueName(String) -> String - func
updateNode(_: ShaderGraph.ShaderGraph.Node, forKey: String) throws -> () - func
validate() -> Bool - func
validateAddingEdge(ShaderGraph.ShaderGraph.Edge) throws -> () - func
validateAddingNode(ShaderGraph.ShaderGraph.Node) throws -> () - init
ShaderGraph.ShaderGraph.__allocating_init(sgGraph: ShaderGraph.SGGraph) -> ShaderGraph.ShaderGraph - init
ShaderGraph.ShaderGraph.__allocating_init(from: Foundation.Data) throws -> ShaderGraph.ShaderGraph - init
ShaderGraph.ShaderGraph.__allocating_init(named: String, inputs: [ShaderGraph.ShaderGraph.NodeDefinition.Input], outputs: [ShaderGraph.ShaderGraph.NodeDefinition.Output], nodeLibrary: ShaderGraph.ShaderGraph.NodeLibrary) throws -> ShaderGraph.ShaderGraph - init
ShaderGraph.ShaderGraph.__allocating_init(named: String, inputs: [ShaderGraph.ShaderGraph.NodeDefinition.Input], outputs: [ShaderGraph.ShaderGraph.NodeDefinition.Output]) throws -> ShaderGraph.ShaderGraph - subscript
subscript.getter : (String) -> ShaderGraph.ShaderGraph.Node? - var
final var arguments: ShaderGraph.ShaderGraph.Node { get } - var
final var edges: [ShaderGraph.ShaderGraph.Edge] { get } - var
final var inputs: [ShaderGraph.ShaderGraph.NodeDefinition.Input] { get } - var
final var nodes: [String : ShaderGraph.ShaderGraph.Node] { get } - var
final var outputs: [ShaderGraph.ShaderGraph.NodeDefinition.Output] { get } - var
final var results: ShaderGraph.ShaderGraph.Node { get }
Header
class ShaderGraph { enum Value { case bool(Swift.Bool) case uchar(Swift.UInt8) case int(Swift.Int32) case uint(Swift.UInt32) case half(Swift.Float16) case float(Swift.Float) case string(Swift.String) case float2(Swift.SIMD2<Swift.Float>) case float3(Swift.SIMD3<Swift.Float>) case float4(Swift.SIMD4<Swift.Float>) case half2(Swift.SIMD2<Swift.Float16>) case half3(Swift.SIMD3<Swift.Float16>) case half4(Swift.SIMD4<Swift.Float16>) case int2(Swift.SIMD2<Swift.Int32>) case int3(Swift.SIMD3<Swift.Int32>) case int4(Swift.SIMD4<Swift.Int32>) case float2x2(__C.simd_float2x2) case float3x3(__C.simd_float3x3) case float4x4(__C.simd_float4x4) case half2x2(__C.simd_half2x2) case half3x3(__C.simd_half3x3) case half4x4(__C.simd_half4x4) case cgColor3(__C.CGColorRef) case cgColor4(__C.CGColorRef) init(value: Swift.String, type: ShaderGraph.ShaderGraph.DataType) throws init(sgType: __C.SGDataType, sgStorage: ShaderGraph.SGDataTypeStorage) var dataType: ShaderGraph.ShaderGraph.DataType { get } var sgDataType: __C.SGDataType { get } var sgDataTypeStorage: ShaderGraph.SGDataTypeStorage { get } var type: ShaderGraph.ShaderGraph.DataType { get } } enum DataType { case bool case uchar case int case uint case half case float case string case float2 case float3 case float4 case half2 case half3 case half4 case int2 case int3 case int4 case float2x2 case float3x3 case float4x4 case half2x2 case half3x3 case half4x4 case surfaceShader case geometryModifier case postLightingShader case cgColor3 case cgColor4 case texture init(sgDataType: __C.SGDataType) init(name: Swift.String, kind: ShaderGraph.MaterialXDataType.Kind) var sgDataType: __C.SGDataType { get } } enum TextureCoordinate { case uv0 case uv1 case uv2 case uv3 case uv4 case uv5 case uv6 case uv7 init(name: Swift.String) throws var name: Swift.String { get } } struct NodeDefinition { enum Platform { case iOS case macOS case watchOS case tvOS case visionOS } enum Availability { case available(introduced: __C.NSOperatingSystemVersion?, deprecated: __C.NSOperatingSystemVersion?, obsoleted: __C.NSOperatingSystemVersion?) case unavailable init(coreAvailabilityKind: ShaderGraph.NodeDef.Availability.AvailabilityKind) } struct SemanticType { let name: Swift.String let values: [Swift.String]? init(name: Swift.String, values: [Swift.String]?) } struct Output { let name: Swift.String let type: ShaderGraph.ShaderGraph.DataType let semanticType: ShaderGraph.ShaderGraph.NodeDefinition.SemanticType? let defaultValue: ShaderGraph.ShaderGraph.Value? init(name: Swift.String, type: ShaderGraph.ShaderGraph.DataType, semanticType: ShaderGraph.ShaderGraph.NodeDefinition.SemanticType?, defaultValue: ShaderGraph.ShaderGraph.Value?) init(_: ShaderGraph.BuiltInDefinition.OutputSpec) init(_: ShaderGraph.NodeDef.IOSpec) throws } struct Input { let name: Swift.String let type: ShaderGraph.ShaderGraph.DataType let isUniform: Swift.Bool let semanticType: ShaderGraph.ShaderGraph.NodeDefinition.SemanticType? let defaultValue: ShaderGraph.ShaderGraph.Value? init(name: Swift.String, type: ShaderGraph.ShaderGraph.DataType, isUniform: Swift.Bool, semanticType: ShaderGraph.ShaderGraph.NodeDefinition.SemanticType?, defaultValue: ShaderGraph.ShaderGraph.Value?) init(_: ShaderGraph.BuiltInDefinition.InputSpec) init(_: ShaderGraph.NodeDef.IOSpec) throws } var name: Swift.String var functionalName: Swift.String var group: Swift.String? var availability: [ShaderGraph.ShaderGraph.NodeDefinition.Platform : ShaderGraph.ShaderGraph.NodeDefinition.Availability] var inputs: [ShaderGraph.ShaderGraph.NodeDefinition.Input] var outputs: [ShaderGraph.ShaderGraph.NodeDefinition.Output] init(name: Swift.String, inputs: [ShaderGraph.BuiltInDefinition.InputSpec], outputs: [ShaderGraph.BuiltInDefinition.OutputSpec]) init(builtIn: ShaderGraph.BuiltInDefinition) throws init(nodeDef: ShaderGraph.NodeDef) throws func asBuiltInDefinition() -> ShaderGraph.BuiltInDefinition func isAvailable(on: ShaderGraph.ShaderGraph.NodeDefinition.Platform, version: __C.NSOperatingSystemVersion?) -> Swift.Bool } struct Node { enum NodeData { case definition(ShaderGraph.ShaderGraph.NodeDefinition) case graph(ShaderGraph.ShaderGraph) case constant(ShaderGraph.ShaderGraph.Value) init(nodeData: ShaderGraph.NodeData) func asSGNodeData() throws -> ShaderGraph.NodeData } var name: Swift.String var data: ShaderGraph.ShaderGraph.Node.NodeData init(from: ShaderGraph.SGNode) init(name: Swift.String, data: ShaderGraph.ShaderGraph.Node.NodeData) func asSGNode() throws -> ShaderGraph.SGNode } struct Edge { var outputNode: Swift.String var outputPort: Swift.String? var inputNode: Swift.String var inputPort: Swift.String init(outputNode: Swift.String, outputPort: Swift.String?, inputNode: Swift.String, inputPort: Swift.String) var from: Swift.String { get } var to: Swift.String { get } } class NodeLibrary { struct Version { enum Kind { case materialX138 case materialX139 } let kind: ShaderGraph.ShaderGraph.NodeLibrary.Version.Kind var materialXVersion: ShaderGraph.MaterialXVersion { get } static var default: ShaderGraph.ShaderGraph.NodeLibrary.Version { get } static var materialX138: ShaderGraph.ShaderGraph.NodeLibrary.Version { get } static var materialX139: ShaderGraph.ShaderGraph.NodeLibrary.Version { get } } let nodeDefStore: ShaderGraph.NodeDefStore let version: ShaderGraph.ShaderGraph.NodeLibrary.Version init(version: ShaderGraph.ShaderGraph.NodeLibrary.Version) init(nodeDefStore: ShaderGraph.NodeDefStore, version: ShaderGraph.ShaderGraph.NodeLibrary.Version) final var definitions: some Swift.Collection<ShaderGraph.ShaderGraph.NodeDefinition> { get } final func makeNode(from: ShaderGraph.ShaderGraph.NodeDefinition) throws -> ShaderGraph.ShaderGraph.Node final func definition(named: Swift.String) -> ShaderGraph.ShaderGraph.NodeDefinition? final func definitions(function: Swift.String, input: ShaderGraph.ShaderGraph.DataType) -> [ShaderGraph.ShaderGraph.NodeDefinition] final func definitions(function: Swift.String, inputs: ShaderGraph.ShaderGraph.DataType...) -> [ShaderGraph.ShaderGraph.NodeDefinition] final func definitions(function: Swift.String, inputs: [ShaderGraph.ShaderGraph.DataType]) -> [ShaderGraph.ShaderGraph.NodeDefinition] final func definitions(function: Swift.String, output: ShaderGraph.ShaderGraph.DataType) -> [ShaderGraph.ShaderGraph.NodeDefinition] deinit } final var materialXVersion: ShaderGraph.ShaderGraph.NodeLibrary.Version? final var sgGraph: ShaderGraph.SGGraph var inputDefaultValues: [Swift.String : ShaderGraph.ShaderGraph.Value?] final var primvarMappings: [Swift.String : ShaderGraph.ShaderGraph.TextureCoordinate] final var functionConstantInputs: [Swift.String] init(named: Swift.String, inputs: [ShaderGraph.ShaderGraph.NodeDefinition.Input], outputs: [ShaderGraph.ShaderGraph.NodeDefinition.Output]) throws init(named: Swift.String, inputs: [ShaderGraph.ShaderGraph.NodeDefinition.Input], outputs: [ShaderGraph.ShaderGraph.NodeDefinition.Output], nodeLibrary: ShaderGraph.ShaderGraph.NodeLibrary) throws init(sgGraph: ShaderGraph.SGGraph) init(from: Foundation.Data) throws final var arguments: ShaderGraph.ShaderGraph.Node { get } final var edges: [ShaderGraph.ShaderGraph.Edge] { get } final var inputs: [ShaderGraph.ShaderGraph.NodeDefinition.Input] { get } final var nodes: [Swift.String : ShaderGraph.ShaderGraph.Node] { get } final var outputs: [ShaderGraph.ShaderGraph.NodeDefinition.Output] { get } final var results: ShaderGraph.ShaderGraph.Node { get } final func canAddEdge(_: ShaderGraph.ShaderGraph.Edge) -> Swift.Bool final func canAddNode(_: ShaderGraph.ShaderGraph.Node) -> Swift.Bool final func removeEdge(_: ShaderGraph.ShaderGraph.Edge) throws final func removeNode(_: Swift.String) throws final func uniqueName(_: Swift.String) -> Swift.String final func updateNode(_: ShaderGraph.ShaderGraph.Node, forKey: Swift.String) throws final func addConstant(_: ShaderGraph.ShaderGraph.Value, named: Swift.String) throws -> Swift.String final func addConstant(_: ShaderGraph.ShaderGraph.Value) throws -> Swift.String final func containsEdge(_: ShaderGraph.ShaderGraph.Edge) -> Swift.Bool final func validateAddingEdge(_: ShaderGraph.ShaderGraph.Edge) throws final func validateAddingNode(_: ShaderGraph.ShaderGraph.Node) throws final func encode() throws -> Foundation.Data final func addEdge(_: ShaderGraph.ShaderGraph.Edge) throws final func addNode(_: ShaderGraph.ShaderGraph.Node) throws -> Swift.String final func connect(_: ShaderGraph.ShaderGraph.Node, outputPort: Swift.String?, to: ShaderGraph.ShaderGraph.Node, inputPort: Swift.String) throws final func connect(_: Swift.String, outputPort: Swift.String?, to: Swift.String, inputPort: Swift.String) throws final func replace(nodes: [Swift.String : ShaderGraph.ShaderGraph.Node], edges: [ShaderGraph.ShaderGraph.Edge]) throws final func validate() -> Swift.Bool final subscript(_: Swift.String) -> ShaderGraph.ShaderGraph.Node? { get } deinit }