Carna  Version 3.3.2
Public Member Functions | List of all members
Carna::base::math::RaySphereHitTest< VectorType, ScalarType > Class Template Reference

Tests whether sphere in origin is hit by a Ray object. More...

#include <RaySphereHitTest.h>

Public Member Functions

 RaySphereHitTest ()
 Instantiates. More...
 
void compute (const Ray< VectorType > &ray, const ScalarType radius)
 Performs a hit test of ray with a sphere of radius radius. The sphere is assumed to be centered in the origin. Use hitExists and hitLocation to obtain the test results.
 
bool hitExists () const
 Tells whether a hit exists.
 
const VectorType & hitLocation () const
 References the location of the hit. More...
 

Detailed Description

template<typename VectorType, typename ScalarType>
class Carna::base::math::RaySphereHitTest< VectorType, ScalarType >

Tests whether sphere in origin is hit by a Ray object.

Parameters
VectorTypedefines the vector type to use for computation.
ScalarTypedefines the scalar type to use for computation.
Author
Leonid Kostrykin
Date
22.3.15

Definition at line 49 of file RaySphereHitTest.h.

Constructor & Destructor Documentation

◆ RaySphereHitTest()

template<typename VectorType , typename ScalarType >
Carna::base::math::RaySphereHitTest< VectorType, ScalarType >::RaySphereHitTest ( )

Instantiates.

Postcondition
hitExists() == false

Definition at line 87 of file RaySphereHitTest.h.

Member Function Documentation

◆ hitLocation()

template<typename VectorType , typename ScalarType >
const VectorType & Carna::base::math::RaySphereHitTest< VectorType, ScalarType >::hitLocation ( ) const

References the location of the hit.

Precondition
hitExists() == true

Definition at line 101 of file RaySphereHitTest.h.


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