Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
cCylinder.h
Go to the documentation of this file.
1 //
4 //
5 #ifndef _INC_cCylinder_H
6 #define _INC_cCylinder_H
7 #ifndef NO_PRAGMA_ONCE
8 #pragma once
9 #endif
10 #include "cSegment3.h"
11 
12 namespace GrayLib
13 {
14  class cTriangle3f;
15 
17  : public cSegment3f
18  {
22 
23  public:
27 
28  public:
30  {
32  }
33  cCylinder(const cVector3f& v1, const cVector3f& v2)
34  : cSegment3f(v1, v2)
35  {
36  Update();
37  }
38 
39  void Update()
40  {
42  m_vDir = get_Delta();
43  m_vDirNorm = m_vDir.get_Normalized();
44  }
45 
46  bool GetIntersectWithTri(const cTriangle3f& Tri, OUT cVector3f& rvCollisionPoint, OUT DVALUE_t& rfDistToCollision) const;
47  static bool GRAYCALL GetLowestRoot(DVALUE_t a, DVALUE_t b, DVALUE_t c, DVALUE_t maxR, OUT DVALUE_t& rfRoot);
48 
50  };
51 }
52 
53 #endif
#define GRAYCALL
declare calling convention for static functions so everyone knows the arg passing scheme....
Definition: GrayCore.h:36
#define GRAYLIB_LINK
Definition: GrayLibBase.h:35
Definition: cCylinder.h:18
cCylinder()
Definition: cCylinder.h:29
void Update()
Definition: cCylinder.h:39
cVector3f m_vDirNorm
normalized vector of m_vDir.
Definition: cCylinder.h:26
cCylinder(const cVector3f &v1, const cVector3f &v2)
Definition: cCylinder.h:33
cVector3f m_vDir
derived values from cSegment3f
Definition: cCylinder.h:25
UNITTEST_FRIEND(cCylinder)
Definition: cSegment3.h:20
Definition: cTriangle3.h:22
_TYPE_C get_Normalized() const
Definition: cVecT.h:283
Definition: cVector.h:94
Definition: cMesh.h:22