void CGraphPanel::SetWorldCoords(double _x1, double _x2, double _y1, double _y2, BOOL bRedraw) { if (_x1 != GetX1() || _x2 != GetX2() || _y1 != GetY1() || _y2 != GetY2()) { InitCoords(_x1, _x2, _y1, _y2); if (vruler != NULL) { vruler->SetMinMax(_y1, _y2, FALSE); if (bRedraw) { vruler->RedrawWindow(); }; }; if (hruler != NULL) { hruler->SetMinMax(_x1, _x2, FALSE); if (bRedraw) { hruler->RedrawWindow(); }; }; if (bRedraw) { UpdateGraphWindow(NULL); }; }; }
void SetupJob () { AllocArrays (); stepCount = 0; InitCoords (); InitVels (); InitAccels (); AccumProps (0); }
void SetupJob () { AllocArrays (); InitCoords (); InitVels (); timeNow = nextSumTime = 0.; collCount = crossCount = 0.; StartRun (); ScheduleEvent (0, MOL_LIMIT + 6, nextSumTime); InitFreePath (); }
void SetupJob () { AllocArrays (); DefineMol (); stepCount = 0; InitCoords (); InitVels (); InitAccels (); InitAngCoords (); InitAngVels (); InitAngAccels (); AccumProps (0); }
void CGraphPanel::OnSize(UINT nType, int cx, int cy) { InitCoords(GetX1(), GetX2(), GetY1(), GetY2()); CWnd::OnSize(nType, cx, cy); if(offscreen) {// update offscreen CRect r; GetClientRect(&r); CSize s = r.Size(); offscreen->ResizeDib( s.cx, s.cy ); } }
void SetupJob () { AllocArrays (); InitRand (randSeed); stepCount = 0; InitCoords (); InitVels (); InitAccels (); InitAngCoords (); InitAngVels (); InitAngAccels (); AccumProps (0); countRdf = 0; }
void Beam::FilterList( ListOfObjects *childList ) { bool firstNoteGrace = false; // We want to keep only notes and rest // Eventually, we also need to filter out grace notes properly (e.g., with sub-beams) ListOfObjects::iterator iter = childList->begin(); while ( iter != childList->end()) { if ( !(*iter)->IsLayerElement() ) { // remove anything that is not an LayerElement (e.g. Verse, Syl, etc) iter = childList->erase( iter ); continue; } LayerElement *currentElement = dynamic_cast<LayerElement*>(*iter); assert( currentElement ); if ( !currentElement->HasInterface(INTERFACE_DURATION) ) { // remove anything that has not a DurationInterface iter = childList->erase( iter ); } else { // Drop notes that are signaled as grace notes Note *n = dynamic_cast<Note*>(currentElement); if (n) { // if we are at the beginning of the beam // and the note is cueSize // assume all the beam is of grace notes if (childList->begin() == iter) { if (n->HasGrace()) firstNoteGrace = true; } // if the first note in beam was NOT a grace // we have grace notes embedded in a beam // drop them if ( !firstNoteGrace && n->HasGrace() == true) iter = childList->erase( iter ); else iter++; } else { // if it is a Rest, do not drop iter++; } } } InitCoords( childList ); }
void SetupJob () { SetupFiles (); AllocArrays (); InitCoords (); InitVels (); timeNow = nextSumTime = 0.; collCount = crossCount = 0.; countGrid = 0; nextSnapTime = intervalGrid; StartRun (); GridAverage (0); ScheduleEvent (0, MOL_LIMIT + 6, nextSumTime); ScheduleEvent (0, MOL_LIMIT + 7, nextSnapTime); }
void FTrem::FilterList(ListOfObjects *childList) { ListOfObjects::iterator iter = childList->begin(); while (iter != childList->end()) { if (!(*iter)->Is(NOTE) && !(*iter)->Is(CHORD)) { // remove anything that is not an LayerElement (e.g. Verse, Syl, etc) iter = childList->erase(iter); continue; } // also remove notes within chords if ((*iter)->Is(NOTE)) { Note *note = dynamic_cast<Note *>(*iter); assert(note); if (note->IsChordTone()) { iter = childList->erase(iter); continue; } } ++iter; } InitCoords(childList); }