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 #define PSHOW_CACHE_CONDITIONS 0x00800000 00047 00048 00049 00050 class HPShowCache 00051 { 00052 public: 00053 HPShowCache():flags(0), path(0), modelling_matrix(0), 00054 clip_region_loops(0), clip_region_spec(0), clip_region_lengths(0), clip_region_points(0), 00055 visibility(0), conditions(0), rendering_options(0), handedness(0), heuristics(0), 00056 text_font(0), text_alignment(0), text_spacing(1.f), marker_size(0), marker_symbol(0), 00057 line_weight(0), line_pattern(0), color(0), color_map(0), edge_weight(0), 00058 edge_pattern(0), camera_position(0,0,0), camera_target(0,0,0), camera_up(0,0,0), 00059 camera_width(0.f), camera_height(0.f), camera_projection(0), 00060 text_path_x(1.f), text_path_y(0), text_path_z(0), 00061 screen_range(0), depth_range(0), tessellation(0), general_curve(0), nurbs_surface(0), general_displacement(0), mask_transform(0), 00062 anti_alias(0), image_scale(0), polygon_handedness(0), trans_color(0), 00063 hidden_line_hsra(false), have_text_path(false), have_text_spacing(false) 00064 { 00065 } 00066 00067 ~HPShowCache() 00068 { 00069 delete [] path; 00070 delete [] visibility; 00071 delete [] conditions; 00072 delete [] clip_region_spec; 00073 delete [] clip_region_points; 00074 delete [] clip_region_lengths; 00075 delete [] rendering_options; 00076 delete [] handedness; 00077 delete [] heuristics; 00078 delete [] text_font; 00079 delete [] text_alignment; 00080 delete [] marker_size; 00081 delete [] marker_symbol; 00082 delete [] line_weight; 00083 delete [] line_pattern; 00084 delete [] color; 00085 delete [] color_map; 00086 delete [] edge_weight; 00087 delete [] edge_pattern; 00088 delete [] camera_projection; 00089 delete [] screen_range; 00090 delete [] depth_range; 00091 delete [] tessellation; 00092 delete [] general_curve; 00093 delete [] nurbs_surface; 00094 delete [] general_displacement; 00095 delete [] mask_transform; 00096 delete [] anti_alias; 00097 delete [] image_scale; 00098 delete [] polygon_handedness; 00099 delete [] trans_color; 00100 } 00101 00102 unsigned int flags; 00103 00104 HC_KEY* path; 00105 int path_count; 00106 00107 float modelling_matrix_data[16]; 00108 float * modelling_matrix; 00109 00110 int clip_region_loops; 00111 char * clip_region_spec; 00112 int * clip_region_lengths; 00113 HPoint *clip_region_points; 00114 00115 char * visibility; 00116 char * conditions; 00117 char * rendering_options; 00118 char * handedness; 00119 char * heuristics; 00120 char * text_font; 00121 char * text_alignment; 00122 00123 float text_spacing; 00124 char * marker_size; 00125 char * marker_symbol; 00126 char * line_weight; 00127 char * line_pattern; 00128 char * color; 00129 char * color_map; 00130 char * edge_weight; 00131 char * edge_pattern; 00132 HPoint camera_position; 00133 HPoint camera_target; 00134 HPoint camera_up; 00135 float camera_width; 00136 float camera_height; 00137 char * camera_projection; 00138 00139 float text_path_x, text_path_y, text_path_z; 00140 char * screen_range; 00141 char * depth_range; 00142 char * tessellation; 00143 char * general_curve; 00144 char * nurbs_surface; 00145 char * general_displacement; 00146 char * mask_transform; 00147 char * anti_alias; 00148 char * image_scale; 00149 char * polygon_handedness; 00150 char * trans_color; 00151 00152 bool hidden_line_hsra; 00153 bool have_text_path; 00154 bool have_text_spacing; 00155 }; 00156 00157 //typedef VHash<HC_KEY, HPShowCache *> HVHashPShowCache; 00158 00159 class HVHashPShowCache: public VHash<HC_KEY, HPShowCache *> 00160 { 00161 00162 }; 00163 00164 00165 class HConditionStyleInfo { 00166 public: 00167 HC_KEY hightlight_style; 00168 HC_KEY condition_style; 00169 HC_POINTER_SIZED_INT use_count; 00170 00171 HConditionStyleInfo(HC_KEY HightlightStyle): hightlight_style(HightlightStyle), use_count(0) {}; 00172 ~HConditionStyleInfo() {}; 00173 }; 00174 00175 class HConditionStyleInfoHash: public VStringHash<HConditionStyleInfo *> { 00176 public: 00177 HConditionStyleInfoHash():VStringHash<HConditionStyleInfo *>(2) {}; 00178 }; 00179 00180 class HConditionStyleKeyInfoHash: public VHash<HC_KEY, HConditionStyleInfo *> {}; 00181 00182 class HSelectionSegmentConditionInfo: public VHash<HC_KEY, HConditionStyleInfoHash *> {}; 00183 00184 00185 #ifdef H_PACK_8 00186 #pragma pack(pop) 00187 #endif 00188 00189 #endif 00190 00191 00192 00193 00194 00195 00196 00197 00198 00199 00200 00201 00202 00203 00204 00205 00206 00207 00208