Ray - CreedVI/Raylib-J GitHub Wiki
Ray
defines a three dimensional point in space and a line extending from that point in a given direction
Values:
Vector3
position
Vector3
direction
Constructors:
Ray()
Ray ray = new Ray();
Results in a ray with position and direction initialized using the default Vector3
constructor.
Color(Vector3 position, Vector3 direction)
Ray ray = new Ray(origin, east);
Results in a ray with position and direction set to the parameters passed.
Methods
getPosition()
- Returns a Vector3
Vector3 newVec = ray.getPosition();
Returns the value assigned to the Vector3 position
.
getDirection()
- Returns a Vector3
Vector3 newVec = ray.getDirection();
Returns the value assigned to the Vector3 direction
.
setPosition(Vector3 position)
ray.setPosition(aVec3);
Assigns the value passed to position
.
setDirection(Vector3 Direction)
ray.setDirection(westVec3);
Assigns the value passed to direction
.