代码拉取完成,页面将自动刷新
#ifndef ATG_ENGINE_SIM_OSCILLOSCOPE_H
#define ATG_ENGINE_SIM_OSCILLOSCOPE_H
#include "ui_element.h"
class Oscilloscope : public UiElement {
public:
struct DataPoint {
double x, y;
};
public:
Oscilloscope();
virtual ~Oscilloscope();
virtual void initialize(EngineSimApplication *app);
virtual void destroy();
virtual void update(float dt);
virtual void render();
void render(const Bounds &bounds);
Point dataPointToRenderPosition(
const DataPoint &p,
const Bounds &bounds) const;
void addDataPoint(double x, double y);
void setBufferSize(int n);
void reset();
double m_xMin;
double m_xMax;
double m_yMin;
double m_yMax;
double m_dynamicallyResizeX;
double m_dynamicallyResizeY;
double m_lineWidth;
bool m_drawReverse;
bool m_drawZero;
ysVector i_color;
protected:
DataPoint *m_points;
Point *m_renderBuffer;
int m_writeIndex;
int m_bufferSize;
int m_pointCount;
};
#endif /* ATG_ENGINE_SIM_OSCILLOSCOPE_H */
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。