toggle menu
SceneView
androidJvm
switch theme
search in API
sceneview
/
io.github.sceneview.collision
/
Vector3
Vector3
open
class
Vector3
A Vector with 3 floats.
Members
Members & Extensions
Constructors
Vector3
Link copied to clipboard
constructor
(
)
Construct a Vector3 and assign zero to all values
constructor
(
x
:
Float
,
y
:
Float
,
z
:
Float
)
Construct a Vector3 and assign each value
constructor
(
v
:
Vector3
)
Construct a Vector3 and copy the values
Properties
x
Link copied to clipboard
open
var
x
:
Float
y
Link copied to clipboard
open
var
y
:
Float
z
Link copied to clipboard
open
var
z
:
Float
Functions
add
Link copied to clipboard
open
fun
add
(
lhs
:
Vector3
,
rhs
:
Vector3
)
:
Vector3
Adds two Vector3's
angle
Between
Vectors
Link copied to clipboard
open
fun
angleBetweenVectors
(
a
:
Vector3
,
b
:
Vector3
)
:
Float
Returns the shortest angle in degrees between two vectors.
back
Link copied to clipboard
open
fun
back
(
)
:
Vector3
Gets a Vector3 set to (0, 0, 1)
cross
Link copied to clipboard
open
fun
cross
(
lhs
:
Vector3
,
rhs
:
Vector3
)
:
Vector3
Get cross product of two Vector3's
dot
Link copied to clipboard
open
fun
dot
(
lhs
:
Vector3
,
rhs
:
Vector3
)
:
Float
Get dot product of two Vector3's
down
Link copied to clipboard
open
fun
down
(
)
:
Vector3
Gets a Vector3 set to (0, -1, 0)
equals
Link copied to clipboard
open
fun
equals
(
other
:
Any
)
:
Boolean
Returns true if the other object is a Vector3 and each component is equal within a tolerance.
open
fun
equals
(
lhs
:
Vector3
,
rhs
:
Vector3
)
:
Boolean
Compares two Vector3's are equal if each component is equal within a tolerance.
forward
Link copied to clipboard
open
fun
forward
(
)
:
Vector3
Gets a Vector3 set to (0, 0, -1)
hash
Code
Link copied to clipboard
open
fun
hashCode
(
)
:
Int
left
Link copied to clipboard
open
fun
left
(
)
:
Vector3
Gets a Vector3 set to (-1, 0, 0)
length
Link copied to clipboard
open
fun
length
(
)
:
Float
length
Squared
Link copied to clipboard
open
fun
lengthSquared
(
)
:
Float
lerp
Link copied to clipboard
open
fun
lerp
(
a
:
Vector3
,
b
:
Vector3
,
t
:
Float
)
:
Vector3
Linearly interpolates between a and b.
max
Link copied to clipboard
open
fun
max
(
lhs
:
Vector3
,
rhs
:
Vector3
)
:
Vector3
Get a Vector3 with each value set to the element wise maximum of two Vector3's values
min
Link copied to clipboard
open
fun
min
(
lhs
:
Vector3
,
rhs
:
Vector3
)
:
Vector3
Get a Vector3 with each value set to the element wise minimum of two Vector3's values
multiply
Link copied to clipboard
open
fun
multiply
(
lhs
:
Vector3
,
rhs
:
Vector3
)
:
Vector3
negated
Link copied to clipboard
open
fun
negated
(
)
:
Vector3
Negates a Vector3
normalized
Link copied to clipboard
open
fun
normalized
(
)
:
Vector3
Scales the Vector3 to the unit length
one
Link copied to clipboard
open
fun
one
(
)
:
Vector3
Gets a Vector3 with all values set to one
right
Link copied to clipboard
open
fun
right
(
)
:
Vector3
Gets a Vector3 set to (1, 0, 0)
scaled
Link copied to clipboard
open
fun
scaled
(
a
:
Float
)
:
Vector3
Uniformly scales a Vector3
set
Link copied to clipboard
open
fun
set
(
v
:
Vector3
)
Copy the values from another Vector3 to this Vector3
open
fun
set
(
vx
:
Float
,
vy
:
Float
,
vz
:
Float
)
Set each value
subtract
Link copied to clipboard
open
fun
subtract
(
lhs
:
Vector3
,
rhs
:
Vector3
)
:
Vector3
Subtract two Vector3
to
Float3
Link copied to clipboard
fun
Vector3
.
toFloat3
(
)
:
Float3
to
String
Link copied to clipboard
open
fun
toString
(
)
:
String
up
Link copied to clipboard
open
fun
up
(
)
:
Vector3
Gets a Vector3 set to (0, 1, 0)
zero
Link copied to clipboard
open
fun
zero
(
)
:
Vector3
Gets a Vector3 with all values set to zero