452 { |
447 { |
453 m_verticesOutdated = true; |
448 m_verticesOutdated = true; |
454 } |
449 } |
455 |
450 |
456 /* |
451 /* |
457 * Special operator definition that implements the XOR operator for the winding. |
452 * Special operator definition that implements the XOR operator for windings. |
458 * However, if either winding is NoWinding, then this function returns NoWinding. |
453 * However, if either winding is NoWinding, then this function returns NoWinding. |
459 */ |
454 */ |
460 decltype(LDHeader::winding) operator^( |
455 Winding operator^(Winding one, Winding other) |
461 decltype(LDHeader::winding) one, |
456 { |
462 decltype(LDHeader::winding) other |
457 if (one == NoWinding or other == NoWinding) |
463 ) { |
458 return NoWinding; |
464 if (one == LDHeader::NoWinding or other == LDHeader::NoWinding) |
|
465 return LDHeader::NoWinding; |
|
466 else if (one != other) |
|
467 return LDHeader::Clockwise; |
|
468 else |
459 else |
469 return LDHeader::CounterClockwise; |
460 return static_cast<Winding>(static_cast<int>(one) ^ static_cast<int>(other)); |
470 } |
461 } |