// Copyright (c) 2010-2014 SharpDX - Alexandre Mutel // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. using SharpDX.Mathematics.Interop; namespace SharpDX.Direct2D1.Effects { /// /// Rotates the image in 3 dimensions as if viewed from a distance. /// /// /// The is more convenient than the effect, but only exposes a subset of the functionality. You can compute a full 3D transformation matrix and apply a more arbitrary transform matrix to an image using the effect. /// public class PerspectiveTransform3D : Effect { /// /// Creates a new instance of the class. /// /// The device context where this effect is attached to. public PerspectiveTransform3D(DeviceContext deviceContext) : base(deviceContext, Effect.PerspectiveTransform3D) { } /// /// Image interpolation mode. /// public PerspectiveTransform3DInteroplationMode InterpolationMode { get { return GetEnumValue((int)PerspectiveTransform3DProperties.InterpolationMode); } set { SetEnumValue((int)PerspectiveTransform3DProperties.InterpolationMode, value); } } /// /// The border mode. /// public BorderMode BorderMode { get { return GetEnumValue((int)PerspectiveTransform3DProperties.BorderMode); } set { SetEnumValue((int)PerspectiveTransform3DProperties.BorderMode, value); } } /// /// The perspective depth. /// public float Depth { get { return GetFloatValue((int)PerspectiveTransform3DProperties.Depth); } set { SetValue((int)PerspectiveTransform3DProperties.Depth, value); } } /// /// The perspective origin. /// public RawVector2 PerspectiveOrigin { get { return GetVector2Value((int)PerspectiveTransform3DProperties.PerspectiveOrigin); } set { SetValue((int)PerspectiveTransform3DProperties.PerspectiveOrigin, value); } } /// /// The transformation local offset. /// public RawVector3 LocalOffset { get { return GetVector3Value((int)PerspectiveTransform3DProperties.LocalOffset); } set { SetValue((int)PerspectiveTransform3DProperties.LocalOffset, value); } } /// /// The transformation global offset. /// public RawVector3 GlobalOffset { get { return GetVector3Value((int)PerspectiveTransform3DProperties.GlobalOffset); } set { SetValue((int)PerspectiveTransform3DProperties.GlobalOffset, value); } } /// /// The transformation rotation origin. /// public RawVector3 RotationOrigin { get { return GetVector3Value((int)PerspectiveTransform3DProperties.RotationOrigin); } set { SetValue((int)PerspectiveTransform3DProperties.RotationOrigin, value); } } /// /// The transformation rotation. /// public RawVector3 Rotation { get { return GetVector3Value((int)PerspectiveTransform3DProperties.Rotation); } set { SetValue((int)PerspectiveTransform3DProperties.Rotation, value); } } } }