SetLens() public method

public SetLens ( float aspect = 0f ) : void
aspect float
return void
コード例 #1
0
 private void SetWheelShadowCamera() {
     _shadowSize = _carHelper.GetWheelShadowSize() * (1f + 2f * WheelPadding / WheelSize);
     var size = Math.Max(_shadowSize.X, _shadowSize.Z) * 2f;
     _shadowCamera = new CameraOrtho {
         Width = size,
         Height = size,
         NearZ = 0.001f,
         FarZ = size + 20f
     };
     _shadowCamera.SetLens(1f);
     _shadowDestinationTransform = Matrix.Scaling(new Vector3(-_shadowSize.X, _shadowSize.Y, _shadowSize.Z)) * Matrix.RotationY(MathF.PI);
 }
コード例 #2
0
ファイル: ShadowsDirectional.cs プロジェクト: gro-ove/actools
 public CameraOrthoShadow() {
     _innerCamera = new CameraOrtho();
     _innerCamera.SetLens(1f);
 }
コード例 #3
0
 private void SetBodyShadowCamera() {
     _shadowSize = _ambientBodyShadowSize * (1f + 2f * BodyPadding / BodySize);
     var size = Math.Max(_shadowSize.X, _shadowSize.Z) * 2f;
     _shadowCamera = new CameraOrtho {
         Width = size,
         Height = size,
         NearZ = 0.001f,
         FarZ = size + 20f
     };
     _shadowCamera.SetLens(1f);
     _shadowDestinationTransform = Matrix.Scaling(new Vector3(-_shadowSize.X, _shadowSize.Y, _shadowSize.Z)) * Matrix.RotationY(MathF.PI);
 }