54 lines
1.4 KiB
C++
54 lines
1.4 KiB
C++
#pragma once
|
|
|
|
#include "beatlevelrenderhelper.h"
|
|
|
|
#include <map>
|
|
|
|
namespace Beatsaber {
|
|
|
|
class BeatLevelRenderHelperImpl : public BeatLevelRenderHelper {
|
|
public:
|
|
BeatLevelRenderHelperImpl(std::shared_ptr<const BeatLevel> level);
|
|
virtual ~BeatLevelRenderHelperImpl();
|
|
|
|
class LevelRenderIteratorImpl : public LevelRenderIterator {
|
|
public:
|
|
virtual bool hasNextNote() const override;
|
|
virtual const Note& getNextNote() override;
|
|
virtual const Wall& getNextWall() override;
|
|
private:
|
|
using noteIterator = std::multimap<uint32_t, Note>::const_iterator;
|
|
|
|
double pos;
|
|
|
|
uint32_t timebegin;
|
|
uint32_t timeend;
|
|
|
|
noteIterator noteit;
|
|
noteIterator noteitend;
|
|
|
|
double njs;
|
|
double bps;
|
|
|
|
float* matrix;
|
|
|
|
void setMat(double time, const Note& note);
|
|
|
|
public:
|
|
LevelRenderIteratorImpl(double pos, uint32_t begin, uint32_t end, std::multimap<uint32_t, Note> notes, double njs, double bps, float* matrix);
|
|
|
|
//friend class BeatLevelRenderHelperImpl;
|
|
};
|
|
|
|
virtual std::unique_ptr<BeatLevelRenderHelper::LevelRenderIterator> getIterator(double time, float* matrix) const override;
|
|
private:
|
|
std::shared_ptr<const BeatLevel> level;
|
|
std::multimap<uint32_t, Note> notes;
|
|
double bps; //beats per second
|
|
double njs; // note jump speed (in m/s)
|
|
|
|
double jumpDuration; // amount of seconds when a object is active
|
|
double jumpDistance; // distnce the objects travel within the jump duration
|
|
};
|
|
|
|
} |