Table of Contents

Class EntityTransformHelper

Namespace
ValveResourceFormat.Utils
Assembly
ValveResourceFormat.dll

Helper methods for entity transformations.

public static class EntityTransformHelper

Inheritance

Inherited Members

Methods

CalculateTransformationMatrix(Entity)

Calculates the full transformation matrix for an entity.

public static Matrix4x4 CalculateTransformationMatrix(EntityLump.Entity entity)

Parameters

entity EntityLump.Entity

The entity.

Returns

Matrix4x4

The transformation matrix.

CreateRotationMatrixFromEulerAngles(Vector3)

Creates a rotation matrix from Euler angles (pitch, yaw, roll).

public static Matrix4x4 CreateRotationMatrixFromEulerAngles(Vector3 pitchYawRoll)

Parameters

pitchYawRoll Vector3

The Euler angles.

Returns

Matrix4x4

The rotation matrix.

DecomposeTransformationMatrix(Entity, out Vector3, out Matrix4x4, out Vector3)

Extracts scale, rotation, and position components from an entity's transformation.

public static void DecomposeTransformationMatrix(EntityLump.Entity entity, out Vector3 scaleVector, out Matrix4x4 rotationMatrix, out Vector3 positionVector)

Parameters

entity EntityLump.Entity

The entity to extract from.

scaleVector Vector3

The scale vector.

rotationMatrix Matrix4x4

The rotation matrix.

positionVector Vector3

The position vector.

ParseVector(string)

Parses a string representation of a Vector3.

public static Vector3 ParseVector(string input)

Parameters

input string

The input string.

Returns

Vector3

The parsed vector.