Murl::Math::Cylinder< DataType > Class Template Reference

A cylinder class describing a cylinder by its radius and length. More...

#include "murl_math_cylinder.h"

Public Types

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

Public Member Functions

 Cylinder ()
 The default constructor.
 
 Cylinder (DataType length, DataType radius)
 Constructor taking cylinder length and radius. More...
 
 Cylinder (const Box< DataType > &box)
 Constructor taking a box. More...
 
template<class DataType2 >
 Cylinder (const Cylinder< DataType2 > &c)
 The copy constructor using a cylinder of different type. More...
 
DataType GetLength () const
 Get the length. More...
 
DataType GetRadius () const
 Get the radius. More...
 
void Set (const Box< DataType > &box)
 Set the cylinder by a box. More...
 
void Set (const Box< DataType > &box, DataType shearX, DataType shearY)
 Set the cylinder by a box. More...
 
Bool IsIntersecting (const Sphere< DataType > &sphere) const
 Check if the cylinder is intersecting a sphere. More...
 
String ToString () const
 Get the string representation of the object. More...
 

Protected Attributes

DataType mLength
 The length of the cylinder. More...
 
DataType mRadius
 The radius of the cylinder. More...
 
DataType mOffsetX
 The X offset value. More...
 
DataType mOffsetY
 The Y offset value. More...
 
DataType mShearX
 The X shear value. More...
 
DataType mShearY
 The Y shear value. More...
 

Detailed Description

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

A cylinder class describing a cylinder by its radius and length.

Member Typedef Documentation

◆ ValueType

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

The template parameter value type.

Constructor & Destructor Documentation

◆ Cylinder() [1/3]

template<class DataType>
Murl::Math::Cylinder< DataType >::Cylinder ( DataType  length,
DataType  radius 
)
inline

Constructor taking cylinder length and radius.

Parameters
lengthThe length of the cylinder.
radiusThe radius of the cylinder.

◆ Cylinder() [2/3]

template<class DataType>
Murl::Math::Cylinder< DataType >::Cylinder ( const Box< DataType > &  box)
inline

Constructor taking a box.

Parameters
boxThe box.

◆ Cylinder() [3/3]

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

The copy constructor using a cylinder of different type.

Parameters
cThe cylinder to copy.

Member Function Documentation

◆ GetLength()

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

Get the length.

Returns
The length.

◆ GetRadius()

template<class DataType>
DataType Murl::Math::Cylinder< DataType >::GetRadius ( ) const
inline

Get the radius.

Returns
The radius.

◆ Set() [1/2]

template<class DataType>
void Murl::Math::Cylinder< DataType >::Set ( const Box< DataType > &  box)
inline

Set the cylinder by a box.

Parameters
boxThe box.

Referenced by Murl::Math::Cylinder< Real >::Cylinder(), and Murl::Math::Cylinder< Real >::Set().

◆ Set() [2/2]

template<class DataType>
void Murl::Math::Cylinder< DataType >::Set ( const Box< DataType > &  box,
DataType  shearX,
DataType  shearY 
)
inline

Set the cylinder by a box.

Parameters
boxThe box.

◆ IsIntersecting()

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

Check if the cylinder is intersecting a sphere.

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

◆ ToString()

template<class DataType>
String Murl::Math::Cylinder< 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::Cylinder< DataType >::mLength
protected

◆ mRadius

◆ mOffsetX

template<class DataType>
DataType Murl::Math::Cylinder< DataType >::mOffsetX
protected

◆ mOffsetY

template<class DataType>
DataType Murl::Math::Cylinder< DataType >::mOffsetY
protected

◆ mShearX

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

◆ mShearY

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

The documentation for this class was generated from the following files:
  • murl_graph_types.h
  • murl_math_cylinder.h


Copyright © 2011-2018 Spraylight GmbH.