public class ListenerData extends Object
Vector3 for more information about 3D
coordinates and vectors.
| Modifier and Type | Field and Description |
|---|---|
float |
angle
Used for easy rotation along the x/z plane (for use in a first-person
shooter type of application).
|
com.badlogic.gdx.math.Vector3 |
lookAt
A normalized vector indicating the direction the listener is facing
|
com.badlogic.gdx.math.Vector3 |
position
Listener's position in 3D space
|
com.badlogic.gdx.math.Vector3 |
up
A normalized vector indicating the up direction
|
com.badlogic.gdx.math.Vector3 |
velocity
Listener's velocity in world-space
|
| Constructor and Description |
|---|
ListenerData()
Constructor: Set this listener data to the origin facing along the z-axis
|
ListenerData(float pX,
float pY,
float pZ,
float lX,
float lY,
float lZ,
float uX,
float uY,
float uZ,
float a)
Constructor: Set this listener data to the specified values for position and
orientation.
|
ListenerData(com.badlogic.gdx.math.Vector3 p,
com.badlogic.gdx.math.Vector3 l,
com.badlogic.gdx.math.Vector3 u,
float a)
Constructor: Set this listener data to the specified values for position and
orientation.
|
| Modifier and Type | Method and Description |
|---|---|
void |
setAngle(float a)
Sets the listener's angle counterclockwise around the y-axis.
|
void |
setData(float pX,
float pY,
float pZ,
float lX,
float lY,
float lZ,
float uX,
float uY,
float uZ,
float a)
Change this listener data using the specified coordinates for position and
orientation.
|
void |
setData(ListenerData l)
Change this listener data to match the specified listener data.
|
void |
setData(com.badlogic.gdx.math.Vector3 p,
com.badlogic.gdx.math.Vector3 l,
com.badlogic.gdx.math.Vector3 u,
float a)
Change this listener data using the specified 3D vectors for position and
orientation.
|
void |
setOrientation(float lX,
float lY,
float lZ,
float uX,
float uY,
float uZ)
Changes the listeners orientation using the specified coordinates.
|
void |
setOrientation(com.badlogic.gdx.math.Vector3 l,
com.badlogic.gdx.math.Vector3 u)
Changes the listeners orientation using the specified vectors.
|
void |
setPosition(float x,
float y,
float z)
Change this listener's position using the specified coordinates.
|
void |
setPosition(com.badlogic.gdx.math.Vector3 p)
Change this listener's position using the specified vector.
|
void |
setVelocity(float x,
float y,
float z)
Change this listener's velocity in world-space.
|
void |
setVelocity(com.badlogic.gdx.math.Vector3 v)
Change this listener's velocity in world-space.
|
public com.badlogic.gdx.math.Vector3 position
public com.badlogic.gdx.math.Vector3 lookAt
public com.badlogic.gdx.math.Vector3 up
public com.badlogic.gdx.math.Vector3 velocity
public float angle
public ListenerData()
public ListenerData(float pX,
float pY,
float pZ,
float lX,
float lY,
float lZ,
float uX,
float uY,
float uZ,
float a)
pX - Listener's X coordinate.pY - Listener's Y coordinate.pZ - Listener's Z coordinate.lX - X element of the look-at direction.lY - Y element of the look-at direction.lZ - Z element of the look-at direction.uX - X element of the up direction.uY - Y element of the up direction.uZ - Z element of the up direction.a - Angle in radians that the listener is turned counterclockwise around the y-axis.public ListenerData(com.badlogic.gdx.math.Vector3 p,
com.badlogic.gdx.math.Vector3 l,
com.badlogic.gdx.math.Vector3 u,
float a)
p - Position of the listener in 3D space.l - Normalized vector indicating the direction which the listener is facing.u - Normalized vector indicating the up direction.a - Angle in radians that the listener is turned counterclockwise around the y-axis.public void setData(float pX,
float pY,
float pZ,
float lX,
float lY,
float lZ,
float uX,
float uY,
float uZ,
float a)
pX - Listener's X coordinate.pY - Listener's Y coordinate.pZ - Listener's Z coordinate.lX - X element of the look-at direction.lY - Y element of the look-at direction.lZ - Z element of the look-at direction.uX - X element of the up direction.uY - Y element of the up direction.uZ - Z element of the up direction.a - Angle in radians that the listener is turned counterclockwise around the y-axis.public void setData(com.badlogic.gdx.math.Vector3 p,
com.badlogic.gdx.math.Vector3 l,
com.badlogic.gdx.math.Vector3 u,
float a)
p - Position of the listener in 3D space.l - Normalized vector indicating the direction which the listener is facing.u - Normalized vector indicating the up direction.a - Angle in radians that the listener is turned counterclockwise around the y-axis.public void setData(ListenerData l)
l - Listener data to use.public void setPosition(float x,
float y,
float z)
x - Listener's X coordinate.y - Listener's Y coordinate.z - Listener's Z coordinate.public void setPosition(com.badlogic.gdx.math.Vector3 p)
p - New position.public void setOrientation(float lX,
float lY,
float lZ,
float uX,
float uY,
float uZ)
lX - X element of the look-at direction.lY - Y element of the look-at direction.lZ - Z element of the look-at direction.uX - X element of the up direction.uY - Y element of the up direction.uZ - Z element of the up direction.public void setOrientation(com.badlogic.gdx.math.Vector3 l,
com.badlogic.gdx.math.Vector3 u)
l - Normalized vector representing the look-at direction.u - Normalized vector representing the up direction.public void setVelocity(com.badlogic.gdx.math.Vector3 v)
v - New velocity.public void setVelocity(float x,
float y,
float z)
x - New velocity along world x-axis.y - New velocity along world y-axis.z - New velocity along world z-axis.public void setAngle(float a)
a - Angle in radians.Copyright © 2017. All rights reserved.