Go to the documentation of this file.
6 #ifndef CNOID_UTIL_MULTI_SEQ_H
7 #define CNOID_UTIL_MULTI_SEQ_H
16 template <
typename ElementType,
typename Allocator = std::allocator<ElementType>>
25 typedef typename Container::Row
Frame;
26 typedef typename Container::Column
Part;
71 virtual std::shared_ptr<AbstractSeq>
cloneSeq()
const override {
72 return std::make_shared<MultiSeqType>(*
this);
81 virtual void setDimension(
int newNumFrames,
int newNumParts,
bool fillNewElements =
false)
override {
89 if(newNumParts != prevNumParts){
92 if(newNumFrames > prevNumFrames){
93 if(prevNumFrames == 0){
97 for(
int i=prevNumFrames; i < newNumFrames; ++i){
120 return (r > 0.0) ? 1.0 / r : 0.0;
123 virtual void setNumParts(
int newNumParts,
bool fillNewElements =
false)
override {
135 virtual void setNumFrames(
int newNumFrames,
bool fillNewElements =
false)
override {
Deque2D< ElementType, Allocator > Container
Definition: MultiSeq.h:22
virtual void setNumParts(int newNumParts, bool fillNewElements=false) override
Definition: MultiSeq.h:123
iterator end()
Definition: Deque2D.h:146
Column column(int colIndex)
Definition: Deque2D.h:592
int frameOfTime(double time) const
Definition: MultiSeq.h:155
Row append()
Definition: Deque2D.h:600
double timeOfFrame(int frame) const
Definition: MultiSeq.h:159
const std::string & seqType() const
Definition: AbstractSeq.h:36
virtual AbstractSeq & operator=(const AbstractSeq &rhs) override
Definition: MultiSeq.h:62
MultiSeq(const MultiSeqType &org)
Definition: MultiSeq.h:43
Deque2DType & operator=(const Deque2DType &rhs)
Definition: Deque2D.h:342
double frameRate() const
Definition: MultiSeq.h:110
AbstractMultiSeq & operator=(const AbstractMultiSeq &rhs)
Definition: AbstractSeq.cpp:210
virtual ~MultiSeq()
Definition: MultiSeq.h:50
MultiSeq(const char *seqType, int numFrames, int numParts)
Definition: MultiSeq.h:36
Definition: AbstractSeq.h:99
int numParts() const
Definition: MultiSeq.h:147
virtual int getNumFrames() const override
Definition: MultiSeq.h:131
void clearFrames()
Definition: MultiSeq.h:139
MultiSeqType & operator=(const MultiSeqType &rhs)
Definition: MultiSeq.h:52
void copySeqProperties(const AbstractMultiSeq &source)
Definition: AbstractSeq.cpp:217
double offsetTime_
Definition: MultiSeq.h:218
Row last()
Definition: Deque2D.h:584
Definition: MultiSeq.h:17
void pop_front(int numRows=1)
Definition: Deque2D.h:609
int clampFrameIndex(int frameIndex)
Definition: MultiSeq.h:207
int numFrames() const
Definition: MultiSeq.h:127
Container::value_type value_type
Definition: MultiSeq.h:24
void setOffsetTimeFrame(int offset)
Definition: MultiSeq.h:179
virtual int getNumParts() const override
Definition: MultiSeq.h:143
MultiSeq(const char *seqType)
Definition: MultiSeq.h:29
void resize(int newRowSize, int newColSize)
Definition: Deque2D.h:525
virtual double getOffsetTime() const override
Definition: MultiSeq.h:167
void copySeqProperties(const MultiSeqType &source)
Definition: MultiSeq.h:75
int offsetTimeFrame() const
Definition: MultiSeq.h:175
Part part(int index)
Definition: MultiSeq.h:187
Vector3 value_type
Definition: Deque2D.h:20
double timeLength() const
Definition: MultiSeq.h:151
Container::Column Part
Definition: MultiSeq.h:26
Container::Row Frame
Definition: MultiSeq.h:25
virtual AbstractSeq & operator=(const AbstractSeq &rhs)
Definition: AbstractSeq.cpp:39
Definition: AbstractSceneLoader.h:11
virtual void setOffsetTime(double time) override
Definition: MultiSeq.h:171
double frameRate_
Definition: MultiSeq.h:217
virtual std::shared_ptr< AbstractSeq > cloneSeq() const override
Definition: MultiSeq.h:71
Row row(int rowIndex)
Definition: Deque2D.h:576
virtual void setFrameRate(double frameRate) override
Definition: MultiSeq.h:114
virtual void setNumFrames(int newNumFrames, bool fillNewElements=false) override
Definition: MultiSeq.h:135
double offsetTime() const
Definition: MultiSeq.h:163
const double timeStep() const
Definition: MultiSeq.h:118
Frame appendFrame()
Definition: MultiSeq.h:203
Definition: AbstractSeq.h:21
value_type Element
Definition: MultiSeq.h:27
Frame frame(int index)
Definition: MultiSeq.h:191
iterator begin()
Definition: Deque2D.h:138
const Part part(int index) const
Definition: MultiSeq.h:183
int colSize() const
Definition: Deque2D.h:544
virtual void setDimension(int newNumFrames, int newNumParts, bool fillNewElements=false) override
Definition: MultiSeq.h:81
virtual value_type defaultValue() const
Definition: MultiSeq.h:220
void popFrontFrame()
Definition: MultiSeq.h:199
virtual double getFrameRate() const override
Definition: MultiSeq.h:106
const Frame frame(int index) const
Definition: MultiSeq.h:195
int rowSize() const
Definition: Deque2D.h:533