INOS
cinosmovepathinterpolatorshape.h
Go to the documentation of this file.
1 //******************************************************************************
26 //******************************************************************************
27 #ifndef INC_CINOSMOVEPATHINTERPOLATORSHAPE_H
28 #define INC_CINOSMOVEPATHINTERPOLATORSHAPE_H
29 //------------------------------------------------------------------------------
30 // defines
31 //------------------------------------------------------------------------------
32 //
33 //------------------------------------------------------------------------------
34 // includes
35 //------------------------------------------------------------------------------
36 //
37 // system
38 #include <inos.h>
40 //
41 // C++
42 //
43 // project
44 //
45 //------------------------------------------------------------------------------
46 // class definition
47 //------------------------------------------------------------------------------
48 //
50 {
51  //--- user interface ---------------------------------------------------
52 
53  // public member functions
54  public :
55 
57  virtual void GetPosition(double adP, CINOSMovePathSegment*& opSegment,
58  TINOSMovePathVec& ovPos) override;
59 
61  virtual double GetCurveLength() override;
62 
64  virtual bool IsCurveContinuous(uint32 auLevel) override
65  {
66  // levels <= 2
67  if (auLevel <= 2) {
68  // yes
69  return true;
70  }
71  else {
72  // no
73  return false;
74  }
75  }
76 
78  virtual uint32 Prepare() override;
79 
80  virtual uint32 ConnectSegments(
81  CINOSMovePathInterpolator* apOther) override;
82 
83 
84  //--- internals --------------------------------------------------------
85 
86  // constructor / destructor
87  public :
90  CINOSMovePathCurve* apCurve,
91  CINOSMovePath* apPath = nullptr);
92 
93  virtual ~CINOSMovePathInterpolatorShape () {
94  ShapeCleanup();
95  }
96 
97  protected :
98  // protected member functions
100  void CalcTandV(
101  TINOSMovePathVec& iP0,
102  TINOSMovePathVec& iP1,
103  TINOSMovePathVec& iVmax,
104  double adVcmd,
105  uint32 auMask,
106  double& odT,
107  double& odFactor,
108  TINOSMovePathVec& oV);
110  double GetCorrectedP(double adP);
111 
112 
114  virtual void Cleanup() override;
115 
116  private:
117  // private member functions
118 
120  void ShapeCleanup();
121 
122  // protected members
123  protected :
125  double m_dPlast = 0.0;
127  double m_dLengthCorrection = 0.0;
129  double m_dConnectionLength = 0.0;
130 
132  class CINOSRampJob* m_pJob[DF_INOS_MOVEPATH_MAX_AXES];
133 
135  struct SCorr* m_pFstCorr = nullptr;
136  struct SCorr* m_pLstCorr = nullptr;
137 
138  // dynamic
140 };
141 
142 //------------------------------------------------------------------------------
143 // end of file
144 //------------------------------------------------------------------------------
145 
146 #endif // INC_CINOSMOVEPATHINTERPOLATORSHAPE_H
CINOSMovePathInterpolatorShape::CalcTandV
void CalcTandV(TINOSMovePathVec &iP0, TINOSMovePathVec &iP1, TINOSMovePathVec &iVmax, double adVcmd, uint32 auMask, double &odT, double &odFactor, TINOSMovePathVec &oV)
cal T and V vector of a segment
CINOSMovePathInterpolatorShape::GetCurveLength
virtual double GetCurveLength() override
get curve length
CINOSMovePathInterpolatorShape::IsCurveContinuous
virtual bool IsCurveContinuous(uint32 auLevel) override
check if curve continuous
Definition: cinosmovepathinterpolatorshape.h:64
CINOSMovePathInterpolatorShape::m_pFstCorr
struct SCorr * m_pFstCorr
pointer to head of correctino list
Definition: cinosmovepathinterpolatorshape.h:135
CINOSMovePathInterpolatorShape
Definition: cinosmovepathinterpolatorshape.h:49
CINOSMovePathInterpolatorShape::m_dConnectionLength
double m_dConnectionLength
curve length correction
Definition: cinosmovepathinterpolatorshape.h:129
CINOSMovePathInterpolator
Definition: cinosmovepathinterpolator.h:81
CINOSMovePathInterpolatorShape::m_dPlast
double m_dPlast
P of last GetPosition.
Definition: cinosmovepathinterpolatorshape.h:125
CINOSMovePath
Definition: cinosmovepath.h:549
CINOSMovePathInterpolatorShape::m_pJob
class CINOSRampJob * m_pJob[DF_INOS_MOVEPATH_MAX_AXES]
ramp jobs
Definition: cinosmovepathinterpolatorshape.h:132
CINOSMovePathSegment
Definition: cinosmovepathsegment.h:44
CINOSMovePathCurve
Definition: cinosmovepathcurve.h:55
cinosmovepathinterpolator.h
The CINOSMovePathInterpolator class.
CINOSMovePathInterpolatorShape::Cleanup
virtual void Cleanup() override
cleanup
CINOSMovePathInterpolatorShape::GetPosition
virtual void GetPosition(double adP, CINOSMovePathSegment *&opSegment, TINOSMovePathVec &ovPos) override
get position vector at 'adP'
CINOSMovePathInterpolatorShape::GetCorrectedP
double GetCorrectedP(double adP)
get corrected P
DF_INOS_MOVEPATH_MAX_AXES
#define DF_INOS_MOVEPATH_MAX_AXES
Definition: inosdefault.h:152
DECLARE_DYNAMIC
#define DECLARE_DYNAMIC(aClass)
Definition: cinospartitionmemory.h:328
CINOSMovePathInterpolatorShape::CINOSMovePathInterpolatorShape
CINOSMovePathInterpolatorShape(CINOSMovePathCurve *apCurve, CINOSMovePath *apPath=nullptr)
constructor
CINOSMovePathInterpolatorShape::m_dLengthCorrection
double m_dLengthCorrection
curve length correction
Definition: cinosmovepathinterpolatorshape.h:127
CINOSMovePathInterpolatorShape::Prepare
virtual uint32 Prepare() override
do precalculation