Search Results for

    Show / Hide Table of Contents

    Struct Direction3D

    Represents a geometric 3D direction.

    Inherited Members
    System.ValueType.Equals(System.Object)
    System.ValueType.GetHashCode()
    System.ValueType.ToString()
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetType()
    Namespace: TopSolid.Kernel.Automating
    Assembly: cs.temp.dll.dll
    Syntax
    [AvailableSinceVersion(7, 6, 0, 0)]
    public struct Direction3D
    Remarks

    The direction is defined by a unit vector, so (X * X + Y * Y + Z * Z) = 1.

    This structure is available since v7.6.

    Constructors

    Direction3D(Double, Double, Double)

    Initializes a new instance of the Direction3D structure with its coordinates.

    Declaration
    public Direction3D(double inX, double inY, double inZ)
    Parameters
    Type Name Description
    System.Double inX

    X component.

    System.Double inY

    Y component.

    System.Double inZ

    Z component.

    Fields

    DX

    Positive X direction, i.e. (1,0,0).

    Declaration
    public static readonly Direction3D DX
    Field Value
    Type Description
    Direction3D

    DY

    Positive Y direction, i.e. (0,1,0).

    Declaration
    public static readonly Direction3D DY
    Field Value
    Type Description
    Direction3D

    DZ

    Positive Z direction, i.e. (0,0,1).

    Declaration
    public static readonly Direction3D DZ
    Field Value
    Type Description
    Direction3D

    X

    X component.

    Declaration
    public double X
    Field Value
    Type Description
    System.Double

    Y

    Y component.

    Declaration
    public double Y
    Field Value
    Type Description
    System.Double

    Z

    Z component.

    Declaration
    public double Z
    Field Value
    Type Description
    System.Double

    Methods

    IsParallelTo(Direction3D, Boolean)

    Tells whether this direction is parallel to another direction.

    Declaration
    public bool IsParallelTo(Direction3D inDirection, bool inSense)
    Parameters
    Type Name Description
    Direction3D inDirection

    Direction to compare with.

    System.Boolean inSense

    Sense is meaningful.

    Returns
    Type Description
    System.Boolean

    This direction is parallel to the specified direction.

    Remarks

    Two directions are considered parallel if they make an angle of less than AngularPrecision.

    Operators

    Division(Direction3D, Double)

    Divides a direction by a double value.

    Declaration
    public static Vector3D operator /(Direction3D inDirection, double inD)
    Parameters
    Type Name Description
    Direction3D inDirection

    Left hand side direction.

    System.Double inD

    Right hand side double.

    Returns
    Type Description
    Vector3D

    Scaled vector.

    ExclusiveOr(Direction3D, Direction3D)

    Computes the cross product of two directions.

    Declaration
    public static Vector3D operator ^(Direction3D inDirection1, Direction3D inDirection2)
    Parameters
    Type Name Description
    Direction3D inDirection1

    Left hand side direction.

    Direction3D inDirection2

    Right hand side direction.

    Returns
    Type Description
    Vector3D

    Vectors' cross product.

    Implicit(Direction3D to Vector3D)

    Casts a direction into a vector.

    Declaration
    public static implicit operator Vector3D(Direction3D inDirection)
    Parameters
    Type Name Description
    Direction3D inDirection

    Direction to cast.

    Returns
    Type Description
    Vector3D

    Multiply(Double, Direction3D)

    Multiplies a double value with a direction.

    Declaration
    public static Vector3D operator *(double inD, Direction3D inDirection)
    Parameters
    Type Name Description
    System.Double inD

    Left hand side double.

    Direction3D inDirection

    Right hand side direction.

    Returns
    Type Description
    Vector3D

    Scaled vector.

    Multiply(Direction3D, Double)

    Multiplies a direction with a double value.

    Declaration
    public static Vector3D operator *(Direction3D inDirection, double inD)
    Parameters
    Type Name Description
    Direction3D inDirection

    Left hand side direction.

    System.Double inD

    Right hand side double.

    Returns
    Type Description
    Vector3D

    Scaled vector.

    Multiply(Direction3D, Direction3D)

    Computes the dot product of two directions.

    Declaration
    public static double operator *(Direction3D inDirection1, Direction3D inDirection2)
    Parameters
    Type Name Description
    Direction3D inDirection1

    Left hand side direction.

    Direction3D inDirection2

    Right hand side direction.

    Returns
    Type Description
    System.Double

    Vectors' dot product.

    UnaryNegation(Direction3D)

    Negates a direction.

    Declaration
    public static Direction3D operator -(Direction3D inDirection)
    Parameters
    Type Name Description
    Direction3D inDirection

    Direction to negate.

    Returns
    Type Description
    Direction3D

    Negated direction.

    In This Article
    • Mentions légales
    • C.G.U
    • Données personnelles

    Copyright © 2024 TopSolid Tous droits réservés