![]() |
MechSys
1.0
Computing library for simulations in continuum and discrete mechanics
|
00001 /************************************************************************ 00002 * MechSys - Open Library for Mechanical Systems * 00003 * Copyright (C) 2005 Dorival M. Pedroso, Raul Durand * 00004 * Copyright (C) 2009 Sergio Galindo * 00005 * * 00006 * This program is free software: you can redistribute it and/or modify * 00007 * it under the terms of the GNU General Public License as published by * 00008 * the Free Software Foundation, either version 3 of the License, or * 00009 * any later version. * 00010 * * 00011 * This program is distributed in the hope that it will be useful, * 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00014 * GNU General Public License for more details. * 00015 * * 00016 * You should have received a copy of the GNU General Public License * 00017 * along with this program. If not, see <http://www.gnu.org/licenses/> * 00018 ************************************************************************/ 00019 00020 /*========================================================================= 00021 00022 Program: Visualization Toolkit 00023 Module: $RCSfile: vtkcelltype_8h_source.html,v $ 00024 00025 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00026 All rights reserved. 00027 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00028 00029 This software is distributed WITHOUT ANY WARRANTY; without even 00030 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00031 PURPOSE. See the above copyright notice for more information. 00032 00033 =========================================================================*/ 00034 // .NAME vtkCellType - define types of cells 00035 // .SECTION Description 00036 // vtkCellType defines the allowable cell types in the visualization 00037 // library (vtk). In vtk, datasets consist of collections of cells. 00038 // Different datasets consist of different cell types. The cells may be 00039 // explicitly represented (as in vtkPolyData), or may be implicit to the 00040 // data type (as in vtkStructuredPoints). 00041 00042 #ifndef __vtkCellType_h 00043 #define __vtkCellType_h 00044 00045 // To add a new cell type, define a new integer type flag here, then 00046 // create a subclass of vtkCell to implement the proper behavior. You 00047 // may have to modify the following methods: vtkDataSet (and subclasses) 00048 // GetCell() and vtkGenericCell::SetCellType(). Also, to do the job right, 00049 // you'll also have to modify some filters (vtkGeometryFilter...) and 00050 // regression tests (example scripts) to reflect the new cell addition. 00051 // Also, make sure to update vtkCellTypesStrings in vtkCellTypes.cxx. 00052 00053 // .SECTION Caveats 00054 // An unstructured grid stores the types of its cells as a 00055 // unsigned char array. Therefore, the maximum encoding number for a cell type 00056 // is 255. 00057 00058 typedef enum { 00059 // Linear cells 00060 VTK_EMPTY_CELL = 0, 00061 VTK_VERTEX = 1, 00062 VTK_POLY_VERTEX = 2, 00063 VTK_LINE = 3, 00064 VTK_POLY_LINE = 4, 00065 VTK_TRIANGLE = 5, 00066 VTK_TRIANGLE_STRIP = 6, 00067 VTK_POLYGON = 7, 00068 VTK_PIXEL = 8, 00069 VTK_QUAD = 9, 00070 VTK_TETRA = 10, 00071 VTK_VOXEL = 11, 00072 VTK_HEXAHEDRON = 12, 00073 VTK_WEDGE = 13, 00074 VTK_PYRAMID = 14, 00075 VTK_PENTAGONAL_PRISM = 15, 00076 VTK_HEXAGONAL_PRISM = 16, 00077 00078 // Quadratic, isoparametric cells 00079 VTK_QUADRATIC_EDGE = 21, 00080 VTK_QUADRATIC_TRIANGLE = 22, 00081 VTK_QUADRATIC_QUAD = 23, 00082 VTK_QUADRATIC_TETRA = 24, 00083 VTK_QUADRATIC_HEXAHEDRON = 25, 00084 VTK_QUADRATIC_WEDGE = 26, 00085 VTK_QUADRATIC_PYRAMID = 27, 00086 VTK_BIQUADRATIC_QUAD = 28, 00087 VTK_TRIQUADRATIC_HEXAHEDRON = 29, 00088 VTK_QUADRATIC_LINEAR_QUAD = 30, 00089 VTK_QUADRATIC_LINEAR_WEDGE = 31, 00090 VTK_BIQUADRATIC_QUADRATIC_WEDGE = 32, 00091 VTK_BIQUADRATIC_QUADRATIC_HEXAHEDRON = 33, 00092 00093 // Special class of cells formed by convex group of points 00094 VTK_CONVEX_POINT_SET = 41, 00095 00096 // Higher order cells in parametric form 00097 VTK_PARAMETRIC_CURVE = 51, 00098 VTK_PARAMETRIC_SURFACE = 52, 00099 VTK_PARAMETRIC_TRI_SURFACE = 53, 00100 VTK_PARAMETRIC_QUAD_SURFACE = 54, 00101 VTK_PARAMETRIC_TETRA_REGION = 55, 00102 VTK_PARAMETRIC_HEX_REGION = 56, 00103 00104 // Higher order cells 00105 VTK_HIGHER_ORDER_EDGE = 60, 00106 VTK_HIGHER_ORDER_TRIANGLE = 61, 00107 VTK_HIGHER_ORDER_QUAD = 62, 00108 VTK_HIGHER_ORDER_POLYGON = 63, 00109 VTK_HIGHER_ORDER_TETRAHEDRON = 64, 00110 VTK_HIGHER_ORDER_WEDGE = 65, 00111 VTK_HIGHER_ORDER_PYRAMID = 66, 00112 VTK_HIGHER_ORDER_HEXAHEDRON = 67, 00113 00114 VTK_NUMBER_OF_CELL_TYPES 00115 } VTKCellType; 00116 00117 #endif 00118 00119 #ifndef MECHSYS_VTKCELLTYPE_H 00120 #define MECHSYS_VTKCELLTYPE_H 00121 00122 int NVertsToVTKNVerts2D[] = {-1, // 0 verts 00123 -1, // 1 vert 00124 2, // 2 verts 00125 3, // 3 00126 4, // 4 00127 -1, // 5 00128 6, // 6 00129 -1, // 7 00130 8, // 8 00131 -1,-1,-1,-1,-1,-1, // 9,10,11,12,13,14 00132 6}; // 15 00133 00134 int NVertsToVTKNVerts3D[] = {-1, // 0 verts 00135 -1, // 1 vert 00136 2, // 2 verts 00137 -1, // 3 00138 4, // 4 00139 -1, // 5 00140 -1, // 6 00141 -1, // 7 00142 8, // 8 00143 -1, // 9 00144 10, // 10 00145 -1,-1,-1,-1,-1,-1,-1,-1,-1, // 11,12,13,14,15,16,17,18,19 00146 20}; // 20 00147 00148 int NVertsToVTKCell2D[] = {-1, // 0 verts 00149 -1, // 1 vert 00150 VTK_LINE, // 2 verts 00151 VTK_TRIANGLE, // 3 00152 VTK_QUAD, // 4 00153 -1, // 5 00154 VTK_QUADRATIC_TRIANGLE, // 6 00155 -1, // 7 00156 VTK_QUADRATIC_QUAD, // 8 00157 -1,-1,-1,-1,-1,-1, // 9,10,11,12,13,14 00158 VTK_QUADRATIC_TRIANGLE};// 15 00159 00160 int NVertsToVTKCell3D[] = {-1, // 0 verts 00161 -1, // 1 vert 00162 VTK_LINE, // 2 verts 00163 -1, // 3 00164 VTK_TETRA, // 4 00165 -1, // 5 00166 -1, // 6 00167 -1, // 7 00168 VTK_HEXAHEDRON, // 8 00169 -1, // 9 00170 VTK_QUADRATIC_TETRA, // 10 00171 -1,-1,-1,-1,-1,-1,-1,-1,-1, // 11,12,13,14,15,16,17,18,19 00172 VTK_QUADRATIC_HEXAHEDRON}; // 20 00173 00174 #endif // MECHSYS_VTKCELLTYPE_H