# Class A4

java.lang.Object
javajs.util.T3
javajs.util.P3
javajs.util.A4

All Implemented Interfaces:
  `Serializable, JSONEncodable`

public class A4 extends P3
A 4 element axis angle represented by single precision floating point x,y,z,angle components. An axis angle is a rotation of angle (radians) about the vector (x,y,z).

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:
  - Serialized Form

## Field Summary

Fields
Modifier and Type
Field
Description
`float`
`angle`
The angle.

### Fields inherited from class T3

`x, y, z`

## Constructor Summary

Constructors
Constructor
Description
`A4()`
Constructs and initializes a AxisAngle4f to (0,0,1,0).

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object o)`
Returns true if the Object o is of type AxisAngle4f and all of the data members of o1 are equal to the corresponding data members in this AxisAngle4f.
`int`
`hashCode()`
Returns a hash number based on the data values in this object.
`static A4`
`new4(float x, float y, float z, float angle)`
Constructs and initializes an AxisAngle4f from the specified x, y, z, and angle.
`static A4`
`newAA(A4 a1)`
Constructs and initializes a AxisAngle4f from the specified AxisAngle4f.
`static A4`
`newVA(V3 axis, float angle)`
Constructs and initializes an AxisAngle4f from the specified axis and angle.
`final void`
`set4(float x, float y, float z, float angle)`
Sets the value of this axis angle to the specified x,y,z,angle.
`final void`
`setAA(A4 a)`
Sets the value of this axis angle to the value of axis angle t1.
`final void`
`setM(M3 m1)`
Sets the value of this axis-angle to the rotational component of the passed matrix.
`final void`
`setVA(V3 axis, float angle)`
Sets the value of this AxisAngle4f to the specified axis and angle.
`String`
`toJSON()`
`String`
`toString()`
Returns a string that contains the values of this AxisAngle4f.

### Methods inherited from class P3

`getUnlikely, new3, newA, newP`

### Methods inherited from class T3

`add, add2, add3, ave, cross, distance, distanceSquared, dot, floatToIntBits, length, lengthSquared, normalize, putP, scale, scaleAdd2, scaleT, set, setA, setP, setT, sub, sub2`

### Methods inherited from class Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

## Field Details

### angle

public float angle
The angle.

## Constructor Details

### A4

public A4()
Constructs and initializes a AxisAngle4f to (0,0,1,0).

## Method Details

### new4

public static A4 new4(float x, float y, float z, float angle)
Constructs and initializes an AxisAngle4f from the specified x, y, z, and angle.

Parameters:
  `x` - the x coordinate
  `y` - the y coordinate
  `z` - the z coordinate
  `angle` - the angle.
Returns:
  a

### newAA

public static A4 newAA(A4 a1)
Constructs and initializes a AxisAngle4f from the specified AxisAngle4f.

Parameters:
  `a1` - the AxisAngle4f containing the initialization x y z angle data
Returns:
  a

### newVA

public static A4 newVA(V3 axis, float angle)
Constructs and initializes an AxisAngle4f from the specified axis and angle.

Parameters:
  `axis` - the axis
  `angle` - the angle
Returns:
  a

### setVA

public final void setVA(V3 axis, float angle)
Sets the value of this AxisAngle4f to the specified axis and angle.

Parameters:
  `axis` - the axis
  `angle` - the angle
Since:
  Java 3D 1.2

### set4

public final void set4(float x, float y, float z, float angle)
Sets the value of this axis angle to the specified x,y,z,angle.

Parameters:
  `x` - the x coordinate
  `y` - the y coordinate
  `z` - the z coordinate
  `angle` - the angle

### setAA

public final void setAA(A4 a)
Sets the value of this axis angle to the value of axis angle t1.

Parameters:
  `a` - the axis angle to be copied

### setM

public final void setM(M3 m1)
Sets the value of this axis-angle to the rotational component of the passed matrix.

Parameters:
  `m1` - the matrix3f

### hashCode

public int hashCode()
Returns a hash number based on the data values in this object. Two different AxisAngle4f objects with identical data values (ie, returns true for equals(AxisAngle4f) ) will return the same hash number. Two vectors with different data members may return the same hash value, although this is not likely.

Overrides:
  `hashCode` in class `T3`

### equals

public boolean equals(Object o)
Returns true if the Object o is of type AxisAngle4f and all of the data members of o1 are equal to the corresponding data members in this AxisAngle4f.

Overrides:
  `equals` in class `T3`
Parameters:
  `o` - the object with which the comparison is made.
Returns:
  T/F

### toString

public String toString()
Returns a string that contains the values of this AxisAngle4f. The form is (x,y,z,angle).

Overrides:
  `toString` in class `T3`
Returns:
  the String representation

### toJSON

public String toJSON()

Specified by:
  `toJSON` in interface `JSONEncodable`
Overrides:
  `toJSON` in class `T3`