Changeset 13041 for OpenSceneGraph/trunk/src/osgPlugins/ply/typedefs.h
- Timestamp:
- 03/21/12 18:36:20 (14 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osgPlugins/ply/typedefs.h
r12292 r13041 1 /* 1 /* 2 2 typedefs.h 3 3 Copyright (c) 2007, Tobias Wolf <twolf@access.unizh.ch> 4 All rights reserved. 5 4 All rights reserved. 5 6 6 Type definitions for the mesh classes. 7 7 */ … … 49 49 #include <string> 50 50 51 namespace ply 51 namespace ply 52 52 { 53 54 53 54 55 55 56 56 typedef size_t Index; 57 57 // typedef unsigned short ShortIndex; 58 59 58 59 60 60 // mesh exception 61 61 struct MeshException : public std::exception … … 67 67 std::string _message; 68 68 }; 69 69 70 70 // null output stream that discards everything written to it 71 71 struct NullOStream : std::ostream … … 75 75 int overflow( int c ) { return traits_type::not_eof( c ); } 76 76 } _nullBuf; 77 77 78 78 NullOStream() : std::ios( &_nullBuf ), std::ostream( &_nullBuf ) {} 79 79 }; 80 80 81 81 // wrapper to enable array use where arrays would not be allowed otherwise 82 82 template< class T, size_t d > … … 88 88 return data[i]; 89 89 } 90 90 91 91 const T& operator[]( const size_t i ) const 92 92 { … … 94 94 return data[i]; 95 95 } 96 96 97 97 private: 98 98 T data[d]; 99 99 }; 100 101 100 101 102 102 // binary mesh file version, increment if changing the file format 103 103 const unsigned short FILE_VERSION ( 0x0114 ); 104 105 104 105 106 106 // enumeration for the sort axis 107 107 enum Axis
