Revision 1526,
1.2 KB
checked in by gumbau, 18 years ago
(diff) |
Updated modules to the new interface and the new simplification algorithm improvements.
|
Rev | Line | |
---|
[831] | 1 | #ifndef __VERTEXDATA_H__
|
---|
| 2 | #define __VERTEXDATA_H__
|
---|
| 3 |
|
---|
| 4 | namespace Geometry
|
---|
| 5 | {
|
---|
| 6 | class IndexData
|
---|
| 7 | {
|
---|
| 8 | private:
|
---|
| 9 | public:
|
---|
[1526] | 10 | IndexData(void){}
|
---|
[831] | 11 | virtual ~IndexData(void){}
|
---|
| 12 |
|
---|
[1526] | 13 | virtual void Begin(unsigned int submesh, unsigned int numinds)=0;
|
---|
[831] | 14 | virtual void SetIndex(unsigned int i, unsigned int index)=0;
|
---|
| 15 | virtual void End(void)=0;
|
---|
| 16 |
|
---|
[1526] | 17 | virtual void BorrowIndexData(const IndexData *)=0; // tells the application to use this IndexData. If the app must use its own IndexData the param will be NULL
|
---|
[831] | 18 | };
|
---|
| 19 |
|
---|
| 20 |
|
---|
[1526] | 21 | /* typedef IndexData* CreateIndexDataFunc(unsigned int numi);
|
---|
[831] | 22 | typedef CreateIndexDataFunc* CREATEINDEXDATAFUNC;
|
---|
| 23 |
|
---|
| 24 | class DefaultIndexData : public IndexData
|
---|
| 25 | {
|
---|
| 26 | private:
|
---|
| 27 | unsigned int *indices;
|
---|
| 28 | public:
|
---|
[1526] | 29 | DefaultIndexData(void){ indices=0; }
|
---|
[831] | 30 | ~DefaultIndexData(void);
|
---|
| 31 |
|
---|
[1526] | 32 | virtual void Init(unsigned int);
|
---|
| 33 | virtual void Begin(unsigned int submesh, unsigned int numinds){}
|
---|
[831] | 34 | virtual void SetIndex(unsigned int i, unsigned int index){
|
---|
| 35 | indices[i] = index;
|
---|
| 36 | }
|
---|
| 37 | virtual void End(void){}
|
---|
| 38 |
|
---|
| 39 | virtual unsigned int GetIndex(unsigned int i) const {
|
---|
| 40 | return indices[i];
|
---|
| 41 | }
|
---|
[1526] | 42 | virtual void BorrowIndexData(const IndexData *){}
|
---|
[831] | 43 | };
|
---|
[1526] | 44 | IndexData *DefaultIndexDataCreator(unsigned int numi);*/
|
---|
[831] | 45 | }
|
---|
| 46 |
|
---|
| 47 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.