'Difference between renderer and session methods in ARKit

I checked the following two sample codes: https://developer.apple.com/documentation/arkit/capturing_body_motion_in_3d

func session(_ session: ARSession, didUpdate anchors: [ARAnchor])
{  
    for anchor in anchors        
    {            
        guard let bodyAnchor = anchor as? ARBodyAnchor else { continue }
        let skeleton = bodyAnchor.skeleton
    }
}

and: https://developer.apple.com/documentation/arkit/tracking_and_visualizing_faces 

func renderer(_ renderer: SCNSceneRenderer, didUpdate node: SCNNode, for anchor: ARAnchor)
{
    guard let faceAnchor = anchor as? ARFaceAnchor else { return }
    let blendShapes = faceAnchor.blendShapes    
}

The code to extract the BlendShape of the face uses "renderer" to get the value of the BlendShape.

However, the code that detects body movement uses "session" to get the value.

Both of the two codes seem to be for getting values that are updated from ARAnchor.

What's the difference between "renderer" and "session"?

How do I use the two codes at different times?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source