MCPcopy Create free account
hub / github.com/bulletphysics/bullet3 / addDataSource

Method addDataSource

examples/RenderingExamples/TimeSeriesCanvas.cpp:85–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85void TimeSeriesCanvas::addDataSource(const char* dataSourceLabel, unsigned char red, unsigned char green, unsigned char blue)
86{
87 DataSource dataSource;
88 dataSource.m_red = red;
89 dataSource.m_green = green;
90 dataSource.m_blue = blue;
91 dataSource.m_lastValue = 0;
92 dataSource.m_hasLastValue = false;
93
94 if (dataSourceLabel)
95 {
96 int numSources = m_internalData->m_dataSources.size();
97 int row = numSources % 3;
98 int column = numSources / 3;
99 grapicalPrintf(dataSourceLabel, sTimeSeriesFontData, 50 + 200 * column, m_internalData->m_height - 48 + row * 16,
100 red, green, blue, 255);
101 }
102
103 m_internalData->m_dataSources.push_back(dataSource);
104}
105void TimeSeriesCanvas::setupTimeSeries(float yScale, int ticksPerSecond, int startTime, bool clearCanvas)
106{
107 if (0 == m_internalData->m_canvasInterface)

Callers 6

initPhysicsMethod · 0.80
initPhysicsMethod · 0.80
TutorialMethod · 0.80
initPhysicsMethod · 0.80
initMethod · 0.80

Calls 2

sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected