Search Results for

    Show / Hide Table of Contents

    Struct Transform3D

    Represents a 3D transformation.

    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 Transform3D
    Remarks

    The transformation is defined by a 4x4 matrix that operates as multiplier on column vectors containing homogeneous coordinates:

    [ R00 R01 R02 Tx ]

    [ R10 R11 R12 Ty ]

    [ R20 R21 R22 Tz ]

    [ Px Py Pz Si ]

    That transforms (X, Y, Z, H) into (X', Y', Z', H') as follows:

    X' = R00 * X + R01 * Y + R02 * Z + Tx * H

    Y' = R10 * X + R11 * Y + R12 * Z + Ty * H

    Z' = R20 * X + R21 * Y + R22 * Z + Tz * H

    H' = Px * X + Py * Y + Pz * Z + Si * H

    R is a non singular transformation matrix, that contains the rotation, reflection, non-uniform scaling and shearing components.

    T is a translation vector.

    P represents the perspective terms in viewing transformations. It must be zero in transformations used for modeling.

    Si is the inverse of the global scale factor, it has to be greater than zero.

    In the case of conventional coordinates, H is equal to one, and the coordinates of the transformed point are (X'/H', Y'/H', Z'/H').

    For instance here is the transformation matrix corresponding to the rotation of angle "a" around the Z axis:

    [ cos(a) -sin(a) 0 0 ]

    [ sin(a) cos(a) 0 0 ]

    [ 0 0 1 0 ]


    [ 0 0 0 1 ]


    This structure is available since v7.6.

    Constructors

    Transform3D(Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double)

    Initializes a new instance of the Transform3D structure.

    Declaration
    public Transform3D(double inR00, double inR01, double inR02, double inTx, double inR10, double inR11, double inR12, double inTy, double inR20, double inR21, double inR22, double inTz, double inPx, double inPy, double inPz, double inSi)
    Parameters
    Type Name Description
    System.Double inR00
    System.Double inR01
    System.Double inR02
    System.Double inTx
    System.Double inR10
    System.Double inR11
    System.Double inR12
    System.Double inTy
    System.Double inR20
    System.Double inR21
    System.Double inR22
    System.Double inTz
    System.Double inPx
    System.Double inPy
    System.Double inPz
    System.Double inSi

    Fields

    Identity

    Indentity transformation.

    Declaration
    public static readonly Transform3D Identity
    Field Value
    Type Description
    Transform3D

    Px

    Perspective factor along X.

    Declaration
    public double Px
    Field Value
    Type Description
    System.Double

    Py

    Perspective factor along Y.

    Declaration
    public double Py
    Field Value
    Type Description
    System.Double

    Pz

    Perspective factor along Z.

    Declaration
    public double Pz
    Field Value
    Type Description
    System.Double

    R00

    Rotation[0,0].

    Declaration
    public double R00
    Field Value
    Type Description
    System.Double

    R01

    Rotation[0,1].

    Declaration
    public double R01
    Field Value
    Type Description
    System.Double

    R02

    Rotation[0,2].

    Declaration
    public double R02
    Field Value
    Type Description
    System.Double

    R10

    Rotation[1,0].

    Declaration
    public double R10
    Field Value
    Type Description
    System.Double

    R11

    Rotation[1,1].

    Declaration
    public double R11
    Field Value
    Type Description
    System.Double

    R12

    Rotation[1,2].

    Declaration
    public double R12
    Field Value
    Type Description
    System.Double

    R20

    Rotation[2,0].

    Declaration
    public double R20
    Field Value
    Type Description
    System.Double

    R21

    Rotation[2,1].

    Declaration
    public double R21
    Field Value
    Type Description
    System.Double

    R22

    Rotation[2,2].

    Declaration
    public double R22
    Field Value
    Type Description
    System.Double

    Si

    Inverse of the global scale factor.

    Declaration
    public double Si
    Field Value
    Type Description
    System.Double

    Tx

    Translation along X.

    Declaration
    public double Tx
    Field Value
    Type Description
    System.Double

    Ty

    Translation along Y.

    Declaration
    public double Ty
    Field Value
    Type Description
    System.Double

    Tz

    Translation along Z.

    Declaration
    public double Tz
    Field Value
    Type Description
    System.Double

    Methods

    SetRotation(Axis3D, Double)

    Sets the transformation as the rotation about a specified axis with a specified angle.

    Declaration
    public void SetRotation(Axis3D inAxis, double inAngle)
    Parameters
    Type Name Description
    Axis3D inAxis

    Rotation axis.

    System.Double inAngle

    Rotation angle, in radians.

    SetTranslation(Vector3D)

    Sets the transformation as the translation along a specified vector.

    Declaration
    public void SetTranslation(Vector3D inVector)
    Parameters
    Type Name Description
    Vector3D inVector

    Translation vector.

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

    Copyright © 2024 TopSolid Tous droits réservés