From: curt Date: Fri, 30 May 2003 15:27:32 +0000 (+0000) Subject: Clean up a class renaming mistake. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1d8b352d2dca57b6d7c9ce35a86a2106304125ff;p=simgear.git Clean up a class renaming mistake. --- diff --git a/simgear/scene/tgdb/obj.cxx b/simgear/scene/tgdb/obj.cxx index 089c263f..6252e4ea 100644 --- a/simgear/scene/tgdb/obj.cxx +++ b/simgear/scene/tgdb/obj.cxx @@ -192,7 +192,7 @@ bool sgGenTile( const string& path, SGBucket b, static int leaf_in_range_callback (ssgEntity * entity, int mask) { - sgLeafUserData * data = (sgLeafUserData *)entity->getUserData(); + SGLeafUserData * data = (SGLeafUserData *)entity->getUserData(); if (!data->is_filled_in) { // Iterate through all the triangles @@ -222,7 +222,7 @@ leaf_in_range_callback (ssgEntity * entity, int mask) static int leaf_out_of_range_callback (ssgEntity * entity, int mask) { - sgLeafUserData * data = (sgLeafUserData *)entity->getUserData(); + SGLeafUserData * data = (SGLeafUserData *)entity->getUserData(); if (data->is_filled_in) { data->branch->removeAllKids(); data->is_filled_in = false; @@ -287,7 +287,7 @@ gen_random_surface_objects (ssgLeaf *leaf, lod->addKid(in_range); lod->addKid(out_of_range); - sgLeafUserData * data = new sgLeafUserData; + SGLeafUserData * data = new SGLeafUserData; data->is_filled_in = false; data->leaf = leaf; data->mat = mat; @@ -303,7 +303,7 @@ gen_random_surface_objects (ssgLeaf *leaf, out_of_range->setTravCallback(SSG_CALLBACK_PRETRAV, leaf_out_of_range_callback); out_of_range - ->addKid(new sgDummyBSphereEntity(leaf->getBSphere()->getRadius())); + ->addKid(new SGDummyBSphereEntity(leaf->getBSphere()->getRadius())); } diff --git a/simgear/scene/tgdb/userdata.cxx b/simgear/scene/tgdb/userdata.cxx index 9bcf0711..5a174ac8 100644 --- a/simgear/scene/tgdb/userdata.cxx +++ b/simgear/scene/tgdb/userdata.cxx @@ -82,7 +82,7 @@ static void random_pt_inside_tri( float *res, * */ -void sgTriUserData::fill_in_triangle () +void SGTriUserData::fill_in_triangle () { // generate a repeatable random seed sg_srandom(seed); @@ -110,7 +110,7 @@ void sgTriUserData::fill_in_triangle () } } -void sgTriUserData::add_object_to_triangle (SGMatModel * object) +void SGTriUserData::add_object_to_triangle (SGMatModel * object) { // Set up the random heading if required. double hdg_deg = 0; @@ -131,7 +131,7 @@ void sgTriUserData::add_object_to_triangle (SGMatModel * object) branch->addKid(pos); } -void sgTriUserData::makeWorldMatrix (sgMat4 mat, double hdg_deg ) +void SGTriUserData::makeWorldMatrix (sgMat4 mat, double hdg_deg ) { if (hdg_deg == 0) { mat[0][0] = leafData->sin_lat * leafData->cos_lon; @@ -185,7 +185,7 @@ void sgTriUserData::makeWorldMatrix (sgMat4 mat, double hdg_deg ) static int tri_in_range_callback (ssgEntity * entity, int mask) { - sgTriUserData * data = (sgTriUserData *)entity->getUserData(); + SGTriUserData * data = (SGTriUserData *)entity->getUserData(); if (!data->is_filled_in) { data->fill_in_triangle(); data->is_filled_in = true; @@ -209,7 +209,7 @@ tri_in_range_callback (ssgEntity * entity, int mask) static int tri_out_of_range_callback (ssgEntity * entity, int mask) { - sgTriUserData * data = (sgTriUserData *)entity->getUserData(); + SGTriUserData * data = (SGTriUserData *)entity->getUserData(); if (data->is_filled_in) { data->branch->removeAllKids(); data->is_filled_in = false; @@ -243,7 +243,7 @@ get_bounding_radius( sgVec3 center, float *p1, float *p2, float *p3) * */ -void sgLeafUserData::setup_triangle (int i ) +void SGLeafUserData::setup_triangle (int i ) { short n1, n2, n3; leaf->getTriangle(i, &n1, &n2, &n3); @@ -297,7 +297,7 @@ void sgLeafUserData::setup_triangle (int i ) // Set up the user data for if/when // the random objects in this triangle // are filled in. - sgTriUserData * data = new sgTriUserData; + SGTriUserData * data = new SGTriUserData; data->is_filled_in = false; data->p1 = p1; data->p2 = p2; @@ -319,7 +319,7 @@ void sgLeafUserData::setup_triangle (int i ) out_of_range->setUserData(data); out_of_range->setTravCallback(SSG_CALLBACK_PRETRAV, tri_out_of_range_callback); - out_of_range->addKid(new sgDummyBSphereEntity(bounding_radius)); + out_of_range->addKid(new SGDummyBSphereEntity(bounding_radius)); lod->addKid(out_of_range); } } diff --git a/simgear/scene/tgdb/userdata.hxx b/simgear/scene/tgdb/userdata.hxx index 312dbe98..774610a7 100644 --- a/simgear/scene/tgdb/userdata.hxx +++ b/simgear/scene/tgdb/userdata.hxx @@ -52,7 +52,7 @@ void sgUserDataInit( SGModelLib *m, const string &r, /** * User data for populating leaves when they come in range. */ -class sgLeafUserData : public ssgBase +class SGLeafUserData : public ssgBase { public: bool is_filled_in; @@ -71,7 +71,7 @@ public: /** * User data for populating triangles when they come in range. */ -class sgTriUserData : public ssgBase +class SGTriUserData : public ssgBase { public: bool is_filled_in; @@ -82,7 +82,7 @@ public: double area; SGMatModelGroup * object_group; ssgBranch * branch; - sgLeafUserData * leafData; + SGLeafUserData * leafData; unsigned int seed; void fill_in_triangle(); @@ -99,15 +99,15 @@ public: * it works and seems fairly efficient (since branches can still * be culled when they're out of the view frustum). */ -class sgDummyBSphereEntity : public ssgBranch +class SGDummyBSphereEntity : public ssgBranch { public: - sgDummyBSphereEntity (float radius) + SGDummyBSphereEntity (float radius) { bsphere.setCenter(0, 0, 0); bsphere.setRadius(radius); } - virtual ~sgDummyBSphereEntity () {} + virtual ~SGDummyBSphereEntity () {} virtual void recalcBSphere () { bsphere_is_invalid = false; } };