Vector4

Methods

Aspose.ThreeD.Utilities.Vector4 är en dubbelprecision 4-component vector. It is the type used by Mesh.ControlPoints (IList<Aspose.ThreeD.Utilities.Vector4>), PbrMaterial.BaseColor, LambertMaterial.Diffuse, och andra geometri- och material-API:er. Den w komponent är vanligtvis 1.0 för standard kartesiska positioner.

using Aspose.ThreeD.Utilities;

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

Namnrymdsavklaring: Två separata Vector4 strukturer finns i detta bibliotek:

  • Aspose.ThreeD.Utilities.Vector4dubbelprecision, fält x, y, z, w (gemener). Detta är den typ som används för Mesh.ControlPoints och materialfärgegenskaper.
  • Aspose.ThreeD.Vector4enkelprecision flyttal, fält X, Y, Z, W (versaler). Används internt. Att lägga till denna typ till ControlPoints kommer att orsaka ett kompileringsfel.

Methods using Aspose.ThreeD.Utilities; när du arbetar med geometrikontrollpunkter eller materialdata.

Methods

NameTypeAccessDescription
LengthdoubleReadGets the length.
SignatureDescription
Vector4(vec: Vector3, w: double)Creates a new 4‑dimensional vector with the given x, y, z, and w components
Vector4(vec: Vector3)
Vector4(vec: FVector4)
Vector4(x: double, y: double, z: double)
Vector4(x: double, y: double, z: double, w: double)
Set(newX: double, newY: double, newZ: double)Updates the X, Y, and Z components of the vector
Set(newX: double, newY: double, newZ: double, newW: double)
Equals(obj: object)Determines whether another Vector4 has the same component values
GetHashCode()
ToString()
CompareTo(other: Vector4)Compares this vector with another Vector4 for ordering

Se även

 Svenska