X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FScenery%2Ftileentry.hxx;h=e315d515071cb97c50b0bb5b029ffddce5fe3827;hb=048da049f87fe3f543795f3b1b511d774caa2787;hp=5199f8f924847c837ba685e9569bb7104a42d02d;hpb=34854ab2afaeca05e6949755b8d65e991c77675f;p=flightgear.git diff --git a/src/Scenery/tileentry.hxx b/src/Scenery/tileentry.hxx index 5199f8f92..e315d5150 100644 --- a/src/Scenery/tileentry.hxx +++ b/src/Scenery/tileentry.hxx @@ -49,6 +49,7 @@ #include #include +#include #if defined( sgi ) #include @@ -103,6 +104,8 @@ class FGTileEntry { public: + /* CLO123 FROM HERE TO THE CORRESPONDING MARKER ARE THINGS THAT + CAN BE DELETED AFTER WE DROP THE ASCII SCENERY FORMAT */ typedef vector < sgVec3 * > free_vec3_list; typedef vector < sgVec2 * > free_vec2_list; typedef vector < unsigned short * > free_index_list; @@ -110,6 +113,7 @@ public: // node list point_list nodes; int ncount; + /* CLO123 MARKER */ // global tile culling data Point3D center; @@ -140,15 +144,29 @@ private: // pointer to ssg transform for this tile ssgTransform *terra_transform; - ssgTransform *lights_transform; + ssgTransform *rwy_lights_transform; + ssgTransform *gnd_lights_transform; // pointer to ssg range selector for this tile ssgRangeSelector *terra_range; - ssgRangeSelector *lights_range; + ssgRangeSelector *rwy_lights_range; + ssgRangeSelector *gnd_lights_range; // we create several preset brightness and can choose which one we // want based on lighting conditions. - ssgSelector *lights_brightness; + ssgSelector *gnd_lights_brightness; + + // ADA ---> + // Runway centre coords. + Point3D rway_center; // Reqd. for switching as function of distance from runway center + //pointers for Runway lights + ssgTransform *lightmaps_transform; // branch for runway lights + ssgRangeSelector *lightmaps_range; // tried to maintain same structure as Curt's ground + ssgSelector *lightmaps_brightness; // selector node for points/ lightmaps + + ssgSimpleState *lightmap_state; // OpenGL state of the polygons that make up runway lights + ssgVertexArray *light_points; // array of runway light coords. + // <--- ADA /** * Indicates this tile has been loaded from a file and connected @@ -164,21 +182,34 @@ private: */ volatile int pending_models; - ssgBranch* obj_load( const std::string& path, - ssgVertexArray* lights, bool is_base ); + bool obj_load( const std::string& path, + ssgBranch* geometry, + ssgBranch* rwy_lights, + ssgVertexArray* gound_lights, + bool is_base ); ssgLeaf* gen_lights( ssgVertexArray *lights, int inc, float bright ); + double timestamp; + public: + // ADA ---> + ssgTransform *ols_transform; // transform node for flols simulation + ssgSelector *lightmaps_sequence; // selector node for points/ lightmaps + ssgBranch* gen_runway_lights(ssgVertexArray *points,ssgVertexArray *normal, ssgVertexArray *dir, int *type); + // <--- ADA + // Constructor FGTileEntry( const SGBucket& b ); // Destructor ~FGTileEntry(); +#ifdef WISH_PLIB_WAS_THREADED // but it isn't // Schedule tile to be freed/removed void sched_removal(); +#endif // Clean up the memory used by this tile and delete the arrays // used by ssg as well as the whole ssg branch @@ -195,7 +226,7 @@ public: // Update the ssg transform node for this tile so it can be // properly drawn relative to our (0,0,0) point - void prep_ssg_node( const Point3D& p, float vis); + void prep_ssg_node( const Point3D& p, sgVec3 up, float vis); /** * Load tile data from a file. @@ -228,13 +259,26 @@ public: /** * Add terrain mesh and ground lighting to scene graph. */ - void add_ssg_nodes( ssgBranch* terrain, ssgBranch* ground ); + void add_ssg_nodes( ssgBranch* terrain_branch, + ssgBranch* gnd_lights_branch, + ssgBranch* rwy_lights_branch ); /** * disconnect terrain mesh and ground lighting nodes from scene * graph for this tile. */ void disconnect_ssg_nodes(); + + + /** + * return the SSG Transform node for the terrain + */ + inline ssgTransform *get_terra_transform() { return terra_transform; } + + void set_timestamp(double time_ms) { timestamp = time_ms; } + + inline double get_timestamp() const { return timestamp; } + };