Documentation

Support

Asset Transformer SDK


User Manual

Python API

C# API

Changelog

Discussions

Asset Transformer SDK

GeomInterface

Class
Read time 5 minutesLast updated 18 hours ago

Inheritance
Inherited Members
Namespace: UnityEngine.Pixyz.Geom
public class GeomInterface : Interface

Fields

IdentityMatrix4

public static readonly Matrix4 IdentityMatrix4
Returns

Type

Description

Matrix4

XupToYupMatrix4

public static readonly Matrix4 XupToYupMatrix4
Returns

Type

Description

Matrix4

YupToZupMatrix4

public static readonly Matrix4 YupToZupMatrix4
Returns

Type

Description

Matrix4

ZupToYupMatrix4

public static readonly Matrix4 ZupToYupMatrix4
Returns

Type

Description

Matrix4

Methods

GetLastError

public static string GetLastError()
Returns

Type

Description

string

ApplyTransform

Apply a transformation matrix to a geometrical entity.
[HandleProcessCorruptedStateExceptions]public void ApplyTransform(uint entity, Matrix4 matrix)
Parameters

Type

Name

Description

uintentityThe geometric entity.
Matrix4matrixThe transformation matrix.

ConfigureFunctionLogger

[HandleProcessCorruptedStateExceptions]public void ConfigureFunctionLogger(string functionName, bool enableFunction, bool enableParameters, bool enableExecutionTime)
Parameters

Type

Name

Description

stringfunctionName
boolenableFunction
boolenableParameters
boolenableExecutionTime

GetEntityAABB

Retrieve the Axis-Aligned Bounded Box of a geometric entity.
[HandleProcessCorruptedStateExceptions]public AABB GetEntityAABB(uint entity)
Parameters

Type

Name

Description

uintentityThe geometric entity.
Returns

Type

Description

AABB

ChangeOfBasisMatrix

Construct a Change of Basis Matrix (e.g multiplying the point [0,0,0] will result to the point origin).
[HandleProcessCorruptedStateExceptions]public Matrix4 ChangeOfBasisMatrix(Point3 origin, Point3 x, Point3 y, Point3 z)
Parameters

Type

Name

Description

Point3originOrigin of the new basis.
Point3xX axis of the new basis.
Point3yY axis of the new basis.
Point3zZ axis of the new basis.
Returns

Type

Description

Matrix4

FromAffine

Create a Matrix from an Affine.
[HandleProcessCorruptedStateExceptions]public Matrix4 FromAffine(Affine affine)
Parameters

Type

Name

Description

AffineaffineThe affine.
Returns

Type

Description

Matrix4

FromLookAtMatrix

Get camera position, up and target vectors.
[HandleProcessCorruptedStateExceptions]public FromLookAtMatrixReturn FromLookAtMatrix(Matrix4 matrix, double distanceFromTarget = 1)
Parameters

Type

Name

Description

Matrix4matrixThe created Matrix.
doubledistanceFromTarget
Returns

Type

Description

FromLookAtMatrixReturn

FromOriginNormal

Create a Matrix from an origin and a normal vector.
[HandleProcessCorruptedStateExceptions]public Matrix4 FromOriginNormal(Point3 origin, Point3 normal)
Parameters

Type

Name

Description

Point3originThe origin point.
Point3normalThe normal vector.
Returns

Type

Description

Matrix4

FromTRS

Create a Matrix from translation, rotation and scaling vectors.
[HandleProcessCorruptedStateExceptions]public Matrix4 FromTRS(Point3 T, Point3 R, Point3 S)
Parameters

Type

Name

Description

Point3TThe translation vector.
Point3RThe rotations vector.
Point3SThe scaling vector.
Returns

Type

Description

Matrix4

GetMaxScale

Get maximum matrix scale.
[HandleProcessCorruptedStateExceptions]public double GetMaxScale(Matrix4 matrix)
Parameters

Type

Name

Description

Matrix4matrix
Returns

Type

Description

double

InvertMatrix

Invert a matrix.
[HandleProcessCorruptedStateExceptions]public Matrix4 InvertMatrix(Matrix4 matrix)
Parameters

Type

Name

Description

Matrix4matrixThe matrix to invert.
Returns

Type

Description

Matrix4

LookAtMatrix

Create a matrix from a camera position, up and target.
[HandleProcessCorruptedStateExceptions]public Matrix4 LookAtMatrix(Point3 position, Point3 up, Point3 target)
Parameters

Type

Name

Description

Point3positionThe camera position.
Point3upThe up vector.
Point3targetThe target position.
Returns

Type

Description

Matrix4

MultiplyMatrices

Multiply two matrices, returns left*right.
[HandleProcessCorruptedStateExceptions]public Matrix4 MultiplyMatrices(Matrix4 left, Matrix4 right)
Parameters

Type

Name

Description

Matrix4leftLeft side matrix.
Matrix4rightRight side matrix.
Returns

Type

Description

Matrix4

MultiplyMatrixPoint

Multiply a point by a matrix (i.e apply the matrix to a point).
[HandleProcessCorruptedStateExceptions]public Point3 MultiplyMatrixPoint(Matrix4 matrix, Point3 point)
Parameters

Type

Name

Description

Matrix4matrixThe matrix to apply.
Point3pointThe point to multiply.
Returns

Type

Description

Point3

MultiplyMatrixVector

Multiply a vector by a matrix (i.e apply the matrix to a vector).
[HandleProcessCorruptedStateExceptions]public Point3 MultiplyMatrixVector(Matrix4 matrix, Point3 vector)
Parameters

Type

Name

Description

Matrix4matrixThe matrix to apply.
Point3vectorThe vector to multiply.
Returns

Type

Description

Point3

OrthographicMatrix

Create an orthographic matrix from a 3D width, a 3D height, a near, and a far clipping distance.
[HandleProcessCorruptedStateExceptions]public Matrix4 OrthographicMatrix(double width3D, double height3D, double nearClipDistance, double farClipDistance)
Parameters

Type

Name

Description

doublewidth3DThe 3D width to consider.
doubleheight3DThe 3D height to consider.
doublenearClipDistanceThe near clipping distance.
doublefarClipDistanceThe far clipping distance.
Returns

Type

Description

Matrix4

PerspectiveMatrix

Create a perspective matrix from a fovX, an aspect ratio, a near, and a far clipping distance.
[HandleProcessCorruptedStateExceptions]public Matrix4 PerspectiveMatrix(double fovX, double aspectRatio, double nearClipDistance, double farClipDistance)
Parameters

Type

Name

Description

doublefovXThe field of view on the x axis.
doubleaspectRatioThe aspect ratio foxX/fovY.
doublenearClipDistanceThe near clipping distance.
doublefarClipDistanceThe far clipping distance.
Returns

Type

Description

Matrix4

ToTRS

Decompose a Matrix into translation, rotation and scaling vectors.
[HandleProcessCorruptedStateExceptions]public Vector3List ToTRS(Matrix4 matrix)
Parameters

Type

Name

Description

Matrix4matrixThe Matrix to be decomposed.
Returns

Type

Description

Vector3List