Search Results for

    Show / Hide Table of Contents

    Struct XbimMatrix3D

    Inherited Members
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetType()
    Namespace: Xbim.Common.Geometry
    Assembly: Xbim.Common.dll
    Syntax
    public struct XbimMatrix3D

    Constructors

    | Improve this Doc View Source

    XbimMatrix3D(Double)

    Declaration
    public XbimMatrix3D(double scale)
    Parameters
    Type Name Description
    System.Double scale
    | Improve this Doc View Source

    XbimMatrix3D(Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double)

    Initialises with doubles

    Declaration
    public XbimMatrix3D(double m11, double m12, double m13, double m14, double m21, double m22, double m23, double m24, double m31, double m32, double m33, double m34, double offsetX, double offsetY, double offsetZ, double m44)
    Parameters
    Type Name Description
    System.Double m11
    System.Double m12
    System.Double m13
    System.Double m14
    System.Double m21
    System.Double m22
    System.Double m23
    System.Double m24
    System.Double m31
    System.Double m32
    System.Double m33
    System.Double m34
    System.Double offsetX
    System.Double offsetY
    System.Double offsetZ
    System.Double m44
    | Improve this Doc View Source

    XbimMatrix3D(XbimVector3D)

    Declaration
    public XbimMatrix3D(XbimVector3D offset)
    Parameters
    Type Name Description
    XbimVector3D offset

    Properties

    | Improve this Doc View Source

    Backward

    Declaration
    public readonly XbimVector3D Backward { get; }
    Property Value
    Type Description
    XbimVector3D
    | Improve this Doc View Source

    Down

    Declaration
    public readonly XbimVector3D Down { get; }
    Property Value
    Type Description
    XbimVector3D
    | Improve this Doc View Source

    Forward

    Declaration
    public readonly XbimVector3D Forward { get; }
    Property Value
    Type Description
    XbimVector3D
    | Improve this Doc View Source

    Identity

    Declaration
    public static readonly XbimMatrix3D Identity { get; }
    Property Value
    Type Description
    XbimMatrix3D
    | Improve this Doc View Source

    IsAffine

    Declaration
    public readonly bool IsAffine { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsIdentity

    Declaration
    public readonly bool IsIdentity { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Left

    Declaration
    public readonly XbimVector3D Left { get; }
    Property Value
    Type Description
    XbimVector3D
    | Improve this Doc View Source

    M11

    Declaration
    public double M11 { get; set; }
    Property Value
    Type Description
    System.Double
    | Improve this Doc View Source

    M12

    Declaration
    public double M12 { get; set; }
    Property Value
    Type Description
    System.Double
    | Improve this Doc View Source

    M13

    Declaration
    public double M13 { get; set; }
    Property Value
    Type Description
    System.Double
    | Improve this Doc View Source

    M14

    Declaration
    public double M14 { get; set; }
    Property Value
    Type Description
    System.Double
    | Improve this Doc View Source

    M21

    Declaration
    public double M21 { get; set; }
    Property Value
    Type Description
    System.Double
    | Improve this Doc View Source

    M22

    Declaration
    public double M22 { get; set; }
    Property Value
    Type Description
    System.Double
    | Improve this Doc View Source

    M23

    Declaration
    public double M23 { get; set; }
    Property Value
    Type Description
    System.Double
    | Improve this Doc View Source

    M24

    Declaration
    public double M24 { get; set; }
    Property Value
    Type Description
    System.Double
    | Improve this Doc View Source

    M31

    Declaration
    public double M31 { get; set; }
    Property Value
    Type Description
    System.Double
    | Improve this Doc View Source

    M32

    Declaration
    public double M32 { get; set; }
    Property Value
    Type Description
    System.Double
    | Improve this Doc View Source

    M33

    Declaration
    public double M33 { get; set; }
    Property Value
    Type Description
    System.Double
    | Improve this Doc View Source

    M34

    Declaration
    public double M34 { get; set; }
    Property Value
    Type Description
    System.Double
    | Improve this Doc View Source

    M44

    Declaration
    public double M44 { get; set; }
    Property Value
    Type Description
    System.Double
    | Improve this Doc View Source

    OffsetX

    Declaration
    public double OffsetX { get; set; }
    Property Value
    Type Description
    System.Double
    | Improve this Doc View Source

    OffsetY

    Declaration
    public double OffsetY { get; set; }
    Property Value
    Type Description
    System.Double
    | Improve this Doc View Source

    OffsetZ

    Declaration
    public double OffsetZ { get; set; }
    Property Value
    Type Description
    System.Double
    | Improve this Doc View Source

    Right

    Declaration
    public readonly XbimVector3D Right { get; }
    Property Value
    Type Description
    XbimVector3D
    | Improve this Doc View Source

    Translation

    Declaration
    public readonly XbimVector3D Translation { get; }
    Property Value
    Type Description
    XbimVector3D
    | Improve this Doc View Source

    Up

    Declaration
    public readonly XbimVector3D Up { get; }
    Property Value
    Type Description
    XbimVector3D

    Methods

    | Improve this Doc View Source

    Copy(XbimMatrix3D)

    Creates a new instance of a mat4

    Declaration
    public static XbimMatrix3D Copy(XbimMatrix3D m)
    Parameters
    Type Name Description
    XbimMatrix3D m

    Single[16] containing values to initialize with

    Returns
    Type Description
    XbimMatrix3D

    New mat4New mat4

    | Improve this Doc View Source

    CreateLookAt(XbimVector3D, XbimVector3D, XbimVector3D)

    Creates a matrix projecting points onto a plane by passing a camera position, target and up vector.

    Declaration
    public static XbimMatrix3D CreateLookAt(XbimVector3D cameraPosition, XbimVector3D cameraTarget, XbimVector3D cameraUpVector)
    Parameters
    Type Name Description
    XbimVector3D cameraPosition
    XbimVector3D cameraTarget
    XbimVector3D cameraUpVector
    Returns
    Type Description
    XbimMatrix3D
    | Improve this Doc View Source

    CreateRotation(XbimPoint3D, XbimPoint3D)

    Creates a rotation matrix converting from a starting direction to a desired direction.

    Declaration
    public static XbimMatrix3D CreateRotation(XbimPoint3D fromDirection, XbimPoint3D toDirection)
    Parameters
    Type Name Description
    XbimPoint3D fromDirection

    Starting direction

    XbimPoint3D toDirection

    Desired direction

    Returns
    Type Description
    XbimMatrix3D

    the matrix that applied to results in

    | Improve this Doc View Source

    CreateScale(Double)

    Creates a 3D scaling matrix.

    Declaration
    public static XbimMatrix3D CreateScale(double uniformScale)
    Parameters
    Type Name Description
    System.Double uniformScale

    The scaling factor along all axis.

    Returns
    Type Description
    XbimMatrix3D

    The new scaling matrix

    | Improve this Doc View Source

    CreateScale(Double, Double, Double)

    Creates a 3D scaling matrix.

    Declaration
    public static XbimMatrix3D CreateScale(double scaleX, double scaleY, double scaleZ)
    Parameters
    Type Name Description
    System.Double scaleX

    The scaling factor along the x-axis.

    System.Double scaleY

    The scaling factor along the y-axis.

    System.Double scaleZ

    The scaling factor along the z-axis.

    Returns
    Type Description
    XbimMatrix3D

    The new scaling matrix

    | Improve this Doc View Source

    CreateTranslation(Double, Double, Double)

    Creates a 3D translation matrix.

    Declaration
    public static XbimMatrix3D CreateTranslation(double x, double y, double z)
    Parameters
    Type Name Description
    System.Double x
    System.Double y
    System.Double z
    Returns
    Type Description
    XbimMatrix3D
    | Improve this Doc View Source

    CreateTranslation(XbimVector3D)

    Creates a 3D translation matrix.

    Declaration
    public static XbimMatrix3D CreateTranslation(XbimVector3D translationVector)
    Parameters
    Type Name Description
    XbimVector3D translationVector
    Returns
    Type Description
    XbimMatrix3D
    | Improve this Doc View Source

    CreateWorld(XbimVector3D, XbimVector3D, XbimVector3D)

    Declaration
    public static XbimMatrix3D CreateWorld(XbimVector3D position, XbimVector3D forward, XbimVector3D up)
    Parameters
    Type Name Description
    XbimVector3D position
    XbimVector3D forward
    XbimVector3D up
    Returns
    Type Description
    XbimMatrix3D
    | Improve this Doc View Source

    Decompose(out XbimVector3D, out XbimQuaternion, out XbimVector3D)

    Decomposes a matrix into a scale, rotation, and translation.

    Declaration
    public bool Decompose(out XbimVector3D scale, out XbimQuaternion rotation, out XbimVector3D translation)
    Parameters
    Type Name Description
    XbimVector3D scale

    When the method completes, contains the scaling component of the decomposed matrix.

    XbimQuaternion rotation

    When the method completes, contains the rtoation component of the decomposed matrix.

    XbimVector3D translation

    When the method completes, contains the translation component of the decomposed matrix.

    Returns
    Type Description
    System.Boolean
    Remarks

    This method is designed to decompose an SRT transformation matrix only.

    | Improve this Doc View Source

    Equal(XbimMatrix3D, XbimMatrix3D)

    Compares two matrices for equality within a certain margin of error

    Declaration
    public static bool Equal(XbimMatrix3D a, XbimMatrix3D b)
    Parameters
    Type Name Description
    XbimMatrix3D a

    a First matrix

    XbimMatrix3D b

    b Second matrix

    Returns
    Type Description
    System.Boolean

    True if a is equivalent to b

    | Improve this Doc View Source

    Equals(Object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    System.Object obj
    Returns
    Type Description
    System.Boolean
    Overrides
    System.ValueType.Equals(System.Object)
    | Improve this Doc View Source

    FromArray(Byte[])

    Declaration
    public static XbimMatrix3D FromArray(byte[] array)
    Parameters
    Type Name Description
    System.Byte[] array
    Returns
    Type Description
    XbimMatrix3D
    | Improve this Doc View Source

    FromString(String)

    Converts string of 15 reals to a matrix

    Declaration
    public static XbimMatrix3D FromString(string val)
    Parameters
    Type Name Description
    System.String val
    Returns
    Type Description
    XbimMatrix3D
    | Improve this Doc View Source

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32
    Overrides
    System.ValueType.GetHashCode()
    | Improve this Doc View Source

    GetRotationQuaternion()

    Declaration
    public XbimQuaternion GetRotationQuaternion()
    Returns
    Type Description
    XbimQuaternion
    | Improve this Doc View Source

    Invert()

    Declaration
    public void Invert()
    | Improve this Doc View Source

    Multiply(XbimMatrix3D, XbimMatrix3D)

    Performs a matrix multiplication

    Declaration
    public static XbimMatrix3D Multiply(XbimMatrix3D mat1, XbimMatrix3D mat2)
    Parameters
    Type Name Description
    XbimMatrix3D mat1

    mat First operand

    XbimMatrix3D mat2

    mat2 Second operand

    Returns
    Type Description
    XbimMatrix3D

    dest if specified, mat otherwise

    | Improve this Doc View Source

    RotateAroundXAxis(Double)

    Apply a X-Axis rotation to the matrix

    Declaration
    public void RotateAroundXAxis(double radAngle)
    Parameters
    Type Name Description
    System.Double radAngle

    Angle in radians

    | Improve this Doc View Source

    RotateAroundYAxis(Double)

    Apply a Y-Axis rotation to the matrix

    Declaration
    public void RotateAroundYAxis(double radAngle)
    Parameters
    Type Name Description
    System.Double radAngle

    Angle in radians

    | Improve this Doc View Source

    RotateAroundZAxis(Double)

    Apply a Z-Axis rotation to the matrix

    Declaration
    public void RotateAroundZAxis(double radAngle)
    Parameters
    Type Name Description
    System.Double radAngle

    Angle in radians

    | Improve this Doc View Source

    Scale(Double)

    Declaration
    public void Scale(double s)
    Parameters
    Type Name Description
    System.Double s
    | Improve this Doc View Source

    Scale(XbimVector3D)

    Declaration
    public void Scale(XbimVector3D xbimVector3D)
    Parameters
    Type Name Description
    XbimVector3D xbimVector3D
    | Improve this Doc View Source

    Str()

    Returns a string representation of a mat4

    Declaration
    public string Str()
    Returns
    Type Description
    System.String

    String representation of mat

    | Improve this Doc View Source

    ToArray(Boolean)

    Declaration
    public byte[] ToArray(bool useDouble = true)
    Parameters
    Type Name Description
    System.Boolean useDouble
    Returns
    Type Description
    System.Byte[]
    | Improve this Doc View Source

    ToDoubleArray()

    This function can be useful to transfer the matrix value in the c++/clr environment

    Declaration
    public double[] ToDoubleArray()
    Returns
    Type Description
    System.Double[]

    a 16-long double array where translation values are at poistions 12, 13 and 14

    | Improve this Doc View Source

    ToFloatArray()

    This function can be useful to transfer the matrix value in the c++/clr environment

    Declaration
    public float[] ToFloatArray()
    Returns
    Type Description
    System.Single[]

    a 16-long float array where translation values are at poistions 12, 13 and 14

    | Improve this Doc View Source

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String
    Overrides
    System.ValueType.ToString()
    | Improve this Doc View Source

    Transform(XbimPoint3D)

    Declaration
    public XbimPoint3D Transform(XbimPoint3D p)
    Parameters
    Type Name Description
    XbimPoint3D p
    Returns
    Type Description
    XbimPoint3D
    | Improve this Doc View Source

    Transform(XbimVector3D)

    Declaration
    public XbimVector3D Transform(XbimVector3D xbimVector3D)
    Parameters
    Type Name Description
    XbimVector3D xbimVector3D
    Returns
    Type Description
    XbimVector3D

    Operators

    | Improve this Doc View Source

    Multiply(XbimMatrix3D, XbimMatrix3D)

    Declaration
    public static XbimMatrix3D operator *(XbimMatrix3D a, XbimMatrix3D b)
    Parameters
    Type Name Description
    XbimMatrix3D a
    XbimMatrix3D b
    Returns
    Type Description
    XbimMatrix3D
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2022 xbim