Open 3D Engine AzCore API Reference  24.09
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::Ray Class Reference

Ray defined by two Vector3, an orign and a normalized direction. More...

#include <Ray.h>

Public Member Functions

 AZ_TYPE_INFO (Ray, "{0301a872-5bea-4563-8070-85ed243cb57c}")
 
 Ray ()=default
 Default constructor, Creates a ray at the origin with a length of 0.
 
 Ray (const AZ::Vector3 &origin, const AZ::Vector3 &direction)
 
const AZ::Vector3GetOrigin () const
 returns the origin.
 
const AZ::Vector3GetDirection () const
 returns the normalized direction of the Ray.
 

Static Public Member Functions

static Ray CreateFromLineSegment (const LineSegment &segment)
 

Detailed Description

Ray defined by two Vector3, an orign and a normalized direction.

Constructor & Destructor Documentation

◆ Ray()

AZ::Ray::Ray ( const AZ::Vector3 origin,
const AZ::Vector3 direction 
)

Creates a Ray with a starting origin and direction. direction has to be normalized to be valid.

Member Function Documentation

◆ CreateFromLineSegment()

static Ray AZ::Ray::CreateFromLineSegment ( const LineSegment segment)
static

Create a ray from a LineSegment where the the start of the line segment is the orign and the direction points toward the ending point.


The documentation for this class was generated from the following file: