Example #1
0
 public void CameraProjectionMatrixDidChange(CC3Camera camera)
 {
     if (_activeCamera == camera)
     {
         _graphicsContext.ProjectionMatrix = _activeCamera.ProjectionMatrix;
     }
 }
        protected static void UpdateActionForCameraViewMatrix(CC3CameraAction cameraAction, CC3Camera cameraTarget, 
                                                              float timeElapsedFraction, float timeIncrementFraction)
        {
            CC3Vector incrementalCameraTranslationChange =
                cameraAction.IncrementalTranslationChange(timeElapsedFraction, timeIncrementFraction);

            CC3Quaternion incrementalCameraRotationChangeRelativeToTarget =
                cameraAction.IncrementalCameraRotationChangeRelativeToCameraTarget(timeElapsedFraction, timeIncrementFraction);

            CC3Vector incrementalCameraTargetTranslationChange =
                cameraAction.IncrementalCameraTargetTranslationChange(timeElapsedFraction, timeIncrementFraction);

            cameraTarget.IncrementallyUpdateViewTransform(incrementalCameraTranslationChange,
                                                          incrementalCameraTargetTranslationChange,
                                                          incrementalCameraRotationChangeRelativeToTarget);
        }
Example #3
0
 public void CameraViewMatrixDidChange(CC3Camera camera)
 {
     if (_activeCamera == camera)
     {
         _graphicsContext.ViewMatrix = _activeCamera.ViewMatrix;
     }
 }