-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMPI_CanonicalTimeArclengthMap.h
71 lines (47 loc) · 2.03 KB
/
MPI_CanonicalTimeArclengthMap.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
//
// MPI_CanonicalTimeArclengthMap.h
//
// Description:
// Map relating canonical coordinates, time, and arclength.
//
#ifndef __MPI_CANONICALTIMEARCLENGTHMAP_H__
#define __MPI_CANONICALTIMEARCLENGTHMAP_H__
#include "MPI_Framelist.h"
#include "MPI_Point2D.h"
class MPI_Scheduler;
class MPI_CanonicalTimeArclengthMap
{
public:
MPI_CanonicalTimeArclengthMap( MPI_Scheduler const& scheduler );
void appendPoint( MPI_Point2D const &point );
MPI_Framelist const& getFramelist( void ) const;
bool inCanonicalRange( float canonicalcoord ) const;
bool inTimeRange( float time ) const;
bool inTimeRangeOpenEnd( float time ) const;
bool inArclengthRange( float arclength ) const;
bool isEmpty( void ) const;
float getTimeFromCanonical( float canonicalcoord ) const;
float getArclengthFromCanonical( float canonicalcoord ) const;
float getCanonicalFromTime( float time ) const;
float getArclengthFromTime( float time ) const;
float getCanonicalFromArclength( float arclength ) const;
float getTimeFromArclength( float arclength ) const;
float getLastCanonicalCoord( void ) const;
float getTotalTime( void ) const;
float getTotalArclength( void ) const;
float getArclengthVsTimeSlope( float time ) const;
float getResampledArclengthVsTimeSlope( float time, float samplingperiod ) const;
void print( std::ostream &os ) const;
private:
float computeSlope( MPI_Point2D const& leftpoint, MPI_Point2D const& rightpoint ) const;
float computeSegmentLength( MPI_Point2D const& leftpoint, MPI_Point2D const& rightpoint ) const;
MPI_Scheduler const& scheduler_;
MPI_Framelist framelist_; // canonical -> time map
MPI_Map canonicalvstime_; // time -> canonical map
MPI_Map arclengthvscanonical_; // canonical -> arclength map
MPI_Map canonicalvsarclength_; // arclength -> canonical map
MPI_Point2D previouspoint_;
};
std::ostream &operator<<( std::ostream &os, MPI_CanonicalTimeArclengthMap const &canonicaltimearclengthmap );
#endif
// vim:sw=4:et:cindent: