Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
GrayLib::cSegment3f Class Reference

#include <cSegment3.h>

Inheritance diagram for GrayLib::cSegment3f:
GrayLib::cCylinder

Public Types

typedef float DVALUE_t
 Dimension value type. More...
 

Public Member Functions

 cSegment3f () noexcept
 
 cSegment3f (const cVector3f &v1, const cVector3f &v2) noexcept
 
cVector3f get_Center () const noexcept
 
DVALUE_t get_Width () const noexcept
 
DVALUE_t get_Height () const noexcept
 
DVALUE_t get_HeightMax () const noexcept
 
DVALUE_t get_Depth () const noexcept
 
cVector3f get_Delta () const noexcept
 
enum AXIS_TYPE get_LargestAxis () const noexcept
 
DVALUE_t get_MaxDelta () const noexcept
 
DVALUE_t get_Diameter () const
 
DVALUE_t get_Radius () const
 
DVALUE_t GetDistanceTo (const cVector3f &v) const
 
bool operator== (const cSegment3f &line) const
 
 operator const DVALUE_t * () const noexcept
 
 operator DVALUE_t * () noexcept
 
void SetMin () noexcept
 
void SetMax () noexcept
 
void SetOne () noexcept
 
void SetZero () noexcept
 
void SetRay (const cVector3f &vOrigin, const cVector3f &vDir, DVALUE_t fDist)
 
void Scale (DVALUE_t fScale)
 Change operators. More...
 
void ScaleVect (const cVector3f &vScale)
 
void ScaleY (DVALUE_t fScaleY)
 
void Offset (const cVector3f &vOffset)
 
void Grow (const cVector3f &vOffset)
 
void GrowN (DVALUE_t nValue)
 
ITERATE_t v_SetLine (const cVariant &vArgs, ITERATE_t i=0)
 
void v_GetLine (cVariant &vArgs) const
 
 UNITTEST_FRIEND (cSegment3)
 

Public Attributes

cVector3f m_vMin
 a vertex on the line segment More...
 
cVector3f m_vMax
 

Detailed Description

2 float 3d vertices make a line ("segment" is the proper CG term to distinguish from rays) in 3d space Same as a ray of limited length. Same data as AABB cBounds3f but with different interpretation.

Member Typedef Documentation

◆ DVALUE_t

Dimension value type.

Constructor & Destructor Documentation

◆ cSegment3f() [1/2]

GrayLib::cSegment3f::cSegment3f ( )
inlinenoexcept

ASSUME m_vMin,m_vMax are undefined.

◆ cSegment3f() [2/2]

GrayLib::cSegment3f::cSegment3f ( const cVector3f v1,
const cVector3f v2 
)
inlinenoexcept

Member Function Documentation

◆ get_Center()

cVector3f GrayLib::cSegment3f::get_Center ( ) const
inlinenoexcept
Returns
Center point of the line segment. or bbox.

◆ get_Delta()

cVector3f GrayLib::cSegment3f::get_Delta ( ) const
inlinenoexcept

◆ get_Depth()

DVALUE_t GrayLib::cSegment3f::get_Depth ( ) const
inlinenoexcept

◆ get_Diameter()

DVALUE_t GrayLib::cSegment3f::get_Diameter ( ) const
inline
Returns
the length of the diagonal/ray/segment line. OR get the diameter for a bounding sphere of bbox

◆ get_Height()

DVALUE_t GrayLib::cSegment3f::get_Height ( void  ) const
inlinenoexcept

◆ get_HeightMax()

DVALUE_t GrayLib::cSegment3f::get_HeightMax ( ) const
inlinenoexcept

◆ get_LargestAxis()

enum AXIS_TYPE GrayLib::cSegment3f::get_LargestAxis ( ) const
inlinenoexcept

◆ get_MaxDelta()

DVALUE_t GrayLib::cSegment3f::get_MaxDelta ( ) const
inlinenoexcept

◆ get_Radius()

DVALUE_t GrayLib::cSegment3f::get_Radius ( ) const
inline
Returns
the radius for a bounding sphere with center at center of bbox

◆ get_Width()

DVALUE_t GrayLib::cSegment3f::get_Width ( void  ) const
inlinenoexcept

◆ GetDistanceTo()

DVALUE_t GrayLib::cSegment3f::GetDistanceTo ( const cVector3f v) const
inline

◆ Grow()

void GrayLib::cSegment3f::Grow ( const cVector3f vOffset)
inline

◆ GrowN()

void GrayLib::cSegment3f::GrowN ( DVALUE_t  nValue)
inline

◆ Offset()

void GrayLib::cSegment3f::Offset ( const cVector3f vOffset)
inline

◆ operator const DVALUE_t *()

GrayLib::cSegment3f::operator const DVALUE_t * ( ) const
inlinenoexcept

◆ operator DVALUE_t *()

GrayLib::cSegment3f::operator DVALUE_t * ( )
inlinenoexcept

◆ operator==()

bool GrayLib::cSegment3f::operator== ( const cSegment3f line) const
inline

◆ Scale()

void GrayLib::cSegment3f::Scale ( DVALUE_t  fScale)
inline

Change operators.

Scale in all 3 dimensions evenly

◆ ScaleVect()

void GrayLib::cSegment3f::ScaleVect ( const cVector3f vScale)
inline

◆ ScaleY()

void GrayLib::cSegment3f::ScaleY ( DVALUE_t  fScaleY)
inline

Scale just the Y

◆ SetMax()

void GrayLib::cSegment3f::SetMax ( )
inlinenoexcept

set to extreme LARGE values.

◆ SetMin()

void GrayLib::cSegment3f::SetMin ( )
inlinenoexcept

init to extreme EMPTY values. before doing UnionVect()

◆ SetOne()

void GrayLib::cSegment3f::SetOne ( )
inlinenoexcept

◆ SetRay()

void GrayLib::cSegment3f::SetRay ( const cVector3f vOrigin,
const cVector3f vDir,
DVALUE_t  fDist 
)
inline

set the segment from a ray.

Note
DO NOT ASSUME vDir is normalized.

◆ SetZero()

void GrayLib::cSegment3f::SetZero ( )
inlinenoexcept

◆ UNITTEST_FRIEND()

GrayLib::cSegment3f::UNITTEST_FRIEND ( cSegment3  )

◆ v_GetLine()

void GrayLib::cSegment3f::v_GetLine ( cVariant vArgs) const

◆ v_SetLine()

ITERATE_t GrayLib::cSegment3f::v_SetLine ( const cVariant vArgs,
ITERATE_t  i = 0 
)

Member Data Documentation

◆ m_vMax

cVector3f GrayLib::cSegment3f::m_vMax

◆ m_vMin

cVector3f GrayLib::cSegment3f::m_vMin

a vertex on the line segment


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