AcTools.Render.Base.Shadows.ShadowsPoint.Update C# (CSharp) Method

Update() public method

public Update ( System.Vector3 center ) : void
center System.Vector3
return void
        public void Update(Vector3 center) {
            var targets = new[] {
                new Vector3(center.X + 1, center.Y, center.Z),
                new Vector3(center.X - 1, center.Y, center.Z),
                new Vector3(center.X, center.Y + 1, center.Z),
                new Vector3(center.X, center.Y - 1, center.Z),
                new Vector3(center.X, center.Y, center.Z + 1),
                new Vector3(center.X, center.Y, center.Z - 1)
            };

            var ups = new[] {
                new Vector3(0, 1, 0),
                new Vector3(0, 1, 0),
                new Vector3(0, 0, -1),
                new Vector3(0, 0, 1),
                new Vector3(0, 1, 0),
                new Vector3(0, 1, 0),
            };

            for (var i = 0; i < 6; i++) {
                _cameras[i] = new FpsCamera(MathF.PI / 2) {
                    NearZ = 0.1f,
                    FarZ = 100.0f
                };
                _cameras[i].LookAt(center, targets[i], ups[i]);
                _cameras[i].SetLens(1.0f);
                _cameras[i].UpdateViewMatrix();
            }
        }