making appropriate functions inline and non-inline

This commit is contained in:
David Rose 2001-05-25 04:01:34 +00:00
parent 92558bca76
commit 7c2bbf7f7d
6 changed files with 90 additions and 65 deletions

View File

@ -621,3 +621,48 @@ get_lod() const {
}
////////////////////////////////////////////////////////////////////
// Function: EggGroup::vref_begin
// Access: Public
// Description: Returns an iterator that can, in conjunction with
// vref_end(), be used to traverse the entire set of
// referenced vertices. Each iterator returns a
// pair<PT(EggVertex), double>.
//
// This interface is not safe to use outside of
// PANDAEGG.DLL.
////////////////////////////////////////////////////////////////////
INLINE EggGroup::VertexRef::const_iterator EggGroup::
vref_begin() const {
return _vref.begin();
}
////////////////////////////////////////////////////////////////////
// Function: EggGroup::vref_end
// Access: Public
// Description: Returns an iterator that can, in conjunction with
// vref_begin(), be used to traverse the entire set of
// referenced vertices. Each iterator returns a
// pair<PT(EggVertex), double>.
//
// This interface is not safe to use outside of
// PANDAEGG.DLL.
////////////////////////////////////////////////////////////////////
INLINE EggGroup::VertexRef::const_iterator EggGroup::
vref_end() const {
return _vref.end();
}
////////////////////////////////////////////////////////////////////
// Function: EggGrop::vref_size
// Access: Public
// Description: Returns the number of elements between vref_begin()
// and vref_end().
//
// This interface is not safe to use outside of
// PANDAEGG.DLL.
////////////////////////////////////////////////////////////////////
INLINE EggGroup::VertexRef::size_type EggGroup::
vref_size() const {
return _vref.size();
}

View File

@ -451,43 +451,6 @@ get_vertex_membership(const EggVertex *vert) const {
}
}
////////////////////////////////////////////////////////////////////
// Function: EggGroup::vref_begin
// Access: Public
// Description: Returns an iterator that can, in conjunction with
// vref_end(), be used to traverse the entire set of
// referenced vertices. Each iterator returns a
// pair<PT(EggVertex), double>.
////////////////////////////////////////////////////////////////////
EggGroup::VertexRef::const_iterator EggGroup::
vref_begin() const {
return _vref.begin();
}
////////////////////////////////////////////////////////////////////
// Function: EggGroup::vref_end
// Access: Public
// Description: Returns an iterator that can, in conjunction with
// vref_begin(), be used to traverse the entire set of
// referenced vertices. Each iterator returns a
// pair<PT(EggVertex), double>.
////////////////////////////////////////////////////////////////////
EggGroup::VertexRef::const_iterator EggGroup::
vref_end() const {
return _vref.end();
}
////////////////////////////////////////////////////////////////////
// Function: EggGrop::vref_size
// Access: Public
// Description: Returns the number of elements between vref_begin()
// and vref_end().
////////////////////////////////////////////////////////////////////
EggGroup::VertexRef::size_type EggGroup::
vref_size() const {
return _vref.size();
}
#ifndef NDEBUG

View File

@ -167,9 +167,9 @@ public:
void unref_all_vertices();
double get_vertex_membership(const EggVertex *vert) const;
VertexRef::const_iterator vref_begin() const;
VertexRef::const_iterator vref_end() const;
VertexRef::size_type vref_size() const;
INLINE VertexRef::const_iterator vref_begin() const;
INLINE VertexRef::const_iterator vref_end() const;
INLINE VertexRef::size_type vref_size() const;
#ifndef NDEBUG
void test_vref_integrity() const;

View File

@ -170,6 +170,9 @@ get_index() const {
// gref_end(), be used to traverse the entire set of
// groups that reference this vertex. Each iterator
// returns a pointer to a group.
//
// This interface is not safe to use outside of
// PANDAEGG.DLL.
////////////////////////////////////////////////////////////////////
INLINE EggVertex::GroupRef::const_iterator EggVertex::
gref_begin() const {
@ -183,6 +186,9 @@ gref_begin() const {
// gref_begin(), be used to traverse the entire set of
// groups that reference this vertex. Each iterator
// returns a pointer to a group.
//
// This interface is not safe to use outside of
// PANDAEGG.DLL.
////////////////////////////////////////////////////////////////////
INLINE EggVertex::GroupRef::const_iterator EggVertex::
gref_end() const {
@ -194,6 +200,9 @@ gref_end() const {
// Access: Public
// Description: Returns the number of elements between gref_begin()
// and gref_end().
//
// This interface is not safe to use outside of
// PANDAEGG.DLL.
////////////////////////////////////////////////////////////////////
INLINE EggVertex::GroupRef::size_type EggVertex::
gref_size() const {
@ -201,17 +210,6 @@ gref_size() const {
}
////////////////////////////////////////////////////////////////////
// Function: EggVertex::has_gref
// Access: Public
// Description: Returns true if the indicated group references this
// vertex, false otherwise.
////////////////////////////////////////////////////////////////////
INLINE bool EggVertex::
has_gref(const EggGroup *group) const {
return _gref.count((EggGroup *)group) != 0;
}
////////////////////////////////////////////////////////////////////
// Function: EggVertex::pref_begin
// Access: Public
@ -219,6 +217,9 @@ has_gref(const EggGroup *group) const {
// pref_end(), be used to traverse the entire set of
// primitives that reference this vertex. Each iterator
// returns a pointer to a primitive.
//
// This interface is not safe to use outside of
// PANDAEGG.DLL.
////////////////////////////////////////////////////////////////////
INLINE EggVertex::PrimitiveRef::const_iterator EggVertex::
pref_begin() const {
@ -232,6 +233,9 @@ pref_begin() const {
// pref_begin(), be used to traverse the entire set of
// primitives that reference this vertex. Each iterator
// returns a pointer to a primitive.
//
// This interface is not safe to use outside of
// PANDAEGG.DLL.
////////////////////////////////////////////////////////////////////
INLINE EggVertex::PrimitiveRef::const_iterator EggVertex::
pref_end() const {
@ -243,6 +247,9 @@ pref_end() const {
// Access: Public
// Description: Returns the number of elements between pref_begin()
// and pref_end().
//
// This interface is not safe to use outside of
// PANDAEGG.DLL.
////////////////////////////////////////////////////////////////////
INLINE EggVertex::GroupRef::size_type EggVertex::
pref_size() const {
@ -250,18 +257,6 @@ pref_size() const {
}
////////////////////////////////////////////////////////////////////
// Function: EggVertex::has_pref
// Access: Public
// Description: Returns the number of times the vertex appears in the
// indicated primitive, or 0 if it does not appear.
////////////////////////////////////////////////////////////////////
INLINE int EggVertex::
has_pref(const EggPrimitive *prim) const {
return _pref.count((EggPrimitive *)prim);
}
////////////////////////////////////////////////////////////////////

View File

@ -275,6 +275,17 @@ transform(const LMatrix4d &mat) {
}
////////////////////////////////////////////////////////////////////
// Function: EggVertex::has_gref
// Access: Public
// Description: Returns true if the indicated group references this
// vertex, false otherwise.
////////////////////////////////////////////////////////////////////
bool EggVertex::
has_gref(const EggGroup *group) const {
return _gref.count((EggGroup *)group) != 0;
}
////////////////////////////////////////////////////////////////////
// Function: EggVertex::copy_grefs_from
// Access: Public
@ -329,6 +340,17 @@ clear_grefs() {
nassertv(_gref.empty());
}
////////////////////////////////////////////////////////////////////
// Function: EggVertex::has_pref
// Access: Public
// Description: Returns the number of times the vertex appears in the
// indicated primitive, or 0 if it does not appear.
////////////////////////////////////////////////////////////////////
int EggVertex::
has_pref(const EggPrimitive *prim) const {
return _pref.count((EggPrimitive *)prim);
}
#ifndef NDEBUG
////////////////////////////////////////////////////////////////////

View File

@ -71,7 +71,7 @@ public:
INLINE GroupRef::const_iterator gref_begin() const;
INLINE GroupRef::const_iterator gref_end() const;
INLINE GroupRef::size_type gref_size() const;
INLINE bool has_gref(const EggGroup *group) const;
bool has_gref(const EggGroup *group) const;
void copy_grefs_from(const EggVertex &other);
void clear_grefs();
@ -79,7 +79,7 @@ public:
INLINE PrimitiveRef::const_iterator pref_begin() const;
INLINE PrimitiveRef::const_iterator pref_end() const;
INLINE PrimitiveRef::size_type pref_size() const;
INLINE int has_pref(const EggPrimitive *prim) const;
int has_pref(const EggPrimitive *prim) const;
#ifndef NDEBUG
void test_gref_integrity() const;