com.aspose.threed

Interfaces

Classes

Enums

Exceptions

Class Vector3

    • Field Detail

      • ORIGIN

        public static final Vector3 ORIGIN
        Gets the origin position.
      • UNIT_SCALE

        public static final Vector3 UNIT_SCALE
        Gets the unit scale vector.
      • x

        public double x
        The x component.
      • X_AXIS

        public static final Vector3 X_AXIS
        Gets the X axis.
      • y

        public double y
        The y component.
      • Y_AXIS

        public static final Vector3 Y_AXIS
        Gets the Y axis.
      • z

        public double z
        The z component.
      • Z_AXIS

        public static final Vector3 Z_AXIS
        Gets the Z axis.
    • Constructor Detail

      • Vector3

        public Vector3()
      • Vector3

        public Vector3(double v)
        Initializes a new instance of the Vector3 struct.
        Parameters:
        v - V.
      • Vector3

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

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

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

      • equals

        public boolean equals(Object obj)
        Check if two vector3 equals
        Overrides:
        equals in class Object
        Parameters:
        obj - The object to check equality.
        Returns:
        True if all components are identically equal.
      • dot

        public double dot(Vector3 rhs)
        Gets the dot product of two vectors
        Parameters:
        rhs - Right hand side value.
        Returns:
        The dot product of the two vectors.
      • normalize

        public Vector3 normalize()
        Normalizes this instance.
        Returns:
        Normalized vector.
      • getLength2

        public double getLength2()
        Gets the square of the length.
      • getLength

        public double getLength()
        Gets the length of this vector.
      • sin

        public Vector3 sin()
        Calculates sine on each component
        Returns:
        Calculated Vector3.
      • cos

        public Vector3 cos()
        Calculates cosine on each component
        Returns:
        Calculated Vector3.
      • cross

        public Vector3 cross(Vector3 rhs)
        Cross product of two vectors
        Parameters:
        rhs - Right hand side value.
        Returns:
        Cross product of two Vector3s.
      • negative

        public static Vector3 negative(Vector3 v)
        Operator overloading for -
        Parameters:
        v - The origin vector
        Returns:
        Result vector
      • sub

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

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

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

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

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

        public static boolean op_eq(Vector3 lhs,
                                    Vector3 rhs)
        Equal operator for Vector3
        Parameters:
        lhs - Left hand side value.
        rhs - Right hand side value.
        Returns:
        True if all components are identically equal.
      • op_ne

        public static boolean op_ne(Vector3 lhs,
                                    Vector3 rhs)
        Not-equal operator for Vector3
        Parameters:
        lhs - Left hand side value.
        rhs - Right hand side value.
        Returns:
        True if two vectors are not equal.
      • set

        public void set(double newX,
                        double newY,
                        double newZ)
        Sets the x/y/z component in one call.
        Parameters:
        newX - The x component.
        newY - The y component.
        newZ - The z component.
      • clone

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

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

        public int hashCode()
        Gets the hash code of Vector3
        Overrides:
        hashCode in class Object
        Returns:
        The hash code of the Vector3