Class EntityTransformHelper
- Namespace
- ValveResourceFormat.Utils
- Assembly
- ValveResourceFormat.dll
Helper methods for entity transformations.
public static class EntityTransformHelperInheritance
Inherited Members
Methods
CalculateTransformationMatrix(Entity)
Calculates the full transformation matrix for an entity.
public static Matrix4x4 CalculateTransformationMatrix(EntityLump.Entity entity)Parameters
entityEntityLump.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
pitchYawRollVector3-
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
entityEntityLump.Entity-
The entity to extract from.
scaleVectorVector3-
The scale vector.
rotationMatrixMatrix4x4-
The rotation matrix.
positionVectorVector3-
The position vector.
ParseVector(string)
Parses a string representation of a Vector3.
public static Vector3 ParseVector(string input)Parameters
inputstring-
The input string.
Returns
- Vector3
-
The parsed vector.