Alphabetical Class Index  Class Hierarchy   File Members   Compound Members   File List  

HPShowCache.h
00001 // Copyright (c) 1998-2014 by Tech Soft 3D, Inc.
00002 //
00003 // The information contained herein is confidential and proprietary to Tech Soft 3D, Inc.,
00004 // and considered a trade secret as defined under civil and criminal statutes.
00005 // Tech Soft 3D, Inc. shall pursue its civil and criminal remedies in the event of
00006 // unauthorized use or misappropriation of its trade secrets.  Use of this information
00007 // by anyone other than authorized employees of Tech Soft 3D, Inc. is granted only under
00008 // a written non-disclosure agreement, expressly prescribing the scope and manner of such use.
00009 
00010 #ifndef _HPSHOWCACHE_H
00011 #define _HPSHOWCACHE_H
00012 
00013 #ifdef H_PACK_8
00014 #pragma pack(push)
00015 #pragma pack(8)
00016 #endif
00017 
00018 #include "HTools.h"
00019 #include "HGlobals.h"
00020 #include "vhash.h"
00021 
00022 
00023 #define PSHOW_CACHE_MODELLING_MATRIX    0x00000001
00024 #define PSHOW_CACHE_VISIBILITY          0x00000002
00025 #define PSHOW_CACHE_RENDERING_OPTIONS   0x00000004
00026 #define PSHOW_CACHE_HANDEDNESS          0x00000008
00027 #define PSHOW_CACHE_HEURISTICS          0x00000010
00028 #define PSHOW_CACHE_TEXT_FONT           0x00000020
00029 #define PSHOW_CACHE_TEXT_ALIGNMENT      0x00000040
00030 #define PSHOW_CACHE_TEXT_PATH           0x00000080
00031 #define PSHOW_CACHE_TEXT_SPACING        0x00000100
00032 #define PSHOW_CACHE_MARKER_SIZE         0x00000200
00033 #define PSHOW_CACHE_MARKER_SYMBOL       0x00000400
00034 #define PSHOW_CACHE_LINE_WEIGHT         0x00000800
00035 #define PSHOW_CACHE_LINE_PATTERN        0x00001000
00036 #define PSHOW_CACHE_COLOR               0x00002000
00037 #define PSHOW_CACHE_EDGE_WEIGHT         0x00004000
00038 #define PSHOW_CACHE_EDGE_PATTERN        0x00008000
00039 #define PSHOW_CACHE_CAMERA              0x00010000
00040 #define PSHOW_CACHE_IMAGE_SCALE         0x00020000
00041 #define PSHOW_CACHE_HIDDEN_LINE_HSRA    0x00040000
00042 #define PSHOW_CACHE_POLYGON_HANDEDNESS  0x00080000
00043 #define PSHOW_CACHE_TRANS_COLOR         0x00100000
00044 #define PSHOW_CACHE_COLORMAP            0x00200000
00045 #define PSHOW_CACHE_CLIP_REGION         0x00400000
00046 
00047 
00048 
00049 class HPShowCache
00050 {
00051 public:
00052     HPShowCache():flags(0), path(0), modelling_matrix(0), 
00053         clip_region_loops(0), clip_region_spec(0), clip_region_lengths(0), clip_region_points(0),
00054         visibility(0), rendering_options(0), handedness(0), heuristics(0),
00055         text_font(0), text_alignment(0), text_spacing(1.f), marker_size(0), marker_symbol(0),
00056         line_weight(0), line_pattern(0), color(0), color_map(0), edge_weight(0), 
00057         edge_pattern(0), camera_position(0,0,0), camera_target(0,0,0), camera_up(0,0,0), 
00058         camera_width(0.f), camera_height(0.f), camera_projection(0),
00059         text_path_x(1.f), text_path_y(0), text_path_z(0),
00060         screen_range(0), depth_range(0), tessellation(0), general_curve(0), nurbs_surface(0), general_displacement(0), mask_transform(0),
00061         anti_alias(0), image_scale(0), polygon_handedness(0), trans_color(0),
00062         hidden_line_hsra(false), have_text_path(false), have_text_spacing(false)
00063     {
00064     }
00065 
00066     ~HPShowCache()
00067     {
00068         if(path)
00069             delete [] path;
00070         if(visibility)
00071             delete [] visibility;
00072         if(clip_region_spec)
00073             delete [] clip_region_spec;
00074         if(clip_region_points)
00075             delete [] clip_region_points;
00076         if(clip_region_lengths)
00077             delete [] clip_region_lengths;
00078         if(rendering_options)
00079             delete [] rendering_options;
00080         if(handedness)
00081             delete [] handedness;
00082         if(heuristics)
00083             delete [] heuristics;
00084         if(text_font)
00085             delete [] text_font;
00086         if(text_alignment)
00087             delete [] text_alignment;
00088         if(marker_size)
00089             delete [] marker_size;
00090         if(marker_symbol)
00091             delete [] marker_symbol;
00092         if(line_weight)
00093             delete [] line_weight;
00094         if(line_pattern)
00095             delete [] line_pattern;
00096         if(color)
00097             delete [] color;
00098         if(color_map)
00099             delete [] color_map;
00100         if(edge_weight)
00101             delete [] edge_weight;
00102         if(edge_pattern)
00103             delete [] edge_pattern; 
00104         if(camera_projection)
00105             delete [] camera_projection;
00106         if(screen_range)
00107             delete [] screen_range;
00108         if(depth_range)
00109             delete [] depth_range;
00110         if(tessellation)
00111             delete [] tessellation;
00112         if(general_curve)
00113             delete [] general_curve;
00114         if(nurbs_surface)
00115             delete [] nurbs_surface;
00116         if(general_displacement)
00117             delete [] general_displacement; 
00118         if(mask_transform)
00119             delete [] mask_transform;   
00120         if(anti_alias)
00121             delete [] anti_alias;
00122         if(image_scale)
00123             delete [] image_scale;
00124         if(polygon_handedness)
00125             delete [] polygon_handedness;   
00126         if(trans_color)
00127             delete [] trans_color;  
00128         
00129     }
00130 
00131     unsigned int flags;
00132 
00133     HC_KEY* path;
00134     int     path_count;
00135 
00136     float   modelling_matrix_data[16];
00137     float * modelling_matrix;
00138 
00139     int     clip_region_loops;
00140     char *  clip_region_spec;
00141     int *   clip_region_lengths;
00142     HPoint *clip_region_points;
00143 
00144     char *  visibility;
00145     char *  rendering_options;
00146     char *  handedness;
00147     char *  heuristics;
00148     char *  text_font;
00149     char *  text_alignment;
00150     
00151     float   text_spacing;
00152     char *  marker_size;
00153     char *  marker_symbol;
00154     char *  line_weight;
00155     char *  line_pattern;
00156     char *  color;
00157     char *  color_map;
00158     char *  edge_weight;
00159     char *  edge_pattern;
00160     HPoint  camera_position;
00161     HPoint  camera_target;
00162     HPoint  camera_up;
00163     float   camera_width;
00164     float   camera_height;
00165     char *  camera_projection;
00166 
00167     float   text_path_x, text_path_y, text_path_z;
00168     char *  screen_range;
00169     char *  depth_range;
00170     char *  tessellation;
00171     char *  general_curve;
00172     char *  nurbs_surface;
00173     char *  general_displacement;
00174     char *  mask_transform;
00175     char *  anti_alias;
00176     char *  image_scale;
00177     char *  polygon_handedness;
00178     char *  trans_color;
00179 
00180     bool    hidden_line_hsra;
00181     bool    have_text_path;
00182     bool    have_text_spacing;
00183 };
00184 
00185 //typedef VHash<HC_KEY, HPShowCache *> HVHashPShowCache;
00186 
00187 class HVHashPShowCache: public VHash<HC_KEY, HPShowCache *>
00188 {
00189 
00190 };
00191 
00192 
00193 class HConditionStyleInfo {
00194 public:
00195     HC_KEY  hightlight_style;
00196     HC_KEY  condition_style;
00197     HC_POINTER_SIZED_INT use_count;
00198 
00199     HConditionStyleInfo(HC_KEY  HightlightStyle): hightlight_style(HightlightStyle), use_count(0) {};
00200     ~HConditionStyleInfo() {};
00201 };
00202 
00203 class HConditionStyleInfoHash: public VStringHash<HConditionStyleInfo *> {
00204 public:
00205     HConditionStyleInfoHash():VStringHash<HConditionStyleInfo *>(2) {};
00206 };
00207 
00208 class HConditionStyleKeyInfoHash: public VHash<HC_KEY, HConditionStyleInfo *> {};
00209 
00210 class HSelectionSegmentConditionInfo: public VHash<HC_KEY, HConditionStyleInfoHash *> {};
00211 
00212 
00213 #ifdef H_PACK_8
00214 #pragma pack(pop)
00215 #endif
00216 
00217 #endif
00218 
00219 
00220 
00221 
00222 
00223 
00224 
00225 
00226 
00227 
00228 
00229 
00230 
00231 
00232 
00233 
00234 
00235 
00236