Ejemplo n.º 1
0
        public FlatMirror(IRenderableObject mirroredObject, Plane plane)
        {
            LocalMatrix = Matrix.Reflection(plane);
            Add(mirroredObject.Clone());

            var point = plane.Normal * plane.D;

            _object = new FlatMirrorObject(
                Matrix.Scaling(1000f, 1000f, 1000f) * Matrix.Translation(point))
            {
                ParentMatrix = Matrix
            };
        }
Ejemplo n.º 2
0
        private FlatMirror([CanBeNull] IRenderableObject mirroredObject, Plane plane, FlatMirrorMode mode)
        {
            LocalMatrix = Matrix.Reflection(plane);

            var point  = plane.Normal * plane.D;
            var matrix = Matrix.Scaling(200f, 200f, 200f) * Matrix.Translation(point);

            if (mirroredObject != null)
            {
                Add(mirroredObject.Clone());
                _object = new FlatMirrorObject(matrix, mode)
                {
                    ParentMatrix = Matrix
                };
            }
            else
            {
                _object = new FlatMirrorObject(matrix, mode)
                {
                    ParentMatrix = Matrix
                };
            }
        }