TrailSystemComponent::TrailSystemComponent() : MaxCount(1000) , StartWidth(1.f), EndWidth(1.f) , StartGlow(0.f), EndGlow(0.f) , StartColor(Color(1, 1, 1, 1)), EndColor(Color(1, 1, 1, 1)) , TextureRepeat(1.f) , UseGlobalTexCoords(false) , BlendAdd(false) , trail_system_(TrailSystem::create(MaxCount())) { MaxCount.on_change().connect([&](int val){ trail_system_->set_max_trail_points(val); return true; }); }
// returns true if data for a column 'index' is present in 'inf' photo // bool Columns::IsDataPresent(int index, const PhotoInfo& inf) const { ASSERT(index >= 0 && index < MaxCount() || index >= COL_CUSTOM_SET_START && index <= COL_CUSTOM_SET_END); if (index < 0) return false; else if (index <= GetLimit(COMMON)) { if (index >= COL_GPS_FIRST_ITEM) return inf.GetGpsData() != 0; return true; } else if (index >= COL_METADATA_SET_START && index <= COL_METADATA_SET_END) return inf.HasMetadata(); else if (index >= COL_CUSTOM_SET_START && index <= COL_CUSTOM_SET_END) return true; else if (inf.GetMakerNote() == 0) return false; else return inf.GetMakerNote()->IsDataPresent(index); return true; }