Murl Engine API  Version 2018.3
Murl::Math::Cone< DataType > Class Template Reference

A cone class describing a cone by its angle and length. More...

#include <murl_math_cone.h>

Detailed Description

template<class DataType>
class Murl::Math::Cone< DataType >

A cone class describing a cone by its angle and length.

Public Types

typedef DataType ValueType
 The template parameter value type. More...
 

Public Member Functions

 Cone ()
 The default constructor.
 
 Cone (DataType length, DataType angle)
 Constructor taking cone length and angle. More...
 
 Cone (const Frustum< DataType > &frustum)
 Constructor taking a frustum. More...
 
template<class DataType2 >
 Cone (const Cone< DataType2 > &c)
 The copy constructor using a cone of different type. More...
 
DataType GetLength () const
 Get the length. More...
 
DataType GetAngle () const
 Get the angle. More...
 
void Set (const Frustum< DataType > &frustum)
 Set the cone by a frustum. More...
 
Bool IsIntersecting (const Sphere< DataType > &sphere) const
 Check if the cone is intersecting a sphere. More...
 
String ToString () const
 Get the string representation of the object. More...
 

Protected Attributes

DataType mLength
 The length of the cone. More...
 
DataType mAngle
 The angle of the cone. More...
 
DataType mSin
 The sine of the angle. More...
 
DataType mCos
 The cosine of the angle. More...
 
DataType mTan
 The tangent of the angle. More...
 
DataType mShearX
 The X shear value. More...
 
DataType mShearY
 The Y shear value. More...
 

Member Typedef Documentation

◆ ValueType

template<class DataType>
typedef DataType Murl::Math::Cone< DataType >::ValueType

The template parameter value type.

Constructor & Destructor Documentation

◆ Cone() [1/3]

template<class DataType>
Murl::Math::Cone< DataType >::Cone ( DataType  length,
DataType  angle 
)
inline

Constructor taking cone length and angle.

Parameters
lengthThe length of the cone.
angleThe angle of the cone.

◆ Cone() [2/3]

template<class DataType>
Murl::Math::Cone< DataType >::Cone ( const Frustum< DataType > &  frustum)
inline

Constructor taking a frustum.

Parameters
frustumThe frustum.

◆ Cone() [3/3]

template<class DataType>
template<class DataType2 >
Murl::Math::Cone< DataType >::Cone ( const Cone< DataType2 > &  c)
inline

The copy constructor using a cone of different type.

Parameters
cThe cone to copy.

Member Function Documentation

◆ GetLength()

template<class DataType>
DataType Murl::Math::Cone< DataType >::GetLength ( ) const
inline

Get the length.

Returns
The length.

◆ GetAngle()

template<class DataType>
DataType Murl::Math::Cone< DataType >::GetAngle ( ) const
inline

Get the angle.

Returns
The angle.

◆ Set()

template<class DataType>
void Murl::Math::Cone< DataType >::Set ( const Frustum< DataType > &  frustum)
inline

Set the cone by a frustum.

Parameters
frustumThe frustum.

◆ IsIntersecting()

template<class DataType>
Bool Murl::Math::Cone< DataType >::IsIntersecting ( const Sphere< DataType > &  sphere) const
inline

Check if the cone is intersecting a sphere.

Parameters
sphereThe sphere to check.
Returns
true if the cone is intersecting the sphere.

◆ ToString()

template<class DataType>
String Murl::Math::Cone< DataType >::ToString ( ) const
inline

Get the string representation of the object.

Returns
The string representation of the object.

Member Data Documentation

◆ mLength

template<class DataType>
DataType Murl::Math::Cone< DataType >::mLength
protected

The length of the cone.

◆ mAngle

template<class DataType>
DataType Murl::Math::Cone< DataType >::mAngle
protected

The angle of the cone.

◆ mSin

template<class DataType>
DataType Murl::Math::Cone< DataType >::mSin
protected

The sine of the angle.

◆ mCos

template<class DataType>
DataType Murl::Math::Cone< DataType >::mCos
protected

The cosine of the angle.

◆ mTan

template<class DataType>
DataType Murl::Math::Cone< DataType >::mTan
protected

The tangent of the angle.

◆ mShearX

template<class DataType>
DataType Murl::Math::Cone< DataType >::mShearX
protected

The X shear value.

◆ mShearY

template<class DataType>
DataType Murl::Math::Cone< DataType >::mShearY
protected

The Y shear value.


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