pub unsafe trait SCNSceneRendererDelegate: NSObjectProtocol {
// Provided methods
unsafe fn renderer_updateAtTime(
&self,
renderer: &ProtocolObject<dyn SCNSceneRenderer>,
time: NSTimeInterval,
)
where Self: Sized + Message { ... }
unsafe fn renderer_didApplyAnimationsAtTime(
&self,
renderer: &ProtocolObject<dyn SCNSceneRenderer>,
time: NSTimeInterval,
)
where Self: Sized + Message { ... }
unsafe fn renderer_didSimulatePhysicsAtTime(
&self,
renderer: &ProtocolObject<dyn SCNSceneRenderer>,
time: NSTimeInterval,
)
where Self: Sized + Message { ... }
unsafe fn renderer_didApplyConstraintsAtTime(
&self,
renderer: &ProtocolObject<dyn SCNSceneRenderer>,
time: NSTimeInterval,
)
where Self: Sized + Message { ... }
unsafe fn renderer_willRenderScene_atTime(
&self,
renderer: &ProtocolObject<dyn SCNSceneRenderer>,
scene: &SCNScene,
time: NSTimeInterval,
)
where Self: Sized + Message { ... }
unsafe fn renderer_didRenderScene_atTime(
&self,
renderer: &ProtocolObject<dyn SCNSceneRenderer>,
scene: &SCNScene,
time: NSTimeInterval,
)
where Self: Sized + Message { ... }
}SCNSceneRenderer only.Expand description
Implement this protocol to perform operations at various times during the rendering
See also Apple’s documentation
Provided Methods§
Sourceunsafe fn renderer_updateAtTime(
&self,
renderer: &ProtocolObject<dyn SCNSceneRenderer>,
time: NSTimeInterval,
)
unsafe fn renderer_updateAtTime( &self, renderer: &ProtocolObject<dyn SCNSceneRenderer>, time: NSTimeInterval, )
Implement this to perform per-frame game logic. Called exactly once per frame before any animation and actions are evaluated and any physics are simulated.
Parameter renderer: The renderer that will render the scene.
Parameter time: The time at which to update the scene.
All modifications done within this method don’t go through the transaction model, they are directly applied on the presentation tree.
Sourceunsafe fn renderer_didApplyAnimationsAtTime(
&self,
renderer: &ProtocolObject<dyn SCNSceneRenderer>,
time: NSTimeInterval,
)
unsafe fn renderer_didApplyAnimationsAtTime( &self, renderer: &ProtocolObject<dyn SCNSceneRenderer>, time: NSTimeInterval, )
Invoked on the delegate once the scene renderer did apply the animations.
Parameter renderer: The renderer that did render the scene.
Parameter time: The time at which the animations were applied.
All modifications done within this method don’t go through the transaction model, they are directly applied on the presentation tree.
Sourceunsafe fn renderer_didSimulatePhysicsAtTime(
&self,
renderer: &ProtocolObject<dyn SCNSceneRenderer>,
time: NSTimeInterval,
)
unsafe fn renderer_didSimulatePhysicsAtTime( &self, renderer: &ProtocolObject<dyn SCNSceneRenderer>, time: NSTimeInterval, )
Invoked on the delegate once the scene renderer did simulate the physics.
Parameter renderer: The renderer that did render the scene.
Parameter time: The time at which the physics were simulated.
All modifications done within this method don’t go through the transaction model, they are directly applied on the presentation tree.
Sourceunsafe fn renderer_didApplyConstraintsAtTime(
&self,
renderer: &ProtocolObject<dyn SCNSceneRenderer>,
time: NSTimeInterval,
)
unsafe fn renderer_didApplyConstraintsAtTime( &self, renderer: &ProtocolObject<dyn SCNSceneRenderer>, time: NSTimeInterval, )
Invoked on the delegate once the scene renderer did apply the constraints.
Parameter renderer: The renderer that did render the scene.
Parameter time: The time at which the constraints were simulated.
All modifications done within this method don’t go through the transaction model, they are directly applied on the presentation tree.
Sourceunsafe fn renderer_willRenderScene_atTime(
&self,
renderer: &ProtocolObject<dyn SCNSceneRenderer>,
scene: &SCNScene,
time: NSTimeInterval,
)
Available on crate feature SCNScene only.
unsafe fn renderer_willRenderScene_atTime( &self, renderer: &ProtocolObject<dyn SCNSceneRenderer>, scene: &SCNScene, time: NSTimeInterval, )
SCNScene only.Invoked on the delegate before the scene renderer renders the scene. At this point the openGL context and the destination framebuffer are bound.
Parameter renderer: The renderer that will render the scene.
Parameter scene: The scene to be rendered.
Parameter time: The time at which the scene is to be rendered.
Starting in 10.10 all modifications done within this method don’t go through the transaction model, they are directly applied on the presentation tree.
Sourceunsafe fn renderer_didRenderScene_atTime(
&self,
renderer: &ProtocolObject<dyn SCNSceneRenderer>,
scene: &SCNScene,
time: NSTimeInterval,
)
Available on crate feature SCNScene only.
unsafe fn renderer_didRenderScene_atTime( &self, renderer: &ProtocolObject<dyn SCNSceneRenderer>, scene: &SCNScene, time: NSTimeInterval, )
SCNScene only.Invoked on the delegate once the scene renderer did render the scene.
Parameter renderer: The renderer that did render the scene.
Parameter scene: The rendered scene.
Parameter time: The time at which the scene was rendered.
Starting in 10.10 all modifications done within this method don’t go through the transaction model, they are directly applied on the presentation tree.