/// <summary>
        /// Setups the projection to be facing towards positive infinity on the z axis.
        /// </summary>
        /// <param name="originOfProjection">The index to set the origin of the projection at.</param>
        public void SetupProjectionTowardsPositiveZAxis(Index3D originOfProjection)
        {
            Contracts.Requires.That(this.IsAbsoluteIndexValid(originOfProjection));

            this.InitializeProjection(originOfProjection);

            this.AxisDirection = AxisDirection3D.PositiveZ;
            this.indexRotationTransformation  = ProjectIndexPositiveZAxis;
            this.vectorRotationTransformation = ProjectVectorPositiveZAxis;
        }
Example #2
0
    /// <summary>
    /// Gets the axis of the specified axis direction combination.
    /// </summary>
    /// <param name="axisDirection">The axis direction.</param>
    /// <returns>The axis.</returns>
    public static Axis3D GetAxis(this AxisDirection3D axisDirection)
    {
        switch (axisDirection)
        {
        case AxisDirection3D.PositiveX: return(Axis3D.X);

        case AxisDirection3D.NegativeX: return(Axis3D.X);

        case AxisDirection3D.PositiveY: return(Axis3D.Y);

        case AxisDirection3D.NegativeY: return(Axis3D.Y);

        case AxisDirection3D.PositiveZ: return(Axis3D.Z);

        case AxisDirection3D.NegativeZ: return(Axis3D.Z);

        default:
            throw InvalidEnumArgument.CreateException(nameof(axisDirection), axisDirection);
        }
    }