• Api Documentation
  • Source Code
Search Results for

    Show / Hide Table of Contents
    • SharpAssimp
      • Animation
      • AnimationBehaviour
      • AnimationInterpolation
      • AssimpContext
      • AssimpException
      • BlendMode
      • Bone
      • BoundingBox
      • Camera
      • CompileFlags
      • ConsoleLogStream
      • DefaultLogStream
      • EmbeddedTexture
      • ExcludeComponent
      • ExportDataBlob
      • ExportFormatDescription
      • Face
      • FileIOMode
      • FileIOSystem
      • FreeNativeDelegate
      • IMarshalable<Managed, Native>
      • INativeCustomMarshaler
      • IOStream
      • IOSystem
      • ImporterDescription
      • ImporterFeatureFlags
      • Light
      • LightSourceType
      • LogStream
      • LoggingCallback
      • Material
      • Material.PBRMaterialProperties
      • Material.ShaderMaterialProperties
      • MaterialProperty
      • Matrix3x3
      • MemoryHelper
      • Mesh
      • MeshAnimationAttachment
      • MeshAnimationChannel
      • MeshKey
      • MeshMorphAnimationChannel
      • MeshMorphKey
      • MeshMorphingMethod
      • MetaDataType
      • Metadata
      • Metadata.Entry
      • NativeCustomMarshalerAttribute
      • Node
      • NodeAnimationChannel
      • NodeCollection
      • Origin
      • PostProcessPreset
      • PostProcessSteps
      • PrimitiveType
      • PropertyType
      • QuaternionKey
      • Ray
      • ReturnCode
      • Scene
      • SceneFlags
      • ShadingMode
      • Texel
      • TextureFlags
      • TextureMapping
      • TextureOperation
      • TextureSlot
      • TextureType
      • TextureWrapMode
      • UVTransform
      • UVTransformFlags
      • VectorKey
      • VertexWeight
    • SharpAssimp.Configs
      • ACEvaluateSubdivisionConfig
      • ACSeparateBackfaceCullConfig
      • ASEReconstructNormalsConfig
      • AnimationAccuracyConfig
      • AppScaleConfig
      • BooleanPropertyConfig
      • ColladaIgnoreUpDirectionConfig
      • ColladaUseColladaNamesConfig
      • DeboneAllOrNoneConfig
      • DeboneThresholdConfig
      • ExportPointCloudsConfig
      • FBXConvertToMetersConfig
      • FBXImportAllGeometryLayersConfig
      • FBXImportAllMaterialsConfig
      • FBXImportAnimationsConfig
      • FBXImportCamerasConfig
      • FBXImportEmbeddedTexturesConfig
      • FBXImportEmbeddedTexturesLegacyNamingConfig
      • FBXImportLightsConfig
      • FBXImportMaterialsConfig
      • FBXOptimizeEmptyAnimationCurvesConfig
      • FBXPreservePivotsConfig
      • FBXStrictModeConfig
      • FavorSpeedConfig
      • FloatPropertyConfig
      • GlobalKeyFrameImportConfig
      • GlobalScaleConfig
      • IFCCylindricalTessellationConfig
      • IFCSkipSpaceRepresentationsConfig
      • IFCSmoothingAngleConfig
      • IFCUseCustomTriangulationConfig
      • IRRAnimationFrameRateConfig
      • IgnoreTextureCoordinatesConfig
      • IntegerPropertyConfig
      • KeepSceneHierarchyConfig
      • LWOImportOneLayerConfig
      • LWSAnimationEndConfig
      • LWSAnimationStartConfig
      • MD2KeyFrameImportConfig
      • MD3HandleMultiPartConfig
      • MD3KeyFrameImportConfig
      • MD3ShaderSourceConfig
      • MD3SkinNameConfig
      • MD5NoAnimationAutoLoadConfig
      • MDLColorMapConfig
      • MDLKeyFrameImportConfig
      • MaterialExcludeListConfig
      • MatrixPropertyConfig
      • MaxBoneCountConfig
      • MeasureTimeConfig
      • MeshTriangleLimitConfig
      • MeshVertexLimitConfig
      • MultithreadingConfig
      • NoSkeletonMeshesConfig
      • NodeExcludeListConfig
      • NormalSmoothingAngleConfig
      • NormalizeVertexComponentsConfig
      • OgreMaterialFileConfig
      • OgreTextureTypeFromFilenameConfig
      • PropertyConfig
      • RemoveComponentConfig
      • RemoveDegeneratePrimitivesCheckAreaConfig
      • RemoveDegeneratePrimitivesConfig
      • RemoveEmptyBonesConfig
      • RootTransformationConfig
      • SMDKeyFrameImportConfig
      • SmdLoadAnimationListConfig
      • SortByPrimitiveTypeConfig
      • StringPropertyConfig
      • TangentSmoothingAngleConfig
      • TangentTextureChannelIndexConfig
      • TerragenComputeTexCoordsConfig
      • TransformUVConfig
      • UnrealHandleFlagsConfig
      • UnrealKeyFrameImportConfig
      • VertexBoneWeightLimitConfig
      • VertexCacheSizeConfig
      • XFileUseDoublesConfig
    • SharpAssimp.Unmanaged
      • AiAnimMesh
      • AiAnimation
      • AiBone
      • AiCamera
      • AiConfigs
      • AiDefines
      • AiExportDataBlob
      • AiExportFormatDesc
      • AiFace
      • AiFile
      • AiFileCloseProc
      • AiFileFlushProc
      • AiFileIO
      • AiFileOpenProc
      • AiFileReadProc
      • AiFileSeek
      • AiFileTellProc
      • AiFileWriteProc
      • AiImporterDesc
      • AiLight
      • AiLogStream
      • AiLogStreamCallback
      • AiMatKeys
      • AiMaterial
      • AiMaterialProperty
      • AiMemoryInfo
      • AiMesh
      • AiMeshAnim
      • AiMeshColorArray
      • AiMeshMorphAnim
      • AiMeshMorphKey
      • AiMeshTextureCoordinateArray
      • AiMeshUVComponentArray
      • AiMetadata
      • AiMetadataEntry
      • AiNode
      • AiNodeAnim
      • AiScene
      • AiString
      • AiTexture
      • AssimpLibrary
      • Platform
      • UnmanagedFunctionNameAttribute
      • UnmanagedLibrary
      • UnmanagedLibraryResolver

    Struct Matrix3x3

    Represents a 3x3 matrix. Assimp docs say their matrices are always row-major, and it looks like they're only describing the memory layout. Matrices are treated as column vectors however (X base in the first column, Y base the second, and Z base the third)

    Implements
    IEquatable<Matrix3x3>
    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: SharpAssimp
    Assembly: SharpAssimp.dll
    Syntax
    public record struct Matrix3x3 : IEquatable<Matrix3x3>

    Constructors

    | Edit this page View Source

    Matrix3x3(Matrix4x4)

    Constructs a new Matrix3x3.

    Declaration
    public Matrix3x3(Matrix4x4 rotMatrix)
    Parameters
    Type Name Description
    Matrix4x4 rotMatrix

    A 4x4 matrix to construct from, only taking the rotation/scaling part.

    | Edit this page View Source

    Matrix3x3(float, float, float, float, float, float, float, float, float)

    Represents a 3x3 matrix. Assimp docs say their matrices are always row-major, and it looks like they're only describing the memory layout. Matrices are treated as column vectors however (X base in the first column, Y base the second, and Z base the third)

    Declaration
    public Matrix3x3(float A1, float A2, float A3, float B1, float B2, float B3, float C1, float C2, float C3)
    Parameters
    Type Name Description
    float A1

    Value at row 1, column 1 of the matrix.

    float A2

    Value at row 1, column 2 of the matrix.

    float A3

    Value at row 1, column 3 of the matrix.

    float B1

    Value at row 2, column 1 of the matrix.

    float B2

    Value at row 2, column 2 of the matrix.

    float B3

    Value at row 2, column 3 of the matrix.

    float C1

    Value at row 3, column 1 of the matrix.

    float C2

    Value at row 3, column 2 of the matrix.

    float C3

    Value at row 3, column 3 of the matrix.

    Properties

    | Edit this page View Source

    A1

    Value at row 1, column 1 of the matrix.

    Declaration
    public float A1 { readonly get; set; }
    Property Value
    Type Description
    float
    | Edit this page View Source

    A2

    Value at row 1, column 2 of the matrix.

    Declaration
    public float A2 { readonly get; set; }
    Property Value
    Type Description
    float
    | Edit this page View Source

    A3

    Value at row 1, column 3 of the matrix.

    Declaration
    public float A3 { readonly get; set; }
    Property Value
    Type Description
    float
    | Edit this page View Source

    B1

    Value at row 2, column 1 of the matrix.

    Declaration
    public float B1 { readonly get; set; }
    Property Value
    Type Description
    float
    | Edit this page View Source

    B2

    Value at row 2, column 2 of the matrix.

    Declaration
    public float B2 { readonly get; set; }
    Property Value
    Type Description
    float
    | Edit this page View Source

    B3

    Value at row 2, column 3 of the matrix.

    Declaration
    public float B3 { readonly get; set; }
    Property Value
    Type Description
    float
    | Edit this page View Source

    C1

    Value at row 3, column 1 of the matrix.

    Declaration
    public float C1 { readonly get; set; }
    Property Value
    Type Description
    float
    | Edit this page View Source

    C2

    Value at row 3, column 2 of the matrix.

    Declaration
    public float C2 { readonly get; set; }
    Property Value
    Type Description
    float
    | Edit this page View Source

    C3

    Value at row 3, column 3 of the matrix.

    Declaration
    public float C3 { readonly get; set; }
    Property Value
    Type Description
    float
    | Edit this page View Source

    Identity

    Gets the identity matrix.

    Declaration
    public static Matrix3x3 Identity { get; }
    Property Value
    Type Description
    Matrix3x3
    | Edit this page View Source

    IsIdentity

    Gets if this matrix is an identity matrix.

    Declaration
    public bool IsIdentity { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    this[int, int]

    Gets or sets the value at the specific one-based row, column index. E.g. i = 1, j = 2 gets the value in row 1, column 2 (MA2). Indices out of range return a value of zero.

    Declaration
    public float this[int i, int j] { get; set; }
    Parameters
    Type Name Description
    int i

    One-based Row index

    int j

    One-based Column index

    Property Value
    Type Description
    float

    Matrix value

    Methods

    | Edit this page View Source

    Determinant()

    Compute the determinant of this matrix.

    Declaration
    public float Determinant()
    Returns
    Type Description
    float

    The determinant

    | Edit this page View Source

    FromAngleAxis(float, Vector3)

    Creates a rotation matrix for a rotation about an arbitrary axis.

    Declaration
    public static Matrix3x3 FromAngleAxis(float radians, Vector3 axis)
    Parameters
    Type Name Description
    float radians

    Rotation angle, in radians

    Vector3 axis

    Rotation axis, which should be a normalized vector.

    Returns
    Type Description
    Matrix3x3

    The rotation matrix

    | Edit this page View Source

    FromEulerAnglesXYZ(Vector3)

    Creates a rotation matrix from a set of euler angles.

    Declaration
    public static Matrix3x3 FromEulerAnglesXYZ(Vector3 angles)
    Parameters
    Type Name Description
    Vector3 angles

    Vector containing the rotation angles about the x, y, z axes, in radians.

    Returns
    Type Description
    Matrix3x3

    The rotation matrix

    | Edit this page View Source

    FromEulerAnglesXYZ(float, float, float)

    Creates a rotation matrix from a set of euler angles.

    Declaration
    public static Matrix3x3 FromEulerAnglesXYZ(float x, float y, float z)
    Parameters
    Type Name Description
    float x

    Rotation angle about the x-axis, in radians.

    float y

    Rotation angle about the y-axis, in radians.

    float z

    Rotation angle about the z-axis, in radians.

    Returns
    Type Description
    Matrix3x3

    The rotation matrix

    | Edit this page View Source

    FromRotationX(float)

    Creates a rotation matrix for a rotation about the x-axis.

    Declaration
    public static Matrix3x3 FromRotationX(float radians)
    Parameters
    Type Name Description
    float radians

    Rotation angle in radians.

    Returns
    Type Description
    Matrix3x3

    The rotation matrix

    | Edit this page View Source

    FromRotationY(float)

    Creates a rotation matrix for a rotation about the y-axis.

    Declaration
    public static Matrix3x3 FromRotationY(float radians)
    Parameters
    Type Name Description
    float radians

    Rotation angle in radians.

    Returns
    Type Description
    Matrix3x3

    The rotation matrix

    | Edit this page View Source

    FromRotationZ(float)

    Creates a rotation matrix for a rotation about the z-axis.

    Declaration
    public static Matrix3x3 FromRotationZ(float radians)
    Parameters
    Type Name Description
    float radians

    Rotation angle in radians.

    Returns
    Type Description
    Matrix3x3

    The rotation matrix

    | Edit this page View Source

    FromScaling(Vector3)

    Creates a scaling matrix.

    Declaration
    public static Matrix3x3 FromScaling(Vector3 scaling)
    Parameters
    Type Name Description
    Vector3 scaling

    Scaling vector

    Returns
    Type Description
    Matrix3x3

    The scaling vector

    | Edit this page View Source

    FromToMatrix(Vector3, Vector3)

    Creates a rotation matrix that rotates a vector called "from" into another vector called "to". Based on an algorithm by Tomas Moller and John Hudges:

    "Efficiently Building a Matrix to Rotate One Vector to Another" Journal of Graphics Tools, 4(4):1-4, 1999

    Declaration
    public static Matrix3x3 FromToMatrix(Vector3 from, Vector3 to)
    Parameters
    Type Name Description
    Vector3 from

    Starting vector

    Vector3 to

    Ending vector

    Returns
    Type Description
    Matrix3x3

    Rotation matrix to rotate from the start to end.

    | Edit this page View Source

    Inverse()

    Inverts the matrix. If the matrix is not invertible all elements are set to NaN.

    Declaration
    public void Inverse()
    | Edit this page View Source

    ToString()

    Returns a string that represents this instance.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string that represents this instance.

    Overrides
    ValueType.ToString()
    | Edit this page View Source

    Transform(Vector3)

    Performs matrix-vector multiplication identical to the way Assimp does it.

    Declaration
    public Vector3 Transform(Vector3 v)
    Parameters
    Type Name Description
    Vector3 v

    Vector to transform

    Returns
    Type Description
    Vector3

    Transformed vector

    | Edit this page View Source

    Transpose()

    Transposes this matrix (rows become columns, vice versa).

    Declaration
    public void Transpose()

    Operators

    | Edit this page View Source

    implicit operator Matrix4x4(Matrix3x3)

    Implicit conversion from a 3x3 matrix to a 4x4 matrix.

    Declaration
    public static implicit operator Matrix4x4(Matrix3x3 mat)
    Parameters
    Type Name Description
    Matrix3x3 mat

    3x3 matrix

    Returns
    Type Description
    Matrix4x4

    4x4 matrix

    | Edit this page View Source

    implicit operator Matrix3x3(Matrix4x4)

    Implicit conversion from a 4x4 matrix to a 3x3 matrix.

    Declaration
    public static implicit operator Matrix3x3(Matrix4x4 mat)
    Parameters
    Type Name Description
    Matrix4x4 mat

    4x4 matrix

    Returns
    Type Description
    Matrix3x3

    3x3 matrix

    | Edit this page View Source

    operator *(Matrix3x3, Matrix3x3)

    Performs matrix multiplication.Multiplication order is B x A. That way, SRT concatenations are left to right.

    Declaration
    public static Matrix3x3 operator *(Matrix3x3 a, Matrix3x3 b)
    Parameters
    Type Name Description
    Matrix3x3 a

    First matrix

    Matrix3x3 b

    Second matrix

    Returns
    Type Description
    Matrix3x3

    Multiplied matrix

    Implements

    IEquatable<T>
    • Edit this page
    • View Source
    In this article
    Back to top Copyright (c) 2012-2020 Nicholas Woodfield, (c) 2024 Salvage, (c) 2025 Jérémy Ansel