World::World() { //at the first point trainU = 0; //time = 0; tangentlength = 0; //These parameter for the rotate angle of the train angle = 45.0228; heightAngle = 0; trainnum = 0; //those parameter are used to help trainCamera(ride view) float viewx, viewy, viewz; //initial coordinates angle = 69.4139; xaxis = 47.8786; yaxis = 4; zaxis = 2.121; resetPoints(); distance = 0; xangle = 0; yangle = 0; delta = 0.0; or_angle = 0; smoothness = 1; //zangle = 0; }
void DistortionComponent::resized() { const int w = getWidth(); const int h = getHeight(); if (! isInitialised && w > 0 && h > 0) { resetPoints(); isInitialised = true; } background = Image (Image::RGB, jmax (1, w), jmax (1, h), false); Graphics g (background); g.fillAll (Colours::black); g.setColour (Colour::greyLevel (0.25f)); const float xScale = w / 10.0f; const float yScale = h / 10.0f; for (int i = 1; i < 10; ++i) { g.drawHorizontalLine ((int) (i * yScale), 0.0f, (float) w); g.drawVerticalLine ((int) (i * xScale), 0.0f, (float) h); } g.drawLine (0.0f, (float) h, (float) w, 0.0f); refreshPath(); }
void MemChartPrivate::leaveEvent(QEvent *e) { QWidget::leaveEvent(e); resetPoints(); PYHistogramTip* tip = PYHistogramTip::getInstance(); tip->hide(); }
void DistortionComponent::resetBuffer() { float* bufferData = buffer.getData(); const int bufferSize = buffer.getSize(); const float bufferScale = 1.0f / bufferSize; for (int i = 0; i < bufferSize; ++i) bufferData[i] = bufferScale * i; resetPoints(); buffer.updateListeners(); }
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // KviCanvasPolygon // KviCanvasPolygon::KviCanvasPolygon(QCanvas * c,int x,int y,QPointArray &pnts,double dScaleFactor) : QCanvasPolygon(c) { m_properties.insert("clrForeground",QVariant(QColor(0,0,0))); m_properties.insert("uLineWidth",QVariant((unsigned int)0)); m_properties.insert("clrBackground",QVariant(QColor(0,0,0))); m_properties.insert("bHasBackground",QVariant(false,1)); m_dScaleFactor = dScaleFactor; m_points = pnts; resetPoints(); move(x,y); }
//**************************************************************************** // // * Constructor //============================================================================ CTrack:: CTrack(Ogre::SceneManager *tSm) : mSm(tSm), mCount(0) //============================================================================ { resetPoints(); }
void KviCanvasPolygon::setScaleFactor(double dScaleFactor) { m_dScaleFactor = dScaleFactor; resetPoints(); }
void KviCanvasPolygon::setInternalPoints(const QPointArray &pnts) { m_points = pnts; resetPoints(); }
World::World() : trainU(0) { resetPoints(); }
void MemChartPrivate::mouseReleaseEvent(QMouseEvent *e) { _mousePressed = false; resetPoints(); update(); }