INOS
cinosmovepathsegmentbase.h
Go to the documentation of this file.
1 //******************************************************************************
26 //******************************************************************************
27 #ifndef INC_CINOSMOVEPATHSEGMENTBASE_H
28 #define INC_CINOSMOVEPATHSEGMENTBASE_H
29 //------------------------------------------------------------------------------
30 // includes
31 //------------------------------------------------------------------------------
32 //
33 // system
34 #include <inos.h>
35 #include <cinosmovepathsegment.h>
36 #include <cinosmovepathpart.h>
38 //
39 // C++
40 //
41 // project
42 //
43 //------------------------------------------------------------------------------
44 // class definition
45 //------------------------------------------------------------------------------
46 //
48 {
49  //--- user interface ---------------------------------------------------
50 
51  // public member functions
52  public :
53 
55  void AddPart(CINOSMovePathPart* apPart, uint32 auFlags);
56 
58  uint32 GetParts();
59 
60 
62  CINOSMovePathPart* GetPart(uint32 auNumber);
63 
65  virtual void GetPosition(double adP, TINOSMovePathVec& ovPos) override;
66 
67 
69  virtual void GetDerivative(uint32 auLevel, double adP, TINOSMovePathVec& ovDir) override;
70 
71 
73  virtual void GetD2max(TINOSMovePathVec& ovD2max) override;
75  virtual void GetD3max(TINOSMovePathVec& ovD3max) override;
76 
77 
79  double GetMaxVectorLength(double adError);
80 
81 
83  virtual void GetDerivativeBgn(uint32 auLevel, TINOSMovePathVec& ovDir) override;
84 
85 
87  virtual void GetDerivativeEnd(uint32 auLevel, TINOSMovePathVec& ovDir) override;
88 
89 
91  virtual uint32 Check() override
92  {
93  // ok
94  return INOS_OK;
95  }
96 
98  virtual uint32 Prepare(double& adP, uint32 uIncremental,
99  TINOSMovePathVec& ovPos, double adEpsilon) override;
100 
102  virtual void Recalc(double& adP, TINOSMovePathVec& ovStart, uint32 auInvolved,
103  double adEpsilon) override;
104 
105 
107  virtual bool IsStartBlendingAllowed() override;
108 
109 
111  virtual bool IsEndBlendingAllowed() override;
112 
113 
115  virtual bool IsContinuous(uint32 auLevel) override;
116 
117 
118  //--- internals --------------------------------------------------------
119 
120  friend class CINOSMovePath;
121  friend class CINOSMovePathCurve;
122 
123  // constructor / destructor
124  public :
127  {
128  }
130  CINOSMovePathSegmentBase (uint32 auId, uint32 auFlags, double adTolerance,
131  double adVelocity) : CINOSMovePathSegment(auId, auFlags, adTolerance, adVelocity),
132  m_pParts{0}
133  {
134  }
137  {
138  // destroy parts
139  DestroyParts();
140  }
141 
143  void DestroyParts();
144 
145  // protected members
146  protected :
149 
150  // dynamic object handling
151  DECLARE_DYNAMIC(CINOSMovePathSegmentBase);
152 };
153 
154 
155 //------------------------------------------------------------------------------
156 // end of file
157 //------------------------------------------------------------------------------
158 
159 #endif // INC_CINOSMOVEPATHSEGMENTBASE_H
cinosmovepathsegment.h
The CINOSMovePathSegment class.
CINOSMovePathSegmentBase::GetD2max
virtual void GetD2max(TINOSMovePathVec &ovD2max) override
get D2 max
CINOSMovePathSegmentBase::GetPart
CINOSMovePathPart * GetPart(uint32 auNumber)
get n-th part
CINOSMovePathSegmentBase::Check
virtual uint32 Check() override
check segment integrity (called before added to curve)
Definition: cinosmovepathsegmentbase.h:91
CINOSMovePathSegmentBase::m_pParts
class CINOSMovePathPart * m_pParts[DF_INOS_MOVEPATH_MAX_AXES]
array of my parts. Can store at most as many parts as supported "axes"
Definition: cinosmovepathsegmentbase.h:148
CINOSMovePathSegmentBase::DestroyParts
void DestroyParts()
destroy parts
CINOSMovePathSegmentBase::Prepare
virtual uint32 Prepare(double &adP, uint32 uIncremental, TINOSMovePathVec &ovPos, double adEpsilon) override
prepare segment
CINOSMovePathSegmentBase::IsStartBlendingAllowed
virtual bool IsStartBlendingAllowed() override
return true if start blending allowed
CINOSMovePathSegmentBase::GetD3max
virtual void GetD3max(TINOSMovePathVec &ovD3max) override
get D3 max
CINOSMovePathSegmentBase::GetDerivativeBgn
virtual void GetDerivativeBgn(uint32 auLevel, TINOSMovePathVec &ovDir) override
get auLevel derivative at segment begin
CINOSMovePathSegmentBase::CINOSMovePathSegmentBase
CINOSMovePathSegmentBase(uint32 auId, uint32 auFlags, double adTolerance, double adVelocity)
constructor
Definition: cinosmovepathsegmentbase.h:130
INOS_OK
uint32 INOS_OK
Definition: inoserror.h:1681
CINOSMovePathSegmentBase::GetDerivativeEnd
virtual void GetDerivativeEnd(uint32 auLevel, TINOSMovePathVec &ovDir) override
get auLevel derivative at segment end
CINOSMovePathSegmentBase::IsEndBlendingAllowed
virtual bool IsEndBlendingAllowed() override
return true if end blending allowed
CINOSMovePath
Definition: cinosmovepath.h:565
CINOSMovePathSegmentBase::IsContinuous
virtual bool IsContinuous(uint32 auLevel) override
return true if segment is auLevel continuous
cinosmovepathpartlinear.h
The CINOSMovePathPartLinear class.
CINOSMovePathSegmentBase::Recalc
virtual void Recalc(double &adP, TINOSMovePathVec &ovStart, uint32 auInvolved, double adEpsilon) override
prepare segment
CINOSMovePathSegment
Definition: cinosmovepathsegment.h:44
CINOSMovePathCurve
Definition: cinosmovepathcurve.h:55
CINOSMovePathSegmentBase::GetPosition
virtual void GetPosition(double adP, TINOSMovePathVec &ovPos) override
get position at 'adP'
CINOSMovePathSegmentBase
Definition: cinosmovepathsegmentbase.h:47
CINOSMovePathPart
Definition: cinosmovepathpart.h:44
CINOSMovePathSegmentBase::GetParts
uint32 GetParts()
get number of parts
cinosmovepathpart.h
The CINOSMovePathPart class.
CINOSMovePathSegmentBase::GetMaxVectorLength
double GetMaxVectorLength(double adError)
get vector length for given error
CINOSMovePathSegmentBase::CINOSMovePathSegmentBase
CINOSMovePathSegmentBase()
constructor
Definition: cinosmovepathsegmentbase.h:126
CINOSMovePathSegmentBase::~CINOSMovePathSegmentBase
virtual ~CINOSMovePathSegmentBase()
destructor
Definition: cinosmovepathsegmentbase.h:136
DF_INOS_MOVEPATH_MAX_AXES
#define DF_INOS_MOVEPATH_MAX_AXES
Definition: inosdefault.h:144
CINOSMovePathSegmentBase::AddPart
void AddPart(CINOSMovePathPart *apPart, uint32 auFlags)
add part to segment
CINOSMovePathSegmentBase::GetDerivative
virtual void GetDerivative(uint32 auLevel, double adP, TINOSMovePathVec &ovDir) override
get auLevel derivative at 'adP'