void ramBaseApp::drawNodeArrays() { // draw nodearray for (int n = 0; n < getNumNodeArray(); n++) { const ramNodeArray &o = getNodeArray(n); if (o.isActor()) drawActor((ramActor &)o); else drawRigid((ramRigidBody &)o); } // draw bus map<string, ramNodeArray>::iterator it = getActorManager().getAllBus().begin(); while (it != getActorManager().getAllBus().end()) { const ramNodeArray &o = (*it).second; if (o.isActor()) drawActor((ramActor &)o); else drawRigid((ramRigidBody &)o); ++it; } }
void ramBaseApp::drawNodeArrays() { // draw nodearray for (int n = 0; n < getNumNodeArray(); n++) { const ramNodeArray &o = getNodeArray(n); glPushAttrib(GL_ALL_ATTRIB_BITS); glPushMatrix(); ofPushStyle(); if (o.isActor()) drawActor((ramActor &)o); else drawRigid((ramRigidBody &)o); ofPopStyle(); glPopMatrix(); glPopAttrib(); } // draw bus map<string, ramNodeArray>::iterator it = getActorManager().getAllBus().begin(); while (it != getActorManager().getAllBus().end()) { const ramNodeArray &o = (*it).second; glPushAttrib(GL_ALL_ATTRIB_BITS); glPushMatrix(); ofPushStyle(); if (o.isActor()) drawActor((ramActor &)o); else drawRigid((ramRigidBody &)o); ofPopStyle(); glPopMatrix(); glPopAttrib(); ++it; } }
void ramActorsScene::draw() { /// bRecording = false; /// ramBeginCamera(); for(int i=0; i<getNumNodeArray(); i++) { ramNodeArray &NA = getNodeArray(i); const string name = NA.getName(); SegmentsIter it = mSegmentsMap.find(name); if (it == mSegmentsMap.end()) continue; BaseSegment *seg = it->second; /// draw if "Show actor" toggle is anabled // note that ofxUIImageToggle shows hilighted image when it's false, if (seg->isVisible()) { ofPushMatrix(); ofPushStyle(); { if (bUseShading) light.enable(); ofSetColor(seg->jointColor); ofTranslate(seg->position.x, 0, seg->position.y); if (NA.isRigid()) { ramDrawBasicRigid((ramRigidBody&)NA); } else { if (bUseSimpleActor) ramDrawBasicActor((ramActor&)NA); else drawNodes(NA); } if (bUseShading) light.disable(); } ofPopStyle(); ofPopMatrix(); } if (seg->getType() == RAM_UI_SEGMENT_TYPE_CONTROL) { if (static_cast<ControlSegment*>(seg)->isRecording()) { bRecording = true; } } } ramEndCamera(); }