Skip to contents

Create a new ray object.

Usage

ray(position, direction)

Arguments

position

A numeric vector of length 3. Ray position (origin).

direction

A numeric vector of length 3. Ray direction (normalized).

Value

A ray

Note

This class has been auto-generated from the following Raylib struct definition:

typedef struct Ray {
    Vector3 position;        // Ray position (origin)
    Vector3 direction;        // Ray direction (normalized)
} Ray;

Examples

ray <- ray(c(0, 5, 0), c(0, 0, 0))
ray$position
#> x y z 
#> 0 5 0 
ray$direction
#> x y z 
#> 0 0 0