SECurve.h
1/* Distributed under the Apache License, Version 2.0.
2 See accompanying NOTICE file for details.*/
3
4#pragma once
5#include "cdm/properties/SEProperty.h"
6#include "cdm/properties/SESegmentConstant.h"
7#include "cdm/properties/SESegmentLinear.h"
8#include "cdm/properties/SESegmentParabolic.h"
9#include "cdm/properties/SESegmentSigmoidal.h"
10
11class CDM_DECL SECurve : public SEProperty, public Loggable
12{
13public:
14
15 SECurve(Logger* logger=nullptr);
16 virtual ~SECurve();
17
18 void Invalidate() override;
19 virtual bool IsValid() const override;
20 virtual void Copy(const SECurve& src);
21
22 virtual bool HasSegment() const;
23 virtual void SortSegments();
24
25 SESegmentConstant& AddConstantSegment();
26 SESegmentLinear& AddLinearSegment();
27 SESegmentParabolic& AddParabolicSegment();
28 SESegmentSigmoidal& AddSigmoidalSegment();
29
30 virtual const std::vector<SESegment*>& GetSegments();
31 virtual const std::vector<const SESegment*> GetSegments() const;
32
33 virtual std::string ToString() const;
34 virtual void ToString(std::ostream& str) const;
35
36protected:
37
38 std::vector<SESegment*> m_Segments;
39};
Definition: Logger.h:23
Definition: Logger.h:71
Definition: SECurve.h:12
std::vector< SESegment * > m_Segments
Definition: SECurve.h:38
Definition: SEProperty.h:8
virtual void Invalidate()=0
virtual bool IsValid() const =0
Definition: SESegmentConstant.h:9
Definition: SESegmentLinear.h:9
Definition: SESegmentParabolic.h:9
Definition: SESegmentSigmoidal.h:9

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.