Clean up a class renaming mistake.

This commit is contained in:
curt
2003-05-30 15:27:32 +00:00
parent c8432e3763
commit 1d8b352d2d
3 changed files with 18 additions and 18 deletions
+4 -4
View File
@@ -192,7 +192,7 @@ bool sgGenTile( const string& path, SGBucket b,
static int static int
leaf_in_range_callback (ssgEntity * entity, int mask) leaf_in_range_callback (ssgEntity * entity, int mask)
{ {
sgLeafUserData * data = (sgLeafUserData *)entity->getUserData(); SGLeafUserData * data = (SGLeafUserData *)entity->getUserData();
if (!data->is_filled_in) { if (!data->is_filled_in) {
// Iterate through all the triangles // Iterate through all the triangles
@@ -222,7 +222,7 @@ leaf_in_range_callback (ssgEntity * entity, int mask)
static int static int
leaf_out_of_range_callback (ssgEntity * entity, int mask) leaf_out_of_range_callback (ssgEntity * entity, int mask)
{ {
sgLeafUserData * data = (sgLeafUserData *)entity->getUserData(); SGLeafUserData * data = (SGLeafUserData *)entity->getUserData();
if (data->is_filled_in) { if (data->is_filled_in) {
data->branch->removeAllKids(); data->branch->removeAllKids();
data->is_filled_in = false; data->is_filled_in = false;
@@ -287,7 +287,7 @@ gen_random_surface_objects (ssgLeaf *leaf,
lod->addKid(in_range); lod->addKid(in_range);
lod->addKid(out_of_range); lod->addKid(out_of_range);
sgLeafUserData * data = new sgLeafUserData; SGLeafUserData * data = new SGLeafUserData;
data->is_filled_in = false; data->is_filled_in = false;
data->leaf = leaf; data->leaf = leaf;
data->mat = mat; data->mat = mat;
@@ -303,7 +303,7 @@ gen_random_surface_objects (ssgLeaf *leaf,
out_of_range->setTravCallback(SSG_CALLBACK_PRETRAV, out_of_range->setTravCallback(SSG_CALLBACK_PRETRAV,
leaf_out_of_range_callback); leaf_out_of_range_callback);
out_of_range out_of_range
->addKid(new sgDummyBSphereEntity(leaf->getBSphere()->getRadius())); ->addKid(new SGDummyBSphereEntity(leaf->getBSphere()->getRadius()));
} }
+8 -8
View File
@@ -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 // generate a repeatable random seed
sg_srandom(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. // Set up the random heading if required.
double hdg_deg = 0; double hdg_deg = 0;
@@ -131,7 +131,7 @@ void sgTriUserData::add_object_to_triangle (SGMatModel * object)
branch->addKid(pos); branch->addKid(pos);
} }
void sgTriUserData::makeWorldMatrix (sgMat4 mat, double hdg_deg ) void SGTriUserData::makeWorldMatrix (sgMat4 mat, double hdg_deg )
{ {
if (hdg_deg == 0) { if (hdg_deg == 0) {
mat[0][0] = leafData->sin_lat * leafData->cos_lon; mat[0][0] = leafData->sin_lat * leafData->cos_lon;
@@ -185,7 +185,7 @@ void sgTriUserData::makeWorldMatrix (sgMat4 mat, double hdg_deg )
static int static int
tri_in_range_callback (ssgEntity * entity, int mask) tri_in_range_callback (ssgEntity * entity, int mask)
{ {
sgTriUserData * data = (sgTriUserData *)entity->getUserData(); SGTriUserData * data = (SGTriUserData *)entity->getUserData();
if (!data->is_filled_in) { if (!data->is_filled_in) {
data->fill_in_triangle(); data->fill_in_triangle();
data->is_filled_in = true; data->is_filled_in = true;
@@ -209,7 +209,7 @@ tri_in_range_callback (ssgEntity * entity, int mask)
static int static int
tri_out_of_range_callback (ssgEntity * entity, int mask) tri_out_of_range_callback (ssgEntity * entity, int mask)
{ {
sgTriUserData * data = (sgTriUserData *)entity->getUserData(); SGTriUserData * data = (SGTriUserData *)entity->getUserData();
if (data->is_filled_in) { if (data->is_filled_in) {
data->branch->removeAllKids(); data->branch->removeAllKids();
data->is_filled_in = false; 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; short n1, n2, n3;
leaf->getTriangle(i, &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 // Set up the user data for if/when
// the random objects in this triangle // the random objects in this triangle
// are filled in. // are filled in.
sgTriUserData * data = new sgTriUserData; SGTriUserData * data = new SGTriUserData;
data->is_filled_in = false; data->is_filled_in = false;
data->p1 = p1; data->p1 = p1;
data->p2 = p2; data->p2 = p2;
@@ -319,7 +319,7 @@ void sgLeafUserData::setup_triangle (int i )
out_of_range->setUserData(data); out_of_range->setUserData(data);
out_of_range->setTravCallback(SSG_CALLBACK_PRETRAV, out_of_range->setTravCallback(SSG_CALLBACK_PRETRAV,
tri_out_of_range_callback); 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); lod->addKid(out_of_range);
} }
} }
+6 -6
View File
@@ -52,7 +52,7 @@ void sgUserDataInit( SGModelLib *m, const string &r,
/** /**
* User data for populating leaves when they come in range. * User data for populating leaves when they come in range.
*/ */
class sgLeafUserData : public ssgBase class SGLeafUserData : public ssgBase
{ {
public: public:
bool is_filled_in; bool is_filled_in;
@@ -71,7 +71,7 @@ public:
/** /**
* User data for populating triangles when they come in range. * User data for populating triangles when they come in range.
*/ */
class sgTriUserData : public ssgBase class SGTriUserData : public ssgBase
{ {
public: public:
bool is_filled_in; bool is_filled_in;
@@ -82,7 +82,7 @@ public:
double area; double area;
SGMatModelGroup * object_group; SGMatModelGroup * object_group;
ssgBranch * branch; ssgBranch * branch;
sgLeafUserData * leafData; SGLeafUserData * leafData;
unsigned int seed; unsigned int seed;
void fill_in_triangle(); void fill_in_triangle();
@@ -99,15 +99,15 @@ public:
* it works and seems fairly efficient (since branches can still * it works and seems fairly efficient (since branches can still
* be culled when they're out of the view frustum). * be culled when they're out of the view frustum).
*/ */
class sgDummyBSphereEntity : public ssgBranch class SGDummyBSphereEntity : public ssgBranch
{ {
public: public:
sgDummyBSphereEntity (float radius) SGDummyBSphereEntity (float radius)
{ {
bsphere.setCenter(0, 0, 0); bsphere.setCenter(0, 0, 0);
bsphere.setRadius(radius); bsphere.setRadius(radius);
} }
virtual ~sgDummyBSphereEntity () {} virtual ~SGDummyBSphereEntity () {}
virtual void recalcBSphere () { bsphere_is_invalid = false; } virtual void recalcBSphere () { bsphere_is_invalid = false; }
}; };