cocos2d-x  3.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Ray Class Reference

#include <CCRay.h>

Public Member Functions

 Ray ()
 Constructor. More...
 
 Ray (const Ray &ray)
 Constructor. More...
 
 Ray (const Vec3 &origin, const Vec3 &direction)
 Constructs a new ray initialized to the specified values. More...
 
 ~Ray ()
 Destructor. More...
 
bool intersects (const AABB &aabb) const
 Check whether this ray intersects the specified bounding box. More...
 
bool intersects (const OBB &obb) const
 Check whether this ray intersects the specified obb. More...
 
void set (const Vec3 &origin, const Vec3 &direction)
 Sets this ray to the specified values. More...
 
void transform (const Mat4 &matrix)
 Transforms this ray by the given transformation matrix. More...
 

Public Attributes

Vec3 _origin
 
Vec3 _direction
 

Constructor & Destructor Documentation

Ray ( )

Constructor.

Ray ( const Ray ray)

Constructor.

Ray ( const Vec3 origin,
const Vec3 direction 
)

Constructs a new ray initialized to the specified values.

Parameters
originThe ray's origin.
directionThe ray's direction.
~Ray ( )

Destructor.

Member Function Documentation

bool intersects ( const AABB aabb) const

Check whether this ray intersects the specified bounding box.

bool intersects ( const OBB obb) const

Check whether this ray intersects the specified obb.

void set ( const Vec3 origin,
const Vec3 direction 
)

Sets this ray to the specified values.

Parameters
originThe ray's origin.
directionThe ray's direction.
void transform ( const Mat4 matrix)

Transforms this ray by the given transformation matrix.

Parameters
matrixThe transformation matrix to transform by.

Member Data Documentation

Vec3 _direction
Vec3 _origin

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