ObjectIndexIterator::ObjectIndexIterator(BitmapTriples *trip, TripleID &pat) : triples(trip), pattern(pat), adjY(trip->arrayY, trip->bitmapY), adjZ(trip->arrayZ, trip->bitmapZ), adjIndex(trip->arrayIndex, trip->bitmapIndex) { // Convert pattern to local order. swapComponentOrder(&pattern, SPO, triples->order); patX = pattern.getSubject(); patY = pattern.getPredicate(); patZ = pattern.getObject(); if(patZ==0) { throw std::runtime_error("This iterator is not suitable for this pattern"); } #if 0 cout << "Pattern: " << patX << " " << patY << " " << patZ << endl; cout << "AdjY: " << endl; adjY.dump(); cout << "AdjZ: " << endl; adjZ.dump(); cout << "AdjIndexObjects: " << endl; adjIndex.dump(); #endif calculateRange(); goToStart(); }
void PiecewiseFunction::setIntervals(const std::vector<Interval>& intervals) throw() { intervals_ = intervals; calculateRange(); valid_ = isValid(); }
void PiecewiseFunction::clear() throw() { intervals_.clear(); coefficients_.clear(); calculateRange(); valid_ = false; }
void PiecewiseFunction::set(const std::vector<Interval>& intervals, const std::vector<Coefficients>& coeffs) throw() { intervals_ = intervals; coefficients_ = coeffs; calculateRange(); valid_ = isValid(); }
PiecewiseFunction::PiecewiseFunction(const std::vector<Interval>& intervals, const std::vector<Coefficients>& coeffs) throw() : intervals_(intervals), coefficients_(coeffs) { calculateRange(); valid_ = isValid(); }
void Player::setTextureIdx(size_t idx_) { if (textureIdx != idx_) { textureIdx = idx_; calculateRange(); } }
void Player::setDirection(PlayerDirection direction_) { if (playerDirection != direction_) { playerDirection = direction_; calculateRange(); } }
Player::Player(const PlayerClass* class__, const Level& level) : LevelObject(class__) { animation.animType = AnimationType::Looped; cellSize.x = -2; cellSize.y = -2; sprite.setOutline(class__->Outline(), class__->OutlineIgnore()); calculateRange(); applyDefaults(level); }
void Player::setAnimation(PlayerAnimation animation_) { if (playerAnimation != animation_) { playerAnimation = animation_; speed = Class()->getSpeed(playerAnimation); animation.elapsedTime.timeout = speed.animation; updateSpeed(); calculateRange(); } }