cgma
CubitOctreeConstants.hpp
Go to the documentation of this file.
00001 //-------------------------------------------------------------------------
00002 // Filename      : CubitOctreeConstants.hpp
00003 //
00004 // Purpose       : Constants for the octree generation
00005 //
00006 // Creator       : William Roshan Quadros
00007 //
00008 // Creation Date : 9/2/2013
00009 //
00010 // Owner         : 
00011 //-------------------------------------------------------------------------
00012 
00013 #ifndef CUBIT_OCTREE_CONSTANTS_H 
00014 #define CUBIT_OCTREE_CONSTANTS_H
00015 
00016 
00017 
00018 #include "CubitDefines.h"
00019 
00020 const int OCTREE_X = 0;
00021 const int OCTREE_Y = 1;
00022 const int OCTREE_Z = 2;
00023 //- Cartician coordinate axis
00024 
00025 
00026 //- during triliear interpolation if number of zero size nodes exceeds MAX_NUM_ZERO_SIZE_NODES
00027 //- then average size is taken instead of zero.
00028 const int MAX_NUM_ZERO_SIZE_NODES = 2;
00029 
00030 const int CUTOFF_OCTREE_DEPTH = 3;
00031 const int CUTOFF_BBOX_RANGE_RATIO = 17;
00032 const int CUTOFF_NUM_NODES = 250;
00033 
00034 enum CubitOctreeType{ CUBIT_OCTREE_VOLUME, CUBIT_OCTREE_FACE, CUBIT_OCTREE_EDGE };
00035 // Depth settings for octree 
00036 const int MIN_DEPTH_OCTREE[4] = { 0, 2, 5, 5};
00037 const int MAX_DEPTH_OCTREE[4] = { 0, 7, 7, 7};
00038 const int INCR_DEPTH_OCTREE_FOR_SKELETON = 0;  
00039 const int OCTREE_MIN_DEPTH_OCTREE[4] = { 0, MIN_DEPTH_OCTREE[1] + INCR_DEPTH_OCTREE_FOR_SKELETON,MIN_DEPTH_OCTREE[2] + INCR_DEPTH_OCTREE_FOR_SKELETON, MIN_DEPTH_OCTREE[3] + INCR_DEPTH_OCTREE_FOR_SKELETON};
00040 const int OCTREE_MAX_DEPTH_OCTREE[4] = { 0, MAX_DEPTH_OCTREE[1] + INCR_DEPTH_OCTREE_FOR_SKELETON,MAX_DEPTH_OCTREE[2] + INCR_DEPTH_OCTREE_FOR_SKELETON, MAX_DEPTH_OCTREE[3] + INCR_DEPTH_OCTREE_FOR_SKELETON};
00041 
00042 enum OctreePosition { O_UNSET = -1, O_LEFT, O_RIGHT, O_BOTTOM, O_TOP, O_BACK, O_FRONT };
00043 
00044 
00045 enum OctreeNodeConstant {NODE_SIZE, NODE_FACE_NUM, NODE_DISTANCE,NODE_NORMAL, NODE_TENSOR, NODE_ELEM_TENSOR };
00046 // for display of size, face num, and distance at grid node
00047 
00048 const double OCTREE_TOLERANCE_FOR_CURVE_DECIMATION_FACTOR = 0.5;
00049 
00050 //- Default level of time-accuracy is set to 2 <1 to 3>
00051 const int OCTREE_TIME_ACCURACY_LEVEL = 2;
00052 // - This angle is used to insert virtual facetpointdata while generating PR-Octree
00053 const double FACET_SPLITTING_INTERNAL_ANGLE = 10.0 * CUBIT_PI / 180.0;
00054 //- graphics facets are splitted before generating the chordal axis.
00055 //- after facets' classification, some class of facets are split only 
00056 //- if the internal angle is large.  The new facets will contain internal angle
00057 //-  approximately equal to FACET_SPLITTING_INTERNAL_ANGLE
00058 
00059 
00060 enum OctreeSourceEntityType{ OCTREE_SIZE_DEFAULT=0 };
00061 
00062 const double OCTREE_EPSILON = 0.000001;
00063 const CubitBoolean OCTREE_POSITIVE = CUBIT_TRUE;
00064 const CubitBoolean OCTREE_NEGATIVE = CUBIT_FALSE;
00065 
00066 enum InterpolationMode{ INVERSE_SIZE, INVERSE_DISTANCE, INVERSE_SIZE_DISTANCE, MIN_DISTANCE, MIN_SIZE, AVERAGE };
00067 //- Schemes for interpolation of sizing function 
00068 
00069 enum InterpolationType{ INVERSE_LINEAR, INVERSE_QUADRATIC, INVERSE_CUBIC };
00070 //- Options for inverse distance interpolation.
00071 const InterpolationType DEFAULT_INVERSE_DISTANCE_SCHEME_INSIDE_CELL = INVERSE_LINEAR;
00072 
00073 enum InterpolationModeInsideCell{ TRILINEAR_INTERPOLATION_INSIDE_CELL, INVERSE_DISTANCE_INTERPOLATION_INSIDE_CELL, MIN_DISTANCE_INTERPOLATION_INSIDE_CELL, MIN_SIZE_INTERPOLATION_INSIDE_CELL, INVERSE_SQUARE_DISTANCE_INTERPOLATION_INSIDE_CELL };
00074 const InterpolationModeInsideCell DEFAULT_INTERPOLATION_INSIDE_CELL = INVERSE_SQUARE_DISTANCE_INTERPOLATION_INSIDE_CELL;
00075 
00076 
00077 
00078 enum SizeType{ MESH_SIZE, SCALED_SIZE };
00079 //- Size for meshing and scaled size for display (1-10)
00080 
00081 enum DistanceMetric {PROJECTED_DIST, CAPSULE_DIST, MANHATTAN_DIST};
00082 
00083 
00084 enum IntersectionMethod {GRID_EDGE_INT, SAT_INTERSECT};
00085 //- These are the facet-octree cell intersection methods
00086 
00087 
00088 const IntersectionMethod OCTREE_DEFAULT_INTERSECTION_METHOD[4] = { (IntersectionMethod)0, SAT_INTERSECT, SAT_INTERSECT, SAT_INTERSECT};   
00089 const DistanceMetric defaultDistanceMetric = CAPSULE_DIST;
00090 const double N_CLOSEST_FACETS_FACTOR_FOR_FRONT_NORMALS = 1.00;
00091 
00092 
00093 //- Tolerance 
00094 const double ANGLE_BETWEEN_FACETS_NORMAL_FOR_OCTREE_BASED_ON_SURF_CURVATURE_FACTOR = 0.5; 
00095 const double SLENDER_FACET_INTERNAL_ANGLE =  10.0 * CUBIT_PI / 180.0;
00096 
00097 const double ANG_FACET_EXTRACT[4]  =  { 15.0, 15.0, 10.0, 5.0 };
00098 
00099 #endif
00100 
00101 //EOF
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines