| 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() { |
| 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 |
|
|
| 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) { |
| 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 |
|
//----------------------------------------------------------------------------// |