APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.javafx.geom

public Class Vec3f

extends Object
Class Inheritance

A 3-dimensional, single-precision, floating-point vector.

Field Summary

Modifier and TypeField and Description
public float
x

The x coordinate.

public float
y

The y coordinate.

public float
z

The z coordinate.

Constructor Summary

AccessConstructor and Description
public
public
Vec3f(float x, float y, float z)

public

Method Summary

Modifier and TypeMethod and Description
public void
add(Vec3f
the first vector
t1
,
Vec3f
the second vector
t2
)

Sets the value of this vector to the sum of vectors t1 and t2 (this = t1 + t2).

public void
add(Vec3f
the other vector
t1
)

Sets the value of this vector to the sum of itself and vector t1 (this = this + t1) .

public void
cross(Vec3f
the first vector
v1
,
Vec3f
the second vector
v2
)

Sets this vector to be the vector cross product of vectors v1 and v2.

public float

Returns:

the dot product of this vector and v1
dot
(Vec3f
the other vector
v1
)

Computes the dot product of this vector and vector v1.

public boolean

Returns:

true if the object to be compared is an instance of Vec3f and has the same values; false otherwise.
equals
(Object
an object to be compared with this Vec3f
obj
)

Overrides java.lang.Object.equals.

Determines whether or not two 3D points or vectors are equal.

public int

Returns:

a hash code for this Vec3f.
hashCode
()

Overrides java.lang.Object.hashCode.

Returns the hashcode for this Vec3f.

public float

Returns:

the length of this vector
length
()

Returns the length of this vector.

public final void
mul(float s)

public void
normalize()

Normalize this vector.

public void
public void
set(float x, float y, float z)

public void
sub(Vec3f
the first vector
t1
,
Vec3f
the second vector
t2
)

Sets the value of this vector to the difference of vectors t1 and t2 (this = t1 - t2).

public void
sub(Vec3f
the other vector
t1
)

Sets the value of this vector to the difference of itself and vector t1 (this = this - t1) .

public String

Returns:

a string representation of this Vec3f.
toString
()

Overrides java.lang.Object.toString.

Returns a String that represents the value of this Vec3f.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

xback to summary
public float x

The x coordinate.

yback to summary
public float y

The y coordinate.

zback to summary
public float z

The z coordinate.

Constructor Detail

Vec3fback to summary
public Vec3f()
Vec3fback to summary
public Vec3f(float x, float y, float z)
Vec3fback to summary
public Vec3f(Vec3f v)

Method Detail

addback to summary
public void add(Vec3f t1, Vec3f t2)

Sets the value of this vector to the sum of vectors t1 and t2 (this = t1 + t2).

Parameters
t1:Vec3f

the first vector

t2:Vec3f

the second vector

addback to summary
public void add(Vec3f t1)

Sets the value of this vector to the sum of itself and vector t1 (this = this + t1) .

Parameters
t1:Vec3f

the other vector

crossback to summary
public void cross(Vec3f v1, Vec3f v2)

Sets this vector to be the vector cross product of vectors v1 and v2.

Parameters
v1:Vec3f

the first vector

v2:Vec3f

the second vector

dotback to summary
public float dot(Vec3f v1)

Computes the dot product of this vector and vector v1.

Parameters
v1:Vec3f

the other vector

Returns:float

the dot product of this vector and v1

equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Determines whether or not two 3D points or vectors are equal. Two instances of Vec3f are equal if the values of their x, y and z member fields, representing their position in the coordinate space, are the same.

Parameters
obj:Object

an object to be compared with this Vec3f

Returns:boolean

true if the object to be compared is an instance of Vec3f and has the same values; false otherwise.

Annotations
@Override
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Returns the hashcode for this Vec3f.

Returns:int

a hash code for this Vec3f.

Annotations
@Override
lengthback to summary
public float length()

Returns the length of this vector.

Returns:float

the length of this vector

mulback to summary
public final void mul(float s)
normalizeback to summary
public void normalize()

Normalize this vector.

setback to summary
public void set(Vec3f v)
setback to summary
public void set(float x, float y, float z)
subback to summary
public void sub(Vec3f t1, Vec3f t2)

Sets the value of this vector to the difference of vectors t1 and t2 (this = t1 - t2).

Parameters
t1:Vec3f

the first vector

t2:Vec3f

the second vector

subback to summary
public void sub(Vec3f t1)

Sets the value of this vector to the difference of itself and vector t1 (this = this - t1) .

Parameters
t1:Vec3f

the other vector

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Returns a String that represents the value of this Vec3f.

Returns:String

a string representation of this Vec3f.

Annotations
@Override