Vector4

Aspose.ThreeD.Utilities.Vector4 je duple preciznosti 4-component vector. It is the type used by Mesh.ControlPoints (IList<Aspose.ThreeD.Utilities.Vector4>), PbrMaterial.BaseColor, LambertMaterial.Diffuse, i druge API-je za geometriju i materijale. Ovaj w komponenta je obično 1.0 za standardne kartezijanske pozicije.

using Aspose.ThreeD.Utilities;

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

Razjašnjenje prostora imena: Dva odvojena Vector4 strukture postoje u ovoj biblioteci:

  • Aspose.ThreeD.Utilities.Vector4dupla preciznost, polja x, y, z, w (malim slovima). Ovo je tip koji se koristi za Mesh.ControlPoints i svojstva boje materijala.
  • Aspose.ThreeD.Vector4float jednostruke preciznosti, polja X, Y, Z, W (velikim slovima). Koristi se interno. Dodavanje ovog tipa u ControlPoints će izazvati grešku pri kompilaciji.
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

Vidi takođe

 Српски