Vector4 — Aspose.3D FOSS for .NET

Overview

Aspose.ThreeD.Utilities.Vector4 is a double-precision 4-component vector. It is the type used by Mesh.ControlPoints (IList<Aspose.ThreeD.Utilities.Vector4>), PbrMaterial.BaseColor, LambertMaterial.Diffuse, and other geometry and material APIs. The w component is typically 1.0 for standard Cartesian positions.

using Aspose.ThreeD.Utilities;

var point = new Vector4(1.0, 2.0, 3.0, 1.0);
mesh.ControlPoints.Add(point);

Namespace disambiguation: Two separate Vector4 structs exist in this library:

  • Aspose.ThreeD.Utilities.Vector4double-precision, fields x, y, z, w (lowercase). This is the type used for Mesh.ControlPoints and material color properties.
  • Aspose.ThreeD.Vector4single-precision float, fields X, Y, Z, W (uppercase). Used internally. Adding this type to ControlPoints will cause a compile error.

Always using Aspose.ThreeD.Utilities; when working with geometry control points or material data.

Fields

NameTypeDescription
xdoubleX component
ydoubleY component
zdoubleZ component
wdoubleW component (homogeneous coordinate; use 1.0 for standard positions)

See Also