]> git.mxchange.org Git - simgear.git/blobdiff - simgear/scene/tgdb/userdata.hxx
Only disable display lists if using VBOs.
[simgear.git] / simgear / scene / tgdb / userdata.hxx
index 312dbe984f867a2679a60e8b6855b6541aa3117c..da1cc3d1908d66b0e0895816802d51e7b742026f 100644 (file)
@@ -3,7 +3,7 @@
 //
 // Written by David Megginson, started December 2001.
 //
-// Copyright (C) 2001 - 2003  Curtis L. Olson  - curt@flightgear.org
+// Copyright (C) 2001 - 2003  Curtis L. Olson  - http://www.flightgear.org/~curt
 //
 // This program is free software; you can redistribute it and/or
 // modify it under the terms of the GNU General Public License as
@@ -17,7 +17,7 @@
 //
 // You should have received a copy of the GNU General Public License
 // along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //
 // $Id$
 
 
 #include <simgear/compiler.h>
 
-#include STL_STRING
+#include <osg/Node>
 
-#include <plib/ssg.h>
-
-SG_USING_STD(string);
-
-class SGMaterial;
 class SGMatModel;
-class SGMatModelGroup;
-class SGModelLib;
 class SGPropertyNode;
 
-
 /**
  * the application must call sgUserDataInit() and specify the
  * following values (needed by the model loader callback at draw time)
  * before drawing any scenery.
  */
-void sgUserDataInit( SGModelLib *m, const string &r,
-                     SGPropertyNode *p, double t );
+void sgUserDataInit(SGPropertyNode *p);
 
-
-/**
- * User data for populating leaves when they come in range.
- */
-class sgLeafUserData : public ssgBase
+namespace simgear
 {
-public:
-    bool is_filled_in;
-    ssgLeaf *leaf;
-    SGMaterial *mat;
-    ssgBranch *branch;
-    float sin_lat;
-    float cos_lat;
-    float sin_lon;
-    float cos_lon;
-
-    void setup_triangle( int i );
-};
-
-
 /**
- * User data for populating triangles when they come in range.
+ * Get the property root for the simulation
  */
-class sgTriUserData : public ssgBase
-{
-public:
-    bool is_filled_in;
-    float * p1;
-    float * p2;
-    float * p3;
-    sgVec3 center;
-    double area;
-    SGMatModelGroup * object_group;
-    ssgBranch * branch;
-    sgLeafUserData * leafData;
-    unsigned int seed;
-
-    void fill_in_triangle();
-    void add_object_to_triangle(SGMatModel * object);
-    void makeWorldMatrix (sgMat4 ROT, double hdg_deg );
-};
-
-
-/**
- * ssgEntity with a dummy bounding sphere, to fool culling.
- *
- * This forces the in-range and out-of-range branches to be visited
- * when appropriate, even if they have no children.  It's ugly, but
- * it works and seems fairly efficient (since branches can still
- * be culled when they're out of the view frustum).
- */
-class sgDummyBSphereEntity : public ssgBranch
-{
-public:
-  sgDummyBSphereEntity (float radius)
-  {
-    bsphere.setCenter(0, 0, 0);
-    bsphere.setRadius(radius);
-  }
-  virtual ~sgDummyBSphereEntity () {}
-  virtual void recalcBSphere () { bsphere_is_invalid = false; }
-};
-
+SGPropertyNode* getPropertyRoot();
+}
 
 #endif // _SG_USERDATA_HXX