source: obsolete/trunk/UPV/GTGeometry/include/GeoVertexBuffer.h @ 138

Revision 138, 1.3 KB checked in by hidalgo, 20 years ago (diff)

Uploaded WP4 Dummy code(Geometry)

Line 
1#ifndef __GEO_VERTEX_BUFFER__
2#define __GEO_VERTEX_BUFFER__
3
4#include "GeoBase.h"
5#include "GeoVector3.h"
6#include "GeoVector2.h"
7#include "GeoSerializable.h"
8
9
10namespace Geometry {
11
12        /// VertexBuffer interface Class
13        /**
14          * This Structure holds the vertex information used by Meshes and SubMesehs.
15          */
16        class VertexBuffer : public Serializable
17        {
18        public:
19
20                /// Default Constructor
21                inline VertexBuffer():
22                        mVertexInfo(VERTEX_EMPTY),
23                        mVertexCount(0),
24                        mPosition(0),
25                        mNormal(0),
26                        mTexCoords(0)
27                {
28                }
29
30                /// Default destructor, releases allocated memory.
31                ~VertexBuffer();
32
33                /// Returns a new VertexBuffer with the same data.
34                VertexBuffer* Clone() const;
35
36                /// Fills this VertexBuffer from a Serializer
37                void Load(Serializer &s);
38
39                /// Stores data
40                void Save(Serializer &s);
41               
42        unsigned int mVertexInfo;  ///< Type of info stored by vertex
43                size_t  mVertexCount;      ///< Number of vertices
44                Vector3 *mPosition; ///< Position array of each Vertex, only valid if (vertexInfo & VERTEX_POSITON) == true
45                Vector3 *mNormal;   ///< Normal array of each Vertex, only valid if (vertexInfo & VERTEX_NORMAL) == true
46                Vector2 *mTexCoords;///< Texture Coordinates array of each Vertex, only valid if (vertexInfo & VERTEX_TEXCOORDS) == true
47        };
48
49} // end of Geometry namespace;
50
51#endif
Note: See TracBrowser for help on using the repository browser.