iVS3D v2.0.0
Loading...
Searching...
No Matches
KeyframeIterator Class Reference

The KeyframeIterator class is used to iterate given ModelInputPictures instance mip. Handles boundaries of mip. KeyframeIterator only iterates indices marked as keyframes in ModelInputPictures. More...

#include <keyframeiterator.h>

Inheritance diagram for KeyframeIterator:
ModelInputIterator

Public Member Functions

unsigned int getNext (ModelInputPictures *mip, unsigned int currentIdx, unsigned int stepsize=1) override
 steps for stepsize keyframes forward from given currentIdx without leaving the boundaries of ModelInputPictures mip.
 
unsigned int getPrevious (ModelInputPictures *mip, unsigned int currentIdx, unsigned int stepsize=1) override
 steps for stepsize keyframes backward from given currentIdx without leaving the boundaries of ModelInputPictures mip.
 
unsigned int getFirst (ModelInputPictures *mip) override
 get index of first keyframe in ModelInputPictures mip.
 
unsigned int getLast (ModelInputPictures *mip) override
 get index of last keyframe in ModelInputPictures mip.
 
bool isFirst (ModelInputPictures *mip, unsigned int currentIdx) override
 check if currentIdx is first keyframe index in ModelInputPictures mip.
 
bool isLast (ModelInputPictures *mip, unsigned int currentIdx) override
 check if currentIdx is last keyframe index in ModelInputPictures mip.
 

Detailed Description

The KeyframeIterator class is used to iterate given ModelInputPictures instance mip. Handles boundaries of mip. KeyframeIterator only iterates indices marked as keyframes in ModelInputPictures.

See also
ModelInputPictures::getAllKeyframes
Author
Dominik Wüst
Date
2021/02/11

Member Function Documentation

◆ getFirst()

unsigned int KeyframeIterator::getFirst ( ModelInputPictures mip)
overridevirtual

get index of first keyframe in ModelInputPictures mip.

Parameters
mipthe ModelInputPictures instance to iterate
Returns
0 if mip.isKeyframe(0), mip.getNextKeyframe(0,1) otherwise
See also
ModelInputPictures::isKeyframe
ModelInputPictures::getNextKeyframe

Implements ModelInputIterator.

◆ getLast()

unsigned int KeyframeIterator::getLast ( ModelInputPictures mip)
overridevirtual

get index of last keyframe in ModelInputPictures mip.

Parameters
mipthe ModelInputPictures instance to iterate
Returns
mip.getPicCount()-1 if mip.isKeyframe(mip.getPicCount()-1), mip.getPreviousKeyframe(mip.getPicCount()-1,1) otherwise
See also
ModelInputPictures::isKeyframe
ModelInputPictures::getPreviousKeyframe
ModelInputPictures::getPicCount

Implements ModelInputIterator.

◆ getNext()

unsigned int KeyframeIterator::getNext ( ModelInputPictures mip,
unsigned int  currentIdx,
unsigned int  stepsize = 1 
)
overridevirtual

steps for stepsize keyframes forward from given currentIdx without leaving the boundaries of ModelInputPictures mip.

Parameters
mipthe ModelInputPictures instance to iterate
currentIdxthe index to start from
stepsizethe number of keyframes to step from currentIdx
Returns
the index of keyframe which is stepsize keyframes forward from currentIdx

Implements ModelInputIterator.

◆ getPrevious()

unsigned int KeyframeIterator::getPrevious ( ModelInputPictures mip,
unsigned int  currentIdx,
unsigned int  stepsize = 1 
)
overridevirtual

steps for stepsize keyframes backward from given currentIdx without leaving the boundaries of ModelInputPictures mip.

Parameters
mipthe ModelInputPictures instance to iterate
currentIdxthe index to start from
stepsizethe number of keyframes to step from currentIdx
Returns
the index of keyframe which is stepsize keyframes backward from currentIdx

Implements ModelInputIterator.

◆ isFirst()

bool KeyframeIterator::isFirst ( ModelInputPictures mip,
unsigned int  currentIdx 
)
overridevirtual

check if currentIdx is first keyframe index in ModelInputPictures mip.

Parameters
mipthe ModelInputPictures to iterate
currentIdxindex to check
Returns
true if currentIdx is first keyframe index, false otherwise

Implements ModelInputIterator.

◆ isLast()

bool KeyframeIterator::isLast ( ModelInputPictures mip,
unsigned int  currentIdx 
)
overridevirtual

check if currentIdx is last keyframe index in ModelInputPictures mip.

Parameters
mipthe ModelInputPictures to iterate
currentIdxindex to check
Returns
true if currentIdx is last keyframe index, false otherwise

Implements ModelInputIterator.


The documentation for this class was generated from the following files: