Example #1
0
/** Used to set visibility of an actor corresponding to a particular component
 * When selecting a component in the InstrumentTreeWidget
 *
 * @param visitor :: Visitor to be accepted bu this actor.
 * @param rule :: A rule defining visitor acceptance by assembly actors.
 */
bool InstrumentActor::accept(GLActorVisitor& visitor, VisitorAcceptRule rule)
{
    bool ok = m_scene.accept(visitor, rule);
    visitor.visit(this);
    invalidateDisplayLists();
    return ok;
}
		bool GLActorCollection::accept(GLActorVisitor& visitor, VisitorAcceptRule rule)
		{
			for (std::vector<GLActor*>::const_iterator it = mActorsList.begin(); it != mActorsList.end(); ++it)
			{
				if ((**it).accept(visitor, rule) && rule == Finish) return true;
			}
			return visitor.visit(this);
		}