1
0
Fork 0

MSVC++ portability tweaks contributed by Bernie Bright.

Un-nested struct fgFace.
  Made fgFragment::deleteDisplayList() a non-const member.
This commit is contained in:
curt 1999-03-15 17:59:12 +00:00
parent 7feb472eef
commit 4ce1ff5f2a

View file

@ -56,15 +56,7 @@ FG_USING_STD(vector);
#define MAX_NODES 2000
// Forward declarations
class fgTILE;
class fgMATERIAL;
// Object fragment data class
class fgFRAGMENT {
private:
struct fgFACE {
struct fgFACE {
int n1, n2, n3;
fgFACE( int a = 0, int b =0, int c =0 )
@ -78,7 +70,22 @@ private:
}
~fgFACE() {}
};
};
inline bool
operator== ( const fgFACE& lhs, const fgFACE& rhs )
{
return (lhs.n1 == rhs.n1) && (lhs.n2 == rhs.n2) && (lhs.n3 == rhs.n3);
}
// Forward declarations
class fgTILE;
class fgMATERIAL;
// Object fragment data class
class fgFRAGMENT {
private:
public:
// culling data for this object fragment (fine grain culling)
@ -152,22 +159,13 @@ public:
faces.erase( faces.begin(), faces.end() );
}
int deleteDisplayList() const {
int deleteDisplayList() {
xglDeleteLists( display_list, 1 ); return 0;
}
friend bool operator== ( const fgFRAGMENT::fgFACE & lhs,
const fgFRAGMENT::fgFACE & rhs );
friend bool operator== ( const fgFRAGMENT & lhs, const fgFRAGMENT & rhs );
};
inline bool
operator== ( const fgFRAGMENT::fgFACE& lhs,
const fgFRAGMENT::fgFACE& rhs )
{
return (lhs.n1 == rhs.n1) && (lhs.n2 == rhs.n2) && (lhs.n3 == rhs.n3);
}
inline bool
operator == ( const fgFRAGMENT & lhs, const fgFRAGMENT & rhs ) {
return lhs.center == rhs.center;
@ -178,6 +176,11 @@ operator == ( const fgFRAGMENT & lhs, const fgFRAGMENT & rhs ) {
// $Log$
// Revision 1.10 1999/03/15 17:59:12 curt
// MSVC++ portability tweaks contributed by Bernie Bright.
// Un-nested struct fgFace.
// Made fgFragment::deleteDisplayList() a non-const member.
//
// Revision 1.9 1999/03/02 01:03:23 curt
// Tweaks for building with native SGI compilers.
//