LibCarna Version 3.4.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
LibCarna::base::math::RaySphereHitTest< VectorType, ScalarType > Class Template Reference

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

#include <RaySphereHitTest.hpp>

Public Member Functions

 RaySphereHitTest ()
 Instantiates.
 
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 VectorTypehitLocation () const
 References the location of the hit.
 

Detailed Description

template<typename VectorType, typename ScalarType>
class LibCarna::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

Definition at line 52 of file RaySphereHitTest.hpp.

Constructor & Destructor Documentation

◆ RaySphereHitTest()

Instantiates.

Postcondition
hitExists() == false

Definition at line 90 of file RaySphereHitTest.hpp.

Member Function Documentation

◆ compute()

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.

Definition at line 112 of file RaySphereHitTest.hpp.

◆ hitExists()

Tells whether a hit exists.

Definition at line 97 of file RaySphereHitTest.hpp.

◆ hitLocation()

References the location of the hit.

Precondition
hitExists() == true

Definition at line 104 of file RaySphereHitTest.hpp.


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