![]() |
WhirlyGlobe
1.2
A 3D interactive globe toolkit for iOS
|
00001 /* 00002 * Cullable.h 00003 * WhirlyGlobeLib 00004 * 00005 * Created by Steve Gifford on 2/1/11. 00006 * Copyright 2011 mousebird consulting 00007 * 00008 * Licensed under the Apache License, Version 2.0 (the "License"); 00009 * you may not use this file except in compliance with the License. 00010 * You may obtain a copy of the License at 00011 * http://www.apache.org/licenses/LICENSE-2.0 00012 * 00013 * Unless required by applicable law or agreed to in writing, software 00014 * distributed under the License is distributed on an "AS IS" BASIS, 00015 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00016 * See the License for the specific language governing permissions and 00017 * limitations under the License. 00018 * 00019 */ 00020 00021 #import "Drawable.h" 00022 00023 namespace WhirlyGlobe 00024 { 00025 00033 class Cullable : public Identifiable 00034 { 00035 public: 00037 Cullable() { } 00038 00040 void addDrawable(Drawable *drawable) { drawables.insert(drawable); } 00041 00043 void remDrawable(Drawable *drawable) { std::set<Drawable *>::iterator it = drawables.find(drawable); if (it != drawables.end()) drawables.erase(it); } 00044 00046 const std::set<Drawable *> &getDrawables() const { return drawables; } 00047 00049 GeoMbr getGeoMbr() const { return geoMbr; } 00050 00052 void setGeoMbr(const GeoMbr &inMbr); 00053 00054 public: 00056 Point3f cornerPoints[4]; 00058 Vector3f cornerNorms[4]; 00060 GeoMbr geoMbr; 00061 00062 std::set<Drawable *> drawables; 00063 }; 00064 00065 }