Package javajs.util
Class T4
java.lang.Object
javajs.util.T3
javajs.util.T4
- All Implemented Interfaces:
Serializable
,JSONEncodable
- Direct Known Subclasses:
P4
A generic 4 element tuple that is represented by single precision floating
point x,y,z and w coordinates.
- Version:
- specification 1.1, implementation $Revision: 1.9 $, $Date: 2006/07/28 17:01:32 $
- Author:
- Kenji hiranabe additions by Bob Hanson hansonr@stolaf.edu 9/30/2012 for unique constructor and method names for the optimization of compiled JavaScript using Java2Script
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true if all of the data members of Object are equal to the corresponding data members in thisint
hashCode()
Returns a hash number based on the data values in this object.final void
scale4
(float s) Sets the value of this tuple to the scalar multiplication of itself.final void
set4
(float x, float y, float z, float w) Sets the value of this tuple to the specified xyzw coordinates.toJSON()
toString()
Returns a string that contains the values of this Tuple4f.
-
Field Details
-
w
public float wThe w coordinate.
-
-
Constructor Details
-
T4
public T4()Constructs and initializes a Tuple4f to (0,0,0,0).
-
-
Method Details
-
set4
public final void set4(float x, float y, float z, float w) Sets the value of this tuple to the specified xyzw coordinates.- Parameters:
x
- the x coordinatey
- the y coordinatez
- the z coordinatew
- the w coordinate
-
scale4
public final void scale4(float s) Sets the value of this tuple to the scalar multiplication of itself.- Parameters:
s
- the scalar value
-
hashCode
public int hashCode()Returns a hash number based on the data values in this object. Two different Tuple4f objects with identical data values (ie, returns true for equals(Tuple4f) ) will return the same hash number. Two vectors with different data members may return the same hash value, although this is not likely. -
equals
Returns true if all of the data members of Object are equal to the corresponding data members in this -
toString
Returns a string that contains the values of this Tuple4f. The form is (x,y,z,w). -
toJSON
- Specified by:
toJSON
in interfaceJSONEncodable
- Overrides:
toJSON
in classT3
-