Alphabetical Class Index  Class Hierarchy   File Members   Compound Members   File List  

HImCuttingGeometry.h
Go to the documentation of this file.
1 //
2 // Copyright (c) 2000 by Tech Soft 3D, LLC.
3 // The information contained herein is confidential and proprietary to
4 // Tech Soft 3D, LLC., and considered a trade secret as defined under
5 // civil and criminal statutes. Tech Soft 3D shall pursue its civil
6 // and criminal remedies in the event of unauthorized use or misappropriation
7 // of its trade secrets. Use of this information by anyone other than
8 // authorized employees of Tech Soft 3D, LLC. is granted only under a
9 // written non-disclosure agreement, expressly prescribing the scope and
10 // manner of such use.
11 //
12 // $Id: 63158c38b524b90a350dc56a7ef6c9c55312bae4 $
13 //
14 
15 // HCuttingPlaneLinedata.h : interface of the HCuttingPlaneLinedata class
16 //
17 // supports creation of linked list of polylines which represent the lines
18 // of intersection with a cutting plane. supports insertion of these lines
19 // into a segment within the scene in HBaseView
20 
25 #ifndef _HIM_CUTTING_GEOMETRY_H
26 #define _HIM_CUTTING_GEOMETRY_H
27 
28 #ifdef H_PACK_8
29 #pragma pack(push)
30 #pragma pack(8)
31 #endif
32 
33 #include "HTools.h"
34 #include "hic_types.h"
35 
43 };
51 };
52 
53 
124 class MVO_API HImCuttingGeometry
125 {
126 public:
130 
144  void CreateCuttingGeometry(HC_KEY source_key, HC_KEY target_key,
145  int cutting_type=HIM_CUTTING_GEOMETRY_TYPE_POLYLINES,
146  int body_level=HIM_CUTTING_GEOMETRY_SEGMENT_BODY);
147 
153  void CreateCuttingGeometry(HC_KEY source_key, HC_KEY target_key, bool honor_modelling_matrices);
154 
157  static void RegisterCallbacks();
158 
161  void SetSmallestFeature(float smallest_feature) { m_smallest_feature = smallest_feature; }
163  float GetSmallestFeature() { return m_smallest_feature; }
168  void SetTolerance(float tolerance) { m_tolerance = tolerance; }
171  float GetTolerance() { return m_tolerance; }
172 
173 private:
174 
175  /* Collects all of the cutting lines into a list. This list can either be directly displayed as a collection
176  of lines, or merged into a closed loop for the purposes of computing a capping polygon. */
177  static void StoreCuttingPlaneLines (HIC_Rendition const *nr, int count, HIC_DC_Point const * pts);
178  /* If we are computing capping polygon(s), this routine will allow us to determine when one body stops
179  and the next begins. */
180  static void StopBody (HIC_Rendition const *nr);
181  /* calls straight through to StopBody (see above) */
182  static void ShellBody (HIC_Rendition const *nr, HIC_Polyhedron const *phon);
183  /* calls straight through to StopBody (see above) */
184  static void SegmentBody (HIC_Rendition const *nr, HIC_Segment_Info const *seg);
185 
186  /* does the actual work for the new CreateCuttingGeometry */
187  static void GetCaps(HIC_Rendition const *nr, HIC_Polyhedron const *p);
188 
189  /* tracks whether we cook to lines, polylines, or faces. polylines and faces may be used together with a bitwise OR */
190  static int m_cutting_type;
191  /* used only to set the handedness of the cutting geometry segment */
192  static bool m_body_is_open;
193  static float m_smallest_feature;
194  /* the largest allowable distance between start and end to be considered a match for the purposes of
195  assembling polylines and testing for closed loops */
196  static float m_tolerance;
197  static struct vlist_s * m_lines; /* stores uncooked soup of lines */
198  static struct vlist_s * m_polylines; /* stores lines merged together where possible */
199  static struct vlist_s * m_faces; /* stores (probably closed) loops to be used as shell faces */
200  static HC_KEY m_target_segment;
201  static bool m_honor_matrices;
202 };
203 
204 
205 
206 #ifdef H_PACK_8
207 #pragma pack(pop)
208 #endif
209 
210 #endif
211 
212 
213 
214 
215 
216 
217 
218 
float GetTolerance()
Definition: HImCuttingGeometry.h:171
Line Type.
Definition: HImCuttingGeometry.h:40
#define HC_KEY
Definition: HImCuttingGeometry.h:124
float GetSmallestFeature()
Definition: HImCuttingGeometry.h:163
Segment Body.
Definition: HImCuttingGeometry.h:49
HIMCG_Cutting_Type
Definition: HImCuttingGeometry.h:39
Shell Body.
Definition: HImCuttingGeometry.h:50
Face Type.
Definition: HImCuttingGeometry.h:42
Polyline Type.
Definition: HImCuttingGeometry.h:41
void SetSmallestFeature(float smallest_feature)
Definition: HImCuttingGeometry.h:161
void SetTolerance(float tolerance)
Definition: HImCuttingGeometry.h:168
HIMCG_Body_Type
Definition: HImCuttingGeometry.h:48