com.aspose.threed

Interfaces

Classes

Enums

Exceptions

Class Vector4

    • Field Detail

      • w

        public double w
        The w component.
      • x

        public double x
        The x component.
      • y

        public double y
        The y component.
      • z

        public double z
        The z component.
    • Constructor Detail

      • Vector4

        public Vector4()
      • Vector4

        public Vector4(double x,
                       double y,
                       double z)
        Initializes a new instance of the Vector4 struct.
        Parameters:
        x - The x coordinate.
        y - The y coordinate.
        z - The z coordinate.
      • Vector4

        public Vector4(double x,
                       double y,
                       double z,
                       double w)
        Initializes a new instance of the Vector4 struct.
        Parameters:
        x - The x coordinate.
        y - The y coordinate.
        z - The z coordinate.
        w - The width.
      • Vector4

        public Vector4(Vector3 vec)
        Initializes a new instance of the Vector4 struct.
        Parameters:
        vec - Vec.
      • Vector4

        public Vector4(Vector3 vec,
                       double w)
        Initializes a new instance of the Vector4 struct.
        Parameters:
        vec - Vec.
        w - The width.
      • Vector4

        public Vector4(Color color)
        Initializes a new instance of the Vector4 struct.
        Parameters:
        color - Color.
    • Method Detail

      • add

        public static Vector4 add(Vector4 lhs,
                                  Vector4 rhs)
        Operator overloading for +
        Parameters:
        lhs - The left vector
        rhs - The right vector
        Returns:
        Result vector
      • sub

        public static Vector4 sub(Vector4 lhs,
                                  Vector4 rhs)
        Operator overloading for - (minus)
        Parameters:
        lhs - The left vector
        rhs - The right vector
        Returns:
        Result vector
      • mul

        public static Vector4 mul(Vector4 lhs,
                                  Vector4 rhs)
        Operator overloading for *
        Parameters:
        lhs - The left vector
        rhs - The right vector
        Returns:
        Result vector
      • mul

        public static Vector4 mul(Vector4 lhs,
                                  double rhs)
        Operator overloading for *
        Parameters:
        lhs - The left vector
        rhs - The right double value
        Returns:
        Result vector
      • set

        public void set(double newX,
                        double newY,
                        double newZ)
        Sets vector's xyz components at a time, w will be set to 1
        Parameters:
        newX - New X component.
        newY - New Y component.
        newZ - New Z component.
      • equals

        public boolean equals(Object obj)
        Check if two vectors are equal
        Overrides:
        equals in class Object
        Parameters:
        obj -
      • set

        public void set(double newX,
                        double newY,
                        double newZ,
                        double newW)
        Sets vector's all components at a time
        Parameters:
        newX - New X component.
        newY - New Y component.
        newZ - New Z component.
        newW - New W component.
      • clone

        public Vector4 clone()
        Specified by:
        clone in interface com.aspose.threed.Struct<Vector4>
        Overrides:
        clone in class Object
      • copyFrom

        public void copyFrom(Vector4 src)
        Specified by:
        copyFrom in interface com.aspose.threed.Struct<Vector4>
      • hashCode

        public int hashCode()
        Gets the hash code of this vector
        Overrides:
        hashCode in class Object