Search Results for

    Show / Hide Table of Contents

    Struct Transform3D

    Represents a 3D transformation.

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    Namespace: TopSolid.Kernel.Automating
    Assembly: TopSolid.Kernel.Automating.dll
    Syntax
    [DataContract]
    [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

    Name Description
    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.

    Fields

    Name Description
    Identity

    Indentity transformation.

    Px

    Perspective factor along X.

    Py

    Perspective factor along Y.

    Pz

    Perspective factor along Z.

    R00

    Rotation[0,0].

    R01

    Rotation[0,1].

    R02

    Rotation[0,2].

    R10

    Rotation[1,0].

    R11

    Rotation[1,1].

    R12

    Rotation[1,2].

    R20

    Rotation[2,0].

    R21

    Rotation[2,1].

    R22

    Rotation[2,2].

    Si

    Inverse of the global scale factor.

    Tx

    Translation along X.

    Ty

    Translation along Y.

    Tz

    Translation along Z.

    Methods

    Name Description
    SetRotation(Axis3D, double)

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

    SetTranslation(Vector3D)

    Sets the transformation as the translation along a specified vector.

    In this article
    Back to top
    • Term of use
    • Corporate information
    • Privacy Policy - GDPR

    Copyright ©2025 TopSolid - All rights reserved.