Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | Related Pages

renderprimitive.h

Go to the documentation of this file.
00001 /***************************************************************************
00002               renderprimitive.h  -  Render primitive batch data
00003                              -------------------
00004     begin                : Mon Sep 16 2002
00005     copyright            : (C) 2002 by Reality Rift Studios
00006     email                : mattias@realityrift.com
00007  ***************************************************************************
00008 
00009  The contents of this file are subject to the Mozilla Public License Version
00010  1.1 (the "License"); you may not use this file except in compliance with
00011  the License. You may obtain a copy of the License at 
00012  http://www.mozilla.org/MPL/
00013 
00014  Software distributed under the License is distributed on an "AS IS" basis,
00015  WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00016  for the specific language governing rights and limitations under the
00017  License.
00018 
00019  The Original Code is the NeoEngine, renderprimitive.h
00020 
00021  The Initial Developer of the Original Code is Mattias Jansson.
00022  Portions created by Mattias Jansson are Copyright (C) 2002
00023  Reality Rift Studios. All Rights Reserved.
00024 
00025  ***************************************************************************/
00026 
00027 
00028 #ifndef __NERENDERPRIMITIVE_H
00029 #define __NERENDERPRIMITIVE_H
00030 
00031 
00032 #include "base.h"
00033 #include "nemath.h"
00034 #include "material.h"
00035 #include "vertexbuffer.h"
00036 #include "polygonbuffer.h"
00037 
00038 
00039 
00045 namespace NeoEngine
00046 {
00047 
00048 
00055 class NEOENGINE_API RenderPrimitive
00056 {
00057     public:
00058 
00063         enum RENDERPRIMITIVETYPE
00064         {
00065           INVALID                                     = 0x00,
00066             
00067           LINES                                       = 0x02,
00068           TRIANGLES                                   = 0x03,   //Will NOT use triangle strip if present in polygon buffer
00069           LINESTRIP                                   = 0x04,
00070           TRIANGLESTRIP                               = 0x05,   //Will NOT use triangle strip if present in polygon buffer, must use render primitive member ptr variable
00071           //TRIANGLEFAN                               = 0x06,   //NOT IMPLEMENTED
00072           POINTS                                      = 0x07
00073         };
00074 
00079         enum RENDERPRIMITIVEFLAG
00080         {
00081           NOFLAGS                                     = 0x0000,
00082           
00084           NOTRANSLATION                               = 0x0002 
00085         };
00086 
00087 
00088     public:
00089 
00091         RENDERPRIMITIVETYPE                           m_ePrimitive;
00092 
00094         Matrix                                        m_kModelMatrix;
00095 
00097         Matrix                                        m_kInvModelMatrix;
00098 
00100         VertexBufferPtr                               m_pkVertexBuffer;
00101 
00103         PolygonBufferPtr                              m_pkPolygonBuffer;
00104 
00106         PolygonStripBufferPtr                         m_pkPolygonStripBuffer;
00107 
00109         unsigned int                                  m_uiNumPrimitives;
00110 
00112         MaterialPtr                                   m_pkMaterial;
00113 
00115         float                                         m_fSize;
00116 
00118         union
00119         {
00120           void                                       *m_pData;
00121           int                                         m_iData;
00122           float                                       m_fData;
00123         } m_aUnknown[7];
00124 };
00125 
00126 
00127 }; // namespace NeoEngine
00128 
00129 
00130 #endif  // __NERENDERPRIMITIVE_H

Generated on Wed Jan 21 14:21:07 2004 for NeoEngine by doxygen 1.3.5