HPShowCache.h
1 // Copyright (c) Tech Soft 3D, Inc.
2 //
3 // The information contained herein is confidential and proprietary to Tech Soft 3D, Inc.,
4 // and considered a trade secret as defined under civil and criminal statutes.
5 // Tech Soft 3D, Inc. shall pursue its civil and criminal remedies in the event of
6 // unauthorized use or misappropriation of its trade secrets. Use of this information
7 // by anyone other than authorized employees of Tech Soft 3D, Inc. is granted only under
8 // a written non-disclosure agreement, expressly prescribing the scope and manner of such use.
9 
10 #ifndef _HPSHOWCACHE_H
11 #define _HPSHOWCACHE_H
12 
13 #ifdef H_PACK_8
14 #pragma pack(push)
15 #pragma pack(8)
16 #endif
17 
18 #include "HTools.h"
19 #include "HGlobals.h"
20 #include "vhash.h"
21 
22 
23 #define PSHOW_CACHE_MODELLING_MATRIX 0x00000001
24 #define PSHOW_CACHE_VISIBILITY 0x00000002
25 #define PSHOW_CACHE_RENDERING_OPTIONS 0x00000004
26 #define PSHOW_CACHE_HANDEDNESS 0x00000008
27 #define PSHOW_CACHE_HEURISTICS 0x00000010
28 #define PSHOW_CACHE_TEXT_FONT 0x00000020
29 #define PSHOW_CACHE_TEXT_ALIGNMENT 0x00000040
30 #define PSHOW_CACHE_TEXT_PATH 0x00000080
31 #define PSHOW_CACHE_TEXT_SPACING 0x00000100
32 #define PSHOW_CACHE_MARKER_SIZE 0x00000200
33 #define PSHOW_CACHE_MARKER_SYMBOL 0x00000400
34 #define PSHOW_CACHE_LINE_WEIGHT 0x00000800
35 #define PSHOW_CACHE_LINE_PATTERN 0x00001000
36 #define PSHOW_CACHE_COLOR 0x00002000
37 #define PSHOW_CACHE_EDGE_WEIGHT 0x00004000
38 #define PSHOW_CACHE_EDGE_PATTERN 0x00008000
39 #define PSHOW_CACHE_CAMERA 0x00010000
40 #define PSHOW_CACHE_IMAGE_SCALE 0x00020000
41 #define PSHOW_CACHE_HIDDEN_LINE_HSRA 0x00040000
42 #define PSHOW_CACHE_POLYGON_HANDEDNESS 0x00080000
43 #define PSHOW_CACHE_TRANS_COLOR 0x00100000
44 #define PSHOW_CACHE_COLORMAP 0x00200000
45 #define PSHOW_CACHE_CLIP_REGION 0x00400000
46 #define PSHOW_CACHE_CONDITIONS 0x00800000
47 
48 
49 
51 {
52 public:
53  HPShowCache():flags(0), path(0), modelling_matrix(0),
54  clip_region_loops(0), clip_region_spec(0), clip_region_lengths(0), clip_region_points(0),
55  visibility(0), conditions(0), rendering_options(0), handedness(0), heuristics(0),
56  text_font(0), text_alignment(0), text_spacing(1.f), marker_size(0), marker_symbol(0),
57  line_weight(0), line_pattern(0), color(0), color_map(0), edge_weight(0),
58  edge_pattern(0), camera_position(0,0,0), camera_target(0,0,0), camera_up(0,0,0),
59  camera_width(0.f), camera_height(0.f), camera_projection(0),
60  text_path_x(1.f), text_path_y(0), text_path_z(0),
61  screen_range(0), depth_range(0), tessellation(0), general_curve(0), nurbs_surface(0), general_displacement(0), mask_transform(0),
62  anti_alias(0), image_scale(0), polygon_handedness(0), trans_color(0),
63  hidden_line_hsra(false), have_text_path(false), have_text_spacing(false)
64  {
65  }
66 
67  ~HPShowCache()
68  {
69  delete [] path;
70  delete [] visibility;
71  delete [] conditions;
72  delete [] clip_region_spec;
73  delete [] clip_region_points;
74  delete [] clip_region_lengths;
75  delete [] rendering_options;
76  delete [] handedness;
77  delete [] heuristics;
78  delete [] text_font;
79  delete [] text_alignment;
80  delete [] marker_size;
81  delete [] marker_symbol;
82  delete [] line_weight;
83  delete [] line_pattern;
84  delete [] color;
85  delete [] color_map;
86  delete [] edge_weight;
87  delete [] edge_pattern;
88  delete [] camera_projection;
89  delete [] screen_range;
90  delete [] depth_range;
91  delete [] tessellation;
92  delete [] general_curve;
93  delete [] nurbs_surface;
94  delete [] general_displacement;
95  delete [] mask_transform;
96  delete [] anti_alias;
97  delete [] image_scale;
98  delete [] polygon_handedness;
99  delete [] trans_color;
100  }
101 
102  unsigned int flags;
103 
104  HC_KEY* path;
105  int path_count;
106 
107  float modelling_matrix_data[16];
108  float * modelling_matrix;
109 
110  int clip_region_loops;
111  char * clip_region_spec;
112  int * clip_region_lengths;
113  HPoint *clip_region_points;
114 
115  char * visibility;
116  char * conditions;
117  char * rendering_options;
118  char * handedness;
119  char * heuristics;
120  char * text_font;
121  char * text_alignment;
122 
123  float text_spacing;
124  char * marker_size;
125  char * marker_symbol;
126  char * line_weight;
127  char * line_pattern;
128  char * color;
129  char * color_map;
130  char * edge_weight;
131  char * edge_pattern;
132  HPoint camera_position;
133  HPoint camera_target;
134  HPoint camera_up;
135  float camera_width;
136  float camera_height;
137  char * camera_projection;
138 
139  float text_path_x, text_path_y, text_path_z;
140  char * screen_range;
141  char * depth_range;
142  char * tessellation;
143  char * general_curve;
144  char * nurbs_surface;
145  char * general_displacement;
146  char * mask_transform;
147  char * anti_alias;
148  char * image_scale;
149  char * polygon_handedness;
150  char * trans_color;
151 
152  bool hidden_line_hsra;
153  bool have_text_path;
154  bool have_text_spacing;
155 };
156 
157 //typedef VHash<HC_KEY, HPShowCache *> HVHashPShowCache;
158 
159 class HVHashPShowCache: public VHash<HC_KEY, HPShowCache *>
160 {
161 
162 };
163 
164 
166 public:
167  HC_KEY hightlight_style;
168  HC_KEY condition_style;
169  HC_POINTER_SIZED_INT use_count;
170 
171  HConditionStyleInfo(HC_KEY HightlightStyle): hightlight_style(HightlightStyle), use_count(0) {};
172  ~HConditionStyleInfo() {};
173 };
174 
175 class HConditionStyleInfoHash: public VStringHash<HConditionStyleInfo *> {
176 public:
177  HConditionStyleInfoHash():VStringHash<HConditionStyleInfo *>(2) {};
178 };
179 
180 class HConditionStyleKeyInfoHash: public VHash<HC_KEY, HConditionStyleInfo *> {};
181 
182 class HSelectionSegmentConditionInfo: public VHash<HC_KEY, HConditionStyleInfoHash *> {};
183 
184 
185 #ifdef H_PACK_8
186 #pragma pack(pop)
187 #endif
188 
189 #endif
190 
191 
192 
193 
194 
195 
196 
197 
198 
199 
200 
201 
202 
203 
204 
205 
206 
207 
208 
Definition: HPShowCache.h:165
Definition: HPShowCache.h:159
Definition: HPShowCache.h:50
Definition: HPShowCache.h:182
Definition: HPShowCache.h:180
The HPoint class is the data type of a three-dimensional point.
Definition: HGlobals.h:121
Definition: HPShowCache.h:175