pub unsafe trait SCNNodeRendererDelegate: NSObjectProtocol {
// Provided method
unsafe fn renderNode_renderer_arguments(
&self,
node: &SCNNode,
renderer: &SCNRenderer,
arguments: &NSDictionary<NSString, AnyObject>,
)
where Self: Sized + Message { ... }
}SCNNode only.Expand description
The SCNNodeRendererDelegate protocol declares the methods that an instance of SCNNode invokes to let a delegate customize its rendering.
See also Apple’s documentation
Provided Methods§
Sourceunsafe fn renderNode_renderer_arguments(
&self,
node: &SCNNode,
renderer: &SCNRenderer,
arguments: &NSDictionary<NSString, AnyObject>,
)
Available on crate feature SCNRenderer only.
unsafe fn renderNode_renderer_arguments( &self, node: &SCNNode, renderer: &SCNRenderer, arguments: &NSDictionary<NSString, AnyObject>, )
SCNRenderer only.Invoked when a node is rendered.
The preferred way to customize the rendering is to tweak the material properties of the different materials of the node’s geometry. SCNMaterial conforms to the SCNShadable protocol and allows for more advanced rendering using GLSL. You would typically use a renderer delegate with a node that has no geometry and only serves as a location in space. An example would be attaching a particle system to that node and render it with custom OpenGL code. Only drawing calls and the means to achieve them are supposed to be performed during the renderer delegate callback, any changes in the model (nodes, geometry…) would involve unexpected results.
Parameter node: The node to render.
Parameter renderer: The scene renderer to render into.
Parameter arguments: A dictionary whose values are SCNMatrix4 matrices wrapped in NSValue objects.