MSVC++ portability tweaks contributed by Bernie Bright.
Un-nested struct fgFace. Made fgFragment::deleteDisplayList() a non-const member.
This commit is contained in:
parent
7feb472eef
commit
4ce1ff5f2a
1 changed files with 28 additions and 25 deletions
|
@ -56,14 +56,6 @@ FG_USING_STD(vector);
|
||||||
#define MAX_NODES 2000
|
#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;
|
int n1, n2, n3;
|
||||||
|
|
||||||
|
@ -80,6 +72,21 @@ private:
|
||||||
~fgFACE() {}
|
~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:
|
public:
|
||||||
// culling data for this object fragment (fine grain culling)
|
// culling data for this object fragment (fine grain culling)
|
||||||
Point3D center;
|
Point3D center;
|
||||||
|
@ -152,22 +159,13 @@ public:
|
||||||
faces.erase( faces.begin(), faces.end() );
|
faces.erase( faces.begin(), faces.end() );
|
||||||
}
|
}
|
||||||
|
|
||||||
int deleteDisplayList() const {
|
int deleteDisplayList() {
|
||||||
xglDeleteLists( display_list, 1 ); return 0;
|
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 );
|
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
|
inline bool
|
||||||
operator == ( const fgFRAGMENT & lhs, const fgFRAGMENT & rhs ) {
|
operator == ( const fgFRAGMENT & lhs, const fgFRAGMENT & rhs ) {
|
||||||
return lhs.center == rhs.center;
|
return lhs.center == rhs.center;
|
||||||
|
@ -178,6 +176,11 @@ operator == ( const fgFRAGMENT & lhs, const fgFRAGMENT & rhs ) {
|
||||||
|
|
||||||
|
|
||||||
// $Log$
|
// $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
|
// Revision 1.9 1999/03/02 01:03:23 curt
|
||||||
// Tweaks for building with native SGI compilers.
|
// Tweaks for building with native SGI compilers.
|
||||||
//
|
//
|
||||||
|
|
Loading…
Add table
Reference in a new issue