Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

SoIndexedShape.h

00001 /**************************************************************************\ 00002 * 00003 * This file is part of the Coin 3D visualization library. 00004 * Copyright (C) 1998-2003 by Systems in Motion. All rights reserved. 00005 * 00006 * This library is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Lesser General Public License 00008 * version 2.1 as published by the Free Software Foundation. See the 00009 * file LICENSE.LGPL at the root directory of the distribution for 00010 * more details. 00011 * 00012 * If you want to use Coin for applications not compatible with the 00013 * LGPL, please contact SIM to acquire a Professional Edition license. 00014 * 00015 * Systems in Motion, Teknobyen, Abels Gate 5, 7030 Trondheim, NORWAY 00016 * http://www.sim.no support@sim.no Voice: +47 22114160 Fax: +47 22207097 00017 * 00018 \**************************************************************************/ 00019 00020 #ifndef COIN_SOINDEXEDSHAPE_H 00021 #define COIN_SOINDEXEDSHAPE_H 00022 00023 #include <Inventor/nodes/SoSubNode.h> 00024 #include <Inventor/nodes/SoVertexShape.h> 00025 #include <Inventor/fields/SoMFInt32.h> 00026 00027 class SoTextureCoordinateElement; 00028 class SoCoordinateElement; 00029 00030 00031 class COIN_DLL_API SoIndexedShape : public SoVertexShape { 00032 typedef SoVertexShape inherited; 00033 00034 SO_NODE_ABSTRACT_HEADER(SoIndexedShape); 00035 00036 public: 00037 static void initClass(void); 00038 00039 SoMFInt32 coordIndex; 00040 SoMFInt32 materialIndex; 00041 SoMFInt32 normalIndex; 00042 SoMFInt32 textureCoordIndex; 00043 00044 protected: 00045 SoIndexedShape(void); 00046 virtual ~SoIndexedShape(); 00047 00048 virtual void computeBBox(SoAction * action, SbBox3f & box, SbVec3f & center); 00049 int getNumVerts(const int startCoord); 00050 void setupIndices(const int numParts, const int numFaces, 00051 const SbBool needNormals, const SbBool needTexCoords); 00052 00053 const int32_t * getNormalIndices(void); 00054 const int32_t * getColorIndices(void); 00055 const int32_t * getTexCoordIndices(void); 00056 00057 static SbBool areTexCoordsIndexed(SoAction * action); 00058 00059 SbBool getVertexData(SoState * state, 00060 const SoCoordinateElement *& coords, 00061 const SbVec3f *& normals, 00062 const int32_t *& cindices, 00063 const int32_t *& nindices, 00064 const int32_t *& tindices, 00065 const int32_t *& mindices, 00066 int & numcindices, 00067 const SbBool needNormals, 00068 SbBool & normalCacheUsed); 00069 00070 private: 00071 // These are not in use, but we can't kill them in Coin v1, because 00072 // that'd break ABI compatibility. (They have been removed in Coin 00073 // v2.) 00074 int32_t * tIndices; 00075 int32_t * nIndices; 00076 int32_t * mIndices; 00077 }; 00078 00079 00080 #endif // !COIN_SOINDEXEDSHAPE_H

Generated on Tue Jul 27 23:53:01 2004 for Coin by doxygen 1.3.7