public void Add(Vector4D b) { this.X += b.X; this.Y += b.Y; this.Z += b.Z; this.W += b.W; }
public Vector4D(Vector4D src) { X = src.X; Y = src.Y; Z = src.Z; W = src.W; }
public Vertex(Vector3D position, Vector3D normal, Vector4D tangent, UV uv1, UV uv2, Color4 color) { Position = position; Normal = normal; Tangent = tangent; UV1 = uv1; UV2 = uv2; Color = color; }
public Vertex(Vertex vertex) { Position = vertex.Position; Normal = vertex.Normal; Tangent = vertex.Tangent; UV1 = vertex.UV1; UV2 = vertex.UV2; Color = vertex.Color; }
public Vector4D Lerped(Vector4D dest, float t, Vector4D outVector) { outVector.Copy(this); outVector.Lerp(dest, t); return(outVector); }
public void Copy(Vector4D src) { this.Set(src.X, src.Y, src.Z, src.W); }
public Vector4D(Vector4D src) { this.Set(src.X, src.Y, src.Z, src.W); }
public void Subtract(Vector4D b) { this.X -= b.X; this.Y -= b.Y; this.Z -= b.Z; this.W -= b.W; }
public Vector4D MultipliedBy(float factor) { Vector4D multiplied = new Vector4D(this); multiplied.MultiplyBy (factor); return multiplied; }
public Vector4D Lerped(Vector4D dest, float t) { return new Vector4D(this).AddedWith(dest.SubtractedBy (this).MultipliedBy (t)); }
public Vector4D AddedWith(Vector4D b) { Vector4D added = new Vector4D (this); added.Add (b); return b; }
public Vector4D SubtractedBy(Vector4D b) { Vector4D subtracted = new Vector4D (this); subtracted.Subtract (b); return b; }
private static Vector4 ConvertToUnity(Vector4D vector) { return(new Vector4(vector.X, vector.Y, vector.Z, vector.W)); }