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

OSGGeoFunctions.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002  *                                OpenSG                                     *
00003  *                                                                           *
00004  *                                                                           *
00005  *             Copyright (C) 2000-2002 by the OpenSG Forum                   *
00006  *                                                                           *
00007  *   contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de          *
00008  *                                                                           *
00009 \*---------------------------------------------------------------------------*/
00010 /*---------------------------------------------------------------------------*\
00011  *                                License                                    *
00012  *                                                                           *
00013  * This library is free software; you can redistribute it and/or modify it   *
00014  * under the terms of the GNU Library General Public License as published    *
00015  * by the Free Software Foundation, version 2.                               *
00016  *                                                                           *
00017  * This library is distributed in the hope that it will be useful, but       *
00018  * WITHOUT ANY WARRANTY; without even the implied warranty of                *
00019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         *
00020  * Library General Public License for more details.                          *
00021  *                                                                           *
00022  * You should have received a copy of the GNU Library General Public         *
00023  * License along with this library; if not, write to the Free Software       *
00024  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                 *
00025  *                                                                           *
00026 \*---------------------------------------------------------------------------*/
00027 /*---------------------------------------------------------------------------*\
00028  *                                Changes                                    *
00029  *                                                                           *
00030  *                                                                           *
00031  *                                                                           *
00032  *                                                                           *
00033  *                                                                           *
00034  *                                                                           *
00035 \*---------------------------------------------------------------------------*/
00036 #ifndef _OSGGEOFUNCTIONS_H_
00037 #define _OSGGEOFUNCTIONS_H_
00038 #ifdef __sgi
00039 #pragma once
00040 #endif
00041 #include <OSGConfig.h>
00042 #include <OSGGeometry.h>
00043 #include <OSGSystemDef.h>
00044 #include <OSGBaseTypes.h>
00045 #include <OSGNode.h>
00046 
00047 OSG_BEGIN_NAMESPACE
00048 
00049 
00050 OSG_SYSTEMLIB_DLLMAPPING 
00051 void                    calcVertexNormals   (GeometryPtr geo);
00052 
00053 OSG_SYSTEMLIB_DLLMAPPING 
00054 void                    calcVertexNormals   (GeometryPtr geo,
00055                                              Real32 creaseAngle);
00056 OSG_SYSTEMLIB_DLLMAPPING 
00057 void                    calcFaceNormals     (GeometryPtr geo);
00058 
00059 OSG_SYSTEMLIB_DLLMAPPING 
00060 void                    calcVertexTangents  (GeometryPtr geo,
00061                                              Int32 srcTexIndex = 0,
00062                                              Int32 dstAttribTan = Geometry::TexCoords1FieldId,
00063                                              Int32 dstAttribBin = Geometry::TexCoords2FieldId);
00064 
00065 OSG_SYSTEMLIB_DLLMAPPING
00066 void                    calcVertexTexCoords (GeometryPtr geo,
00067                                              Int32 texIndex = 0);
00068 
00069 OSG_SYSTEMLIB_DLLMAPPING 
00070 Int32                   setIndexFromVRMLData(GeometryPtr geo,
00071                                              std::vector<Int32> &coordIndex,
00072                                              std::vector<Int32> &normalIndex,
00073                                              std::vector<Int32> &colorIndex,
00074                                              std::vector<Int32> &texCoordIndex,
00075                                              bool convex          = true,
00076                                              bool ccw             = true,
00077                                              bool normalPerVertex = true,
00078                                              bool colorPerVertex  = true,
00079                                              bool createNormal    = true,
00080                                              bool faceSet         = true);
00081 
00082 OSG_SYSTEMLIB_DLLMAPPING 
00083 Int32                   setIndexFromIndexedX3DData ( GeometryPtr geo,
00084                                                      std::vector<Int32> &coordIndex,
00085                                                      std::vector<Int32> &normalIndex,
00086                                                      std::vector<Int32> &colorIndex,
00087                                                      std::vector<Int32> &texCoordIndex,
00088                                                      Int32 primitiveType  = GL_POLYGON,
00089                                                      bool  convex          = true,
00090                                                      bool  ccw             = true,
00091                                                      bool  normalPerVertex = true,
00092                                                      bool  colorPerVertex  = true,
00093                                                      bool  createNormal    = true );
00094 
00095 
00096 OSG_SYSTEMLIB_DLLMAPPING 
00097 Int32              createOptimizedPrimitives(GeometryPtr geo,
00098                                              UInt32 iteration       = 1,
00099                                              bool createStrips      = true,
00100                                              bool createFans        = true,
00101                                              UInt32 minFanEdgeCount = 16,
00102                                              bool colorCode         = false,
00103                                              bool stitchStrips      = false);
00104 
00105 OSG_SYSTEMLIB_DLLMAPPING 
00106 void                  createConvexPrimitives(GeometryPtr geo);
00107 
00108 OSG_SYSTEMLIB_DLLMAPPING 
00109 Int32                      createSharedIndex(GeometryPtr geo);
00110 
00111 OSG_SYSTEMLIB_DLLMAPPING 
00112 Int32                      createSingleIndex(GeometryPtr geo);
00113 
00114 OSG_SYSTEMLIB_DLLMAPPING 
00115 UInt32                    calcPrimitiveCount(GeometryPtr geo,
00116                                              UInt32 &triangle,
00117                                              UInt32 &line,
00118                                              UInt32 &point);
00119 
00120 OSG_SYSTEMLIB_DLLMAPPING 
00121 NodePtr                 calcVertexNormalsGeo(GeometryPtr geo, 
00122                                              Real32 length);
00123 
00124 OSG_SYSTEMLIB_DLLMAPPING 
00125 NodePtr                   calcFaceNormalsGeo(GeometryPtr geo, 
00126                                              Real32 length);
00127 OSG_SYSTEMLIB_DLLMAPPING 
00128 void                         mergeGeometries(std::vector<NodePtr> &nodes,
00129                                              std::vector<NodePtr> &results);
00130 
00131 OSG_SYSTEMLIB_DLLMAPPING 
00132 void                        separateProperties(GeometryPtr geo);
00133 
00134 OSG_END_NAMESPACE
00135 
00136 #include <OSGGeoFunctions.inl>
00137 
00138 #endif /* _OSGGEOFUNCTIONS_H_ */

Generated on Thu Aug 25 04:05:17 2005 for OpenSG by  doxygen 1.4.3