# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

vegetable_shape.h

Go to the documentation of this file.
00001 
00007 /* Copyright, 2001 Nevrax Ltd.
00008  *
00009  * This file is part of NEVRAX NEL.
00010  * NEVRAX NEL is free software; you can redistribute it and/or modify
00011  * it under the terms of the GNU General Public License as published by
00012  * the Free Software Foundation; either version 2, or (at your option)
00013  * any later version.
00014 
00015  * NEVRAX NEL is distributed in the hope that it will be useful, but
00016  * WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00018  * General Public License for more details.
00019 
00020  * You should have received a copy of the GNU General Public License
00021  * along with NEVRAX NEL; see the file COPYING. If not, write to the
00022  * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
00023  * MA 02111-1307, USA.
00024  */
00025 
00026 #ifndef NL_VEGETABLE_SHAPE_H
00027 #define NL_VEGETABLE_SHAPE_H
00028 
00029 #include "nel/misc/types_nl.h"
00030 #include "3d/vertex_buffer.h"
00031 #include "3d/primitive_block.h"
00032 
00033 
00034 namespace NL3D 
00035 {
00036 
00037 
00038 
00039 // ***************************************************************************
00046 class CVegetableShapeBuild
00047 {
00048 public:
00049 
00054         enum    TBendCenterMode {BendCenterNull=0, BendCenterZ, BendCenterModeCount};
00055 
00062         CVertexBuffer           VB;
00064         CPrimitiveBlock         PB;
00066         bool                            Lighted;
00068         bool                            PreComputeLighting;
00070         bool                            DoubleSided;
00074         bool                            AlphaBlend;
00079         bool                            BestSidedPreComputeLighting;
00081         float                           MaxBendWeight;
00083         TBendCenterMode         BendCenterMode;
00084 
00085 public:
00086         CVegetableShapeBuild()
00087         {
00088                 Lighted= false;
00089                 DoubleSided= false;
00090                 PreComputeLighting= false;
00091                 AlphaBlend= false;
00092                 BestSidedPreComputeLighting= false;
00093                 MaxBendWeight= 0;
00094                 BendCenterMode= BendCenterNull;
00095         }
00096 
00097 };
00098 
00099 
00100 
00101 // ***************************************************************************
00108 class CVegetableShape
00109 {
00110 public:
00111 
00113         CVegetableShape();
00114 
00118         void            build(CVegetableShapeBuild &vbuild);
00119 
00120 
00123         void            loadShape(const std::string &shape);
00124 
00126         // @{
00127 
00129         bool                                    Lighted;
00130         bool                                    DoubleSided;
00131         bool                                    PreComputeLighting;
00132         bool                                    AlphaBlend;
00133         bool                                    BestSidedPreComputeLighting;
00134         CVegetableShapeBuild::TBendCenterMode                   BendCenterMode;
00138         CVertexBuffer                   VB;
00140         std::vector<uint32>             TriangleIndices;
00141         // @}
00142 
00143 
00145         // @{
00147         std::vector<uint32>             InstanceVertices;
00148         // @}
00149 
00150 
00152         void            serial(NLMISC::IStream &f);
00153 
00154 private:
00155 };
00156 
00157 
00158 } // NL3D
00159 
00160 
00161 #endif // NL_VEGETABLE_SHAPE_H
00162 
00163 /* End of vegetable_shape.h */