ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/visitors/OtherVisitor.cpp
(Generate patch)

Comparing trunk/OOPSE-4/src/visitors/OtherVisitor.cpp (file contents):
Revision 1930 by gezelter, Wed Jan 12 22:41:40 2005 UTC vs.
Revision 1977 by tim, Fri Feb 4 22:45:48 2005 UTC

# Line 77 | Line 77 | void IgnoreVisitor::internalVisit(StuntDouble *sd) {
77   }
78  
79   void IgnoreVisitor::internalVisit(StuntDouble *sd) {
80 <    GenericData *data;
81 <    data = sd->getPropertyByName("IGNORE");
82 <
83 <    //if this stuntdoulbe is already marked as ignore just skip it
84 <    if (data == NULL) {
85 <        data = new GenericData;
86 <        data->setID("IGNORE");
87 <        sd->addProperty(data);
88 <    }
80 >    info->getSelectionManager()->clearSelection(sd);
81 >    //GenericData *data;
82 >    //data = sd->getPropertyByName("IGNORE");
83 >    //
84 >    ////if this stuntdoulbe is already marked as ignore just skip it
85 >    //if (data == NULL) {
86 >    //    data = new GenericData;
87 >    //    data->setID("IGNORE");
88 >    //    sd->addProperty(data);
89 >    //}
90   }
91  
92   const std::string IgnoreVisitor::toString() {
# Line 303 | Line 304 | void XYZVisitor::visit(Atom *atom) {
304   }
305  
306   void XYZVisitor::visit(Atom *atom) {
307 <    if (!isIgnore(atom))
307 >    if (isSelected(atom))
308          internalVisit(atom);
309   }
310  
311   void XYZVisitor::visit(DirectionalAtom *datom) {
312 <    if (!isIgnore(datom))
312 >    if (isSelected(datom))
313          internalVisit(datom);
314   }
315  
316   void XYZVisitor::visit(RigidBody *rb) {
317 <    if (!isIgnore(rb))
317 >    if (isSelected(rb))
318          internalVisit(rb);
319   }
320  
# Line 355 | Line 356 | bool XYZVisitor::isIgnore(StuntDouble *sd) {
356      }
357   }
358  
359 < bool XYZVisitor::isIgnore(StuntDouble *sd) {
360 <    GenericData *data;
360 <
361 <    data = sd->getPropertyByName("IGNORE");
362 <    return data == NULL ? false : true;
359 > bool XYZVisitor::isSelected(StuntDouble *sd) {
360 >    return info->getSelectionManager()->isSelected(sd);
361   }
362  
363   void XYZVisitor::writeFrame(std::ostream &outStream) {
# Line 465 | Line 463 | const std::string PrepareVisitor::toString() {
463   }
464  
465   const std::string PrepareVisitor::toString() {
466 <    char buffer[65535];
467 <    std::string result;
468 <
469 <    sprintf(buffer,
470 <            "------------------------------------------------------------------\n");
471 <    result += buffer;
472 <
473 <    sprintf(buffer, "Visitor name: %s", visitorName.c_str());
474 <    result += buffer;
475 <
476 <    sprintf(buffer,
477 <            "Visitor Description: prepare for operation of other vistors\n");
478 <    result += buffer;
479 <
480 <    sprintf(buffer,
481 <            "------------------------------------------------------------------\n");
482 <    result += buffer;
483 <
484 <    return result;
466 >     char buffer[65535];
467 >     std::string result;
468 >
469 >     sprintf(buffer,
470 >             "------------------------------------------------------------------\n");
471 >     result += buffer;
472 >
473 >     sprintf(buffer, "Visitor name: %s", visitorName.c_str());
474 >     result += buffer;
475 >
476 >     sprintf(buffer,
477 >             "Visitor Description: prepare for operation of other vistors\n");
478 >     result += buffer;
479 >
480 >     sprintf(buffer,
481 >             "------------------------------------------------------------------\n");
482 >     result += buffer;
483 >
484 >     return result;
485   }
486  
487   //----------------------------------------------------------------------------//

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines