Table of Contents

Class PclTransform

Namespace
PclIO
Assembly
PclIO.dll

Transform data read from a file and the part of it the library applies: scale then translation, or a 4x4 matrix when one is given. PclIO.PclTransform.Rotation is stored for information only and is not applied.

public sealed record PclTransform : IEquatable<PclTransform>

Inheritance

Implements

Inherited Members

Properties

Identity

The identity transform (no translation, unit scale, no matrix).

public static PclTransform Identity { get; }

Property Value

PclTransform

IsIdentity

True when translation and rotation are zero, scale is one and no matrix is set.

public bool IsIdentity { get; }

Property Value

bool

Matrix4x4

Optional 4x4 row-major matrix (16 elements, translation in elements 3, 7 and 11), if the format stores one. When it has exactly 16 elements it replaces PclIO.PclTransform.Scale and PclIO.PclTransform.Translation.

public double[]? Matrix4x4 { get; init; }

Property Value

double[]?

Rotation

Rotation values as parsed from the file (their meaning is format specific). Not applied by this class.

public PclVector3 Rotation { get; init; }

Property Value

PclVector3

Scale

Per-axis scale applied before the translation when no matrix is set.

public PclVector3 Scale { get; init; }

Property Value

PclVector3

Translation

Translation added after scaling; applied by PclIO.PclTransform.TransformPoint(PclIO.PclVector3) when no matrix is set.

public PclVector3 Translation { get; init; }

Property Value

PclVector3

Methods

TransformPoint(PclVector3)

Transforms a local point: by the matrix when present, otherwise scale then translation. Rotation is not applied.

public PclVector3 TransformPoint(PclVector3 local)

Parameters

local PclVector3

Point in the scan's local space.

Returns

PclVector3

TransformVector(PclVector3)

Transforms a direction or normal without translation (matrix 3x3 part, otherwise per-axis scale; rotation is not applied) and normalizes the result to unit length. A zero-length result returns the input unchanged.

public PclVector3 TransformVector(PclVector3 vector)

Parameters

vector PclVector3

Direction in the scan's local space.

Returns

PclVector3