mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-17 12:12:10 -04:00
*** empty log message ***
This commit is contained in:
parent
62f1fc0882
commit
1883b289f5
@ -23,7 +23,9 @@
|
||||
eggMaterialCollection.I eggMaterialCollection.cxx \
|
||||
eggMaterialCollection.h \
|
||||
eggMiscFuncs.I \
|
||||
eggMiscFuncs.cxx eggMiscFuncs.h eggNamedObject.I eggNamedObject.cxx \
|
||||
eggMiscFuncs.cxx eggMiscFuncs.h \
|
||||
eggMorph.I eggMorph.h eggMorphList.I eggMorphList.h \
|
||||
eggNamedObject.I eggNamedObject.cxx \
|
||||
eggNamedObject.h eggNameUniquifier.cxx eggNameUniquifier.h \
|
||||
eggNode.I eggNode.cxx eggNode.h eggNurbsCurve.I \
|
||||
eggNurbsCurve.cxx eggNurbsCurve.h eggNurbsSurface.I \
|
||||
|
@ -53,11 +53,6 @@ INLINE ostream &operator << (ostream &out, const EggMorphColor &m);
|
||||
// operator again.
|
||||
//INLINE ostream &operator << (ostream &out, const EggMorphNormal &m);
|
||||
|
||||
typedef set<EggMorphVertex> EggMorphVertices;
|
||||
typedef set<EggMorphNormal> EggMorphNormals;
|
||||
typedef set<EggMorphTexCoord> EggMorphTexCoords;
|
||||
typedef set<EggMorphColor> EggMorphColors;
|
||||
|
||||
#include "eggMorph.I"
|
||||
|
||||
#endif
|
||||
|
@ -5,6 +5,37 @@
|
||||
|
||||
#include <indent.h>
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: EggMorphList::insert
|
||||
// Access: Public
|
||||
// Description: This is similar to the insert() interface for sets,
|
||||
// except it does not guarantee that the resulting list
|
||||
// is sorted.
|
||||
//
|
||||
// We have this member function so the EggMorphList
|
||||
// resembles a set. It used to *be* a set, but we
|
||||
// cannot export STL sets from a Windows DLL.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
template<class MorphType>
|
||||
pair<EggMorphList<MorphType>::iterator, bool> EggMorphList<MorphType>::
|
||||
insert(const MorphType &value) {
|
||||
pair<iterator, bool> result;
|
||||
iterator i;
|
||||
for (i = begin(); i != end(); ++i) {
|
||||
if ((*i) == value) {
|
||||
// This value is already present.
|
||||
result.first = i;
|
||||
result.second = false;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
// This value is not already present; add it to the list.
|
||||
push_back(value);
|
||||
result.first = begin() + size() - 1;
|
||||
result.second = true;
|
||||
return result;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: EggMorphList::write
|
||||
|
@ -10,18 +10,30 @@
|
||||
|
||||
#include "eggMorph.h"
|
||||
|
||||
#include <set>
|
||||
#include <vector>
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Class : EggMorphList
|
||||
// Description : A collection of <Dxyz>'s or <Duv>'s or some such.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
template<class MorphType>
|
||||
class EggMorphList : public set<MorphType> {
|
||||
class EggMorphList : public vector<MorphType> {
|
||||
public:
|
||||
pair<iterator, bool> insert(const MorphType &value);
|
||||
void write(ostream &out, int indent_level) const;
|
||||
};
|
||||
|
||||
|
||||
EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, std::vector<EggMorphVertex>)
|
||||
EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, std::vector<EggMorphNormal>)
|
||||
EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, std::vector<EggMorphTexCoord>)
|
||||
EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, std::vector<EggMorphColor>)
|
||||
|
||||
EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, EggMorphList<EggMorphVertex>)
|
||||
EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, EggMorphList<EggMorphNormal>)
|
||||
EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, EggMorphList<EggMorphTexCoord>)
|
||||
EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, EggMorphList<EggMorphColor>)
|
||||
|
||||
typedef EggMorphList<EggMorphVertex> EggMorphVertexList;
|
||||
typedef EggMorphList<EggMorphNormal> EggMorphNormalList;
|
||||
typedef EggMorphList<EggMorphTexCoord> EggMorphTexCoordList;
|
||||
|
Loading…
x
Reference in New Issue
Block a user