Branch data Line data Source code
1 : : //-------------------------------------------------------------------------
2 : : //
3 : : // Filename : RefEdge.hpp
4 : : //
5 : : // Purpose : This file contains the declarations of the class
6 : : // RefEdge.
7 : : //
8 : : // Special Notes :
9 : : //
10 : : // Creator : Xuechen Liu
11 : : //
12 : : // Creation Date : 07/11/96
13 : : //
14 : : // Owner : Malcolm J. Panthaki
15 : : //-------------------------------------------------------------------------
16 : :
17 : : #ifndef REF_EDGE_HPP
18 : : #define REF_EDGE_HPP
19 : :
20 : : #include "BasicTopologyEntity.hpp"
21 : : #include "CastTo.hpp"
22 : :
23 : : const double maxSegmentLengthError = 0.005;
24 : :
25 : : class CoEdge;
26 : :
27 : : class CubitVector;
28 : : class FacetEvalTool;
29 : : class Curve;
30 : :
31 : : class GMem;
32 : :
33 : : // ********** END FORWARD DECLARATIONS **********
34 : :
35 : : class CUBIT_GEOM_EXPORT RefEdge : public BasicTopologyEntity
36 : : {
37 : : public :
38 : :
39 : : typedef RefVertex ChildType;
40 : : typedef RefFace ParentType;
41 : :
42 : : // ********** BEGIN STATIC FUNCTION DECLARATIONS **********
43 : : // ********** END STATIC FUNCTION DECLARATIONS **********
44 : :
45 : : friend class RefEntityFactory;
46 : : //- the factory is allowed to call the (private) constructors
47 : :
48 : : virtual ~RefEdge() ;
49 : : //- The destructor
50 : :
51 : 2312 : static const char* get_class_name()
52 : : {
53 : 2312 : return "Curve";
54 : : }
55 : :
56 : 2312 : virtual const char* class_name() const
57 : : {
58 : 2312 : return get_class_name();
59 : : }
60 : :
61 : 571088 : DagType dag_type() const { return DagType::ref_edge_type(); }
62 : 11214 : const std::type_info& entity_type_info() const { return typeid(RefEdge); }
63 : :
64 : : void get_parent_ref_entities(DLIList<RefEntity*>& entity_list);
65 : :
66 : : virtual CubitStatus get_point_direction( CubitVector& origin,
67 : : CubitVector& direction );
68 : : //- Only valid for straight lines
69 : : //- Finds the underlying line's origin and direction unit vector
70 : : //- Returns CUBIT_FAILURE if curve is not a line
71 : :
72 : : virtual CubitStatus get_center_radius( CubitVector& center, double& radius );
73 : : //- Only valid for arcs
74 : : //- Finds the underlying arc's center point and radius
75 : : //- Returns CUBIT_FAILURE if curve is not an arc
76 : :
77 : : // ********* TOPOLOGY ********************
78 : :
79 : : RefVertex* start_vertex();
80 : : RefVertex* end_vertex();
81 : : //R RefVertex*
82 : : //R- Returned RefVertex pointer
83 : : //- These functions get the start and end RefVertex'es of this
84 : : //- RefEdge.
85 : : //-
86 : : //- MJP Notes:
87 : : //- The start and end RefVertices are cached in the RefEdge (see
88 : : //- private member data, start/end_RefVertex). These need to be
89 : : //- updated if the end RefVertices could have changed during a
90 : : //- geometric operation. See the routine, RefEdge::update to
91 : : //- see how this is done.
92 : :
93 : : virtual void reverse_topology();
94 : :
95 : : Chain* get_chain_ptr();
96 : : //R Chain*
97 : : //R- Pointer to the first Chain
98 : : //- This function returns a pointer to the first Chain that this
99 : : //- RefEdge points to.
100 : :
101 : : CubitStatus get_co_edges( DLIList<CoEdge*> &co_edges_found_list,
102 : : RefFace *input_ref_face_ptr = NULL );
103 : : //R CubitStatus
104 : : //R-CubitSucces/CubitFailure
105 : : //O co_edges_found_list and optional input_ref_face_ptr
106 : : //O- Gets the coedges that
107 : : //- correspond to "this" RefEdge, they are populated into the
108 : : //- co_edges_found_list. If an input_ref_face_ptr is sent it
109 : : //- gets the co_edges that are just associated with that ref_face.
110 : : //- Remember that usually there will be only one but for hard lines
111 : : //- and sipes there may be two co-edges/ref-edge/ref-face.
112 : : //- Note: This function will just blindly append the co-edges it
113 : : //- finds into the co_edges_found_list. A merge-unique might be
114 : : //- more expensive than we want.
115 : :
116 : : double angle_between( RefEdge *other_edge_ptr, RefFace *face_ptr );
117 : : //- Returns the "inside" angle between this edge and
118 : : // other_edge_ptr. Figures out which edge comes first. Only
119 : : // requirement is that both edges must be on face_ptr and on
120 : : // the same loop. Angle is in radians.
121 : :
122 : : CubitSense sense( RefFace *face );
123 : : //- Sense of this edge wrt the given face.
124 : : //- Return CUBIT_FORWARD or CUBIT_REVERSED.
125 : : //- Returns CUBIT_UNKNOWN if there is more than one coedge, and
126 : : //- senses don't agree, or if there are no coedges.
127 : :
128 : : virtual int dimension() const;
129 : : //- returns dimension of the actual entity.
130 : :
131 : : int num_of_common_ref_face( RefEdge *other_edge );
132 : : // get the number of common refFace for two refEdges.
133 : :
134 : : RefFace * common_ref_face (RefEdge* otherRefEdgePtr);
135 : : // - Find one common RefFace
136 : :
137 : : int common_ref_faces ( RefEdge* otherRefEdgePtr, DLIList<RefFace*> &common_face_list );
138 : : //- Returns all common RefFaces that this edge shares with the input edge
139 : :
140 : : RefVertex* common_ref_vertex( RefEdge* otherRefEdgePtr );
141 : : //- Find common RefVertex
142 : :
143 : : RefVertex* common_ref_vertex( RefEdge* next_ref_edge,
144 : : RefFace* ref_face_ptr );
145 : : //- Finds the common vertex between the next_ref_edge and
146 : : //- this edge, assuming that this edge comes before next_ref_edge
147 : : //- in a the loop around the surface. This is needed because
148 : : //- two edges may share two vertices...
149 : :
150 : : CubitBoolean common_vertices( RefEdge* otherRefEdgePtr,
151 : : DLIList<RefVertex*> &common_verts);
152 : : //-Populates the common_verts with the vertices that are common
153 : : //-between the two curves.
154 : : //-Returns CUBIT_TRUE if there are common vertices/ false otherwise.
155 : :
156 : : RefEdge* get_other_curve(RefVertex* common_vertex,
157 : : RefFace* ref_face_ptr);
158 : : //- Finds the other curve on the ref_face_ptr that shares
159 : : //- the common vertex
160 : :
161 : : CubitStatus get_two_co_edges( RefEdge *next_ref_edge,
162 : : RefFace *ref_face_ptr,
163 : : CoEdge *&co_edge_this,
164 : : CoEdge *&co_edge_next );
165 : : //R CubitStatus
166 : : //R- CUBIT_SUCCESS/CUBIT_FAILURE
167 : : //O next_ref_edge, ref_face_ptr, co_edge_this, co_edge_next
168 : : //O-Returns the co_edge that corrisponds to 'this' ref_edge
169 : : //- and the one that corrisponds to next_ref_edge, with
170 : : //- respect to the ref_face_ptr.
171 : : //- Special Note : next_ref_edge must follow 'this' ref_edge in a Loop
172 : : //- on the ref_face_ptr, this is assumed so the function
173 : : //- will assert if this is not done...
174 : :
175 : : RefFace *other_face(RefFace *not_face, RefVolume *ref_volume = NULL);
176 : : //- return the (an) other face sharing this edge, which also borders
177 : : //- ref_volume if non-NULL
178 : :
179 : : RefVertex* other_vertex( RefVertex* refVertexPtr );
180 : : //- Returns the vertex at the other end of the edge.
181 : :
182 : : RefVertex* closest_vertex(const CubitVector &point3);
183 : :
184 : : // ********* GEOMETRY ********************
185 : :
186 : : Curve* get_curve_ptr() ;
187 : : Curve const* get_curve_ptr() const ;
188 : : //R Curve*
189 : : //R- A pointer to the Curve to which this RefEdge points.
190 : : //- This function returns a pointer to the Curve
191 : : //- to which the current RefEdge points.
192 : :
193 : : CubitVector start_coordinates();
194 : : CubitVector end_coordinates();
195 : : //R CubitVector
196 : : //R- Returned location.
197 : : //- These functions return the start and end global coordinate
198 : : //- locations of the RefEdge.
199 : : //-
200 : : //- NOTE:
201 : : //- These coordinates remain consistent throughout the life of the
202 : : //- RefEdge, regardless of the fact that the actual start and
203 : : //- end RefVerex'es may change (e.g., after a merge operation).
204 : :
205 : : virtual void move_to_curve ( CubitVector& vector );
206 : : //- Moves the given location (CubitVector or CubitNode) to the closest
207 : : //- point on the Curve
208 : :
209 : : CubitStatus get_interior_extrema(DLIList<CubitVector*>& interior_points,
210 : : CubitSense& return_sense) const;
211 : :
212 : : CubitStatus closest_point_trimmed( CubitVector const& location,
213 : : CubitVector& closest_location);
214 : : //R void
215 : : //I location
216 : : //I- The point to which the closest point on the Curve is desired.
217 : : //O closest_location
218 : : //O- The point on the Curve, closest to the input location which
219 : : //O- will be on the Curve. This is input as a reference
220 : : //O- so that the function can modify its contents.
221 : :
222 : :
223 : : CubitStatus closest_point( CubitVector const& location,
224 : : CubitVector& closest_location,
225 : : CubitVector* tangent_ptr = NULL,
226 : : CubitVector* curvature_ptr = NULL);
227 : : //R void
228 : : //I location
229 : : //I- The point to which the closest point on the Curve is desired.
230 : : //O closest_location
231 : : //O- The point on the Curve, closest to the input location which
232 : : //O- might not be on the Curve. This is input as a reference
233 : : //O- so that the function can modify its contents.
234 : : //O tangent_ptr
235 : : //O- The tangent to the Curve (output as a unit vector) at the
236 : : //O- closest_location.
237 : : //O curvature_ptr
238 : : //O- The curvature of the Curve at the closest_location.
239 : : //- This function computes the point on the Curve closest to the input
240 : : //- location.
241 : : //-
242 : : //- If the tangent and/or curvature is required, then the calling code
243 : : //- is responsible for allocating space for the CubitVector(s) and
244 : : //- sending in the relevant non-NULL pointers. If either of these
245 : : //- pointers is NULL, the related quantity is not computed.
246 : : //-
247 : : //- Notes:
248 : : //- The tangent direction is always in the positive direction of the
249 : : //- *owning RefEdge*, regardless of the positive direction of the
250 : : //- underlying solid model entities, if any.
251 : :
252 : : CubitPointContainment point_containment( const CubitVector &point );
253 : : //R CubitPointContainment - is the point on bounds of the curve?
254 : : //R- CUBIT_PNT_OFF, CUBIT_PNT_ON, CUBIT_PNT_UNKNOWN
255 : : //I CubitVector
256 : : //I- position to check, known to be on the Curve
257 : : // NOTE: POINT MUST LIE ON THE CURVE FOR THIS FUNCTION TO WORK PROPERLY.
258 : :
259 : : void tangent ( const CubitVector &point, CubitVector& tangent_vec );
260 : : //- Return the tangent for the point on this RefEdge that is closest
261 : : //- to the input "point". The tangent direction is always in the
262 : : //- positive direction of the RefEdge. The positive direction of
263 : : //- the RefEdge is an invariant through its lifecycle.
264 : :
265 : :
266 : : CubitStatus tangent( const CubitVector &point,
267 : : CubitVector& tangent_vec,
268 : : RefFace *ref_face_ptr );
269 : : //R CubitStatus
270 : : //R- CUBIT_SUCCESS/CUBIT_FAILURE
271 : : //O point, tangent_vec, ref_face_ptr
272 : : //O- Get the correct tangent with respect to
273 : : //- the ref_face_ptr.
274 : : //- This tangent function is not the safest method for getting
275 : : //- the tangent on a surface. In face if there could be
276 : : //- another direction, this function could fail...(assert).
277 : : //- This function assumes that there is only 1 co-edge per
278 : : //- this ref_face for this REfEdge.
279 : :
280 : : CubitStatus tangent( const CubitVector &point, CubitVector& tangent_vec,
281 : : RefEdge *next_ref_edge, RefFace *ref_face_ptr );
282 : : //- Retruns the tangent for the point on this RefEdge that is closest
283 : : //- to the input "point". Also, because the next_ref_edge and
284 : : //- the ref_face_ptr are given, the tangent is oriented correctly.
285 : : //- NOTE: It is assumed that 'this' RefEdge and next_ref_edge are
286 : : //- in order in a "Loop" sense on the given ref_face_ptr. The next
287 : : //- ref_edge obviously must follow 'this' edge in this loop.
288 : :
289 : : virtual double measure();
290 : : //- A generic geometric extent function.
291 : : //- Returns volume for RefVolumes, area for RefFaces, length for RefEdge,
292 : : //- and 1.0 for RefVertices
293 : : //- A RefGroup calculates the maximum dimension of its contained
294 : : //- entities and returns the sum of the measures() of all entities
295 : : //- of that dimension.
296 : : //- Default return value is 0.0 for all other RefEntities.
297 : :
298 : : virtual CubitString measure_label();
299 : : //- Returns the type of measure: (volume, area, length, or N/A)
300 : :
301 : : double get_arc_length();
302 : : double get_arc_length ( const CubitVector &point1,
303 : : const CubitVector &point2 );
304 : : double get_arc_length ( const CubitVector &point1, int whichEnd );
305 : : //- Various arc length calculations, some are redundant
306 : : //- the length returned is always positive.
307 : :
308 : : double get_chord_length();
309 : : //- Calculates and returns the straight-line distance
310 : : //- between the startRefVertex and the endRefVertex
311 : :
312 : : CubitVector curve_center();
313 : : //- return a guess at the "centroid" of the curve, not the midpoint.
314 : : //- For a non-periodic curves, returns the average of vertices
315 : : //- For periodic curves, returns the average of the midpoint and the vertex.
316 : :
317 : : virtual CubitVector center_point();
318 : : //- Returns location at the "actual" center of this RefEdge (along the
319 : : //- arc of the RefEdge)
320 : :
321 : : CubitStatus mid_point ( const CubitVector &point1, const CubitVector &point2,
322 : : CubitVector& midPoint );
323 : : //- Calculate midpoint between the 2 points on this RefEdge
324 : :
325 : : CubitStatus mid_point ( CubitVector &mid_point);
326 : : //- Calculate midpoint on this RefEdge
327 : :
328 : : CubitStatus position_from_fraction( double fraction_along_curve,
329 : : CubitVector &ouput_position );
330 : : //R CubitStatus
331 : : //I fraction in parameter space along refedge. (1/3,2/3,4/5...)
332 : : //O- position where percent in parameter space lies.
333 : : //-This function takes the given fraction, finds the parameter value,
334 : : //-and calculates this position. This is based off the vgi curve.
335 : :
336 : : double start_param();
337 : : //R double
338 : : //- this function returns the starting parameter of the underlying curve
339 : :
340 : : double end_param();
341 : : //R double
342 : : //- this function returns the ending parameter of the underlying curve
343 : :
344 : : CubitBoolean get_param_range( double& start_param,
345 : : double& end_param );
346 : : //R CubitBoolean
347 : : //R- CUBIT_TRUE/FALSE
348 : : //O start_param, end_param
349 : : //O- The "lower" and "upper" parameter values of the RefEdge.
350 : : //- This function returns the parameter bounds for the RefEdge.
351 : : //- The start_param represents the parameter value of the
352 : : //- start location of the RefEdge and the end_param that of the
353 : : //- end location.
354 : : //-
355 : : //- CUBIT_TRUE is returned if the RefEdge is defined parametrically
356 : : //- and CUBIT_FALSE if it is not. In the latter case, the
357 : : //- output values of start_ and end_param are undetermined.
358 : : //-
359 : : //- MJP Note:
360 : : //- The numercial value of the start_param could be higher
361 : : //- than that of the end_param.
362 : :
363 : : double u_from_position (const CubitVector& input_position);
364 : : //R double
365 : : //R- The returned "u" parameter value in local parametric space
366 : : //I input_position
367 : : //I- The input position for which "u" is to be computed.
368 : : //- This function returns the coordinate of a point in the local
369 : : //- parametric (u) space that corresponds to the input position in
370 : : //- global (world) space. The input point is first moved to the
371 : : //- closest point on the Curve and the parameter value of that
372 : : //- point is determined.
373 : :
374 : : CubitStatus position_from_u (double u_value,
375 : : CubitVector& output_position);
376 : : //R CubitStatus
377 : : //R- CUBIT_SUCCESS/FAILURE
378 : : //I u_value
379 : : //I- The input u parameter value
380 : : //O output_position
381 : : //O- The output position
382 : : //- This function returns the coordinates of a point in the global
383 : : //- (world) space that corresponds to the input parametric position
384 : : //- in the local space.
385 : : //-
386 : : //- If the input parameter value is not defined for the Curve, then
387 : : //- the input CubitVector is not modified and CUBIT_FAILURE is
388 : : //- returned. Otherwise, position is appropriately modified and
389 : : //- CUBIT_SUCCESS is returned.
390 : : //-
391 : : //- If the curve is periodic, the input u_value is first "normalized"
392 : : //- to the fundamental period of the Curve before its position
393 : : //- in global space is determined.
394 : :
395 : : double u_from_arc_length ( double root_param,
396 : : double arc_length );
397 : : //R double
398 : : //R- Returned parameter value
399 : : //I root_param
400 : : //I- The parameter value of the "root point"
401 : : //I arc_length
402 : : //I- A distance along the Curve
403 : : //- This function returns the parameter value of the point that is
404 : : //- "arc_length" away from the root point in the
405 : : //- positive sense direction of the owning RefEdge.
406 : : //-
407 : : //- A negative value for distance would force the search to go in the
408 : : //- negative (sense) direction of the RefEdge.
409 : : //-
410 : : //- NOTE:
411 : : //- The important assumption that is made in this routine is that
412 : : //- the end points of the RefEdge that owns this Curve are the same
413 : : //- as the end points of the first solid model entity in the list of
414 : : //- solid model entities associated with this Curve.
415 : :
416 : : double fraction_from_arc_length(RefVertex *root_vertex,
417 : : double length);
418 : :
419 : : CubitStatus point_from_arc_length ( double root_param,
420 : : double arc_length,
421 : : CubitVector& new_point );
422 : : //- See below. This allows you to directly specify the starting parameter,
423 : : //- instead of it being determined from the root_point.
424 : :
425 : : CubitStatus point_from_arc_length ( const CubitVector& root_point,
426 : : double arc_length,
427 : : CubitVector& new_point );
428 : : //- Return a point arc_length distance from root_point
429 : : //- on this RefEdge.
430 : : //-
431 : : //- If arc_length is negative, the new point
432 : : //- is in the negative sense direction (along the RefEdge) from
433 : : //- the root point.
434 : : //-
435 : : //- If the curve is not periodic and the point arc_length away
436 : : //- from root_point in the appropriate direction goes beyond
437 : : //- the end point of the RefEdge, that end point is returned
438 : : //- as new_point.
439 : : //-
440 : : //- If the curve is periodic and the point arc_length away
441 : : //- from root_point in the appropriate direction goes beyond
442 : : //- the end point of the RefEdge, wrap around is done.
443 : : //-
444 : : //- NOTE: I have had problems with this function if the root point
445 : : //- is the start vertex, for some reason by a factor of 1e-7 the
446 : : //- parameter value is different between the start_param and the
447 : : //- parameter found from the start_vertex location. So I will switch
448 : : //- EdgeMeshTool to go off the start parameter instead of this function.
449 : :
450 : :
451 : : double length_from_u( double parameter1,
452 : : double parameter2 );
453 : : //R double arc length
454 : : //I double parameter1, parameter value of one end of arc
455 : : //I double parameter2, parameter value of the other end of arc
456 : : //
457 : : // Calculates, the distance along the curve between parameters
458 : : // parameter1 and parameter2.
459 : : //
460 : : // The order of the paramters does affect the result.
461 : : // That is, if parameter1 is closer to the start parameter,
462 : : // the result is positive. If parameter1 is closer to
463 : : // the end parameter, the result is negative.
464 : : //
465 : : // For periodic curves, the length is calculated along
466 : : // the curve in the diretion of increasing parameter value.
467 : : // Therefore, if the caller wants the length calculation
468 : : // to be in a direction that crosses the periodic break,
469 : : // the interval [parameter1, parameter2] should span a
470 : : // break point in the period.
471 : :
472 : :
473 : : CubitBoolean is_periodic();
474 : : //R CubitBoolean
475 : : //R- CUBIT_TRUE/CUBIT_FALSE
476 : : //- This function determines whether the underlying geometry of the
477 : : //- Curve is periodic or not. Returns CUBIT_TRUE if it is and
478 : : //- CUBIT_FALSE if it is not.
479 : :
480 : : CubitBoolean is_periodic( double& period);
481 : : //R CubitBoolean
482 : : //R- CUBIT_TRUE/CUBIT_FALSE
483 : : //O period
484 : : //O- Returned period value
485 : : //- This function determines whether the underlying geometry of the
486 : : //- Curve is periodic or not. Returns CUBIT_TRUE if it is and
487 : : //- CUBIT_FALSE if it is not.
488 : : //-
489 : : //- If it is periodic, then it returns the period in the input
490 : : //- reference variable, "period". This value is set to 0.0 if
491 : : //- the Curve is not periodic.
492 : :
493 : : int get_mark();
494 : : void set_mark( int set_value );
495 : : //- get/set generic 2-bit mark.
496 : :
497 : : CubitStatus relative_sense( RefEdge *ref_edge_ptr_2,
498 : : double tolerance_factor,
499 : : CubitSense *sense,
500 : : CubitBoolean &spatially_equal,
501 : : CubitBoolean force_merge = CUBIT_FALSE);
502 : : //- calculates the relative sense of two refedges and tries to
503 : : //- see if there are two points that are close on each edge (1/3 and 2/3
504 : : //- param value).
505 : :
506 : :
507 : : CubitBoolean about_spatially_equal( RefEdge* ref_edge_ptr_2,
508 : : double tolerance_factor = 1.0,
509 : : CubitSense* sensePtr = NULL,
510 : : CubitBoolean notify_refEntity =
511 : : CUBIT_FALSE );
512 : :
513 : : //R CubitBoolean
514 : : //R-CUBIT_TRUE/CUBIT_FALSE
515 : : //I RefEdge, double, CubitSense*, CubitBoolean
516 : : //I- Second RefEdge to compare, Tolerance factor to for GEOMETRY_RESABS,
517 : : //I- and flag for notifying compared RefEntities.
518 : : //O CubitSense*, and returned CubitBoolean.
519 : : //O- if the two refEdges are spatially equal within the GEOMETRY_RESABS*
520 : : //- the tolerance_factor, then CUBIT_TRUE will be returned. Otherwise
521 : : //- CUBIT_FALSE is returned. If there is a non-null sesnePtr sent in,
522 : : //- the sense pointer value will be assinged the relative sense of the
523 : : //- RefEdges, ie, CUBIT_FORWARD/CUBIT_REVERSED.
524 : : //- To do the comparison, the end points, 1/3 and 2/3 world
525 : : //- points are spatially compared.
526 : :
527 : : virtual int validate();
528 : : //- Check that entity is valid. Returns number of problems detected.
529 : :
530 : : CubitStatus evaluate_exterior_angle(double *exterior_angle);
531 : : //- Calculate the exterior angle between this curve and the
532 : : //- attached surfaces. This function assumes that the curve is
533 : : //- only attached to two (2) surfaces, otherwise it returns CUBIT_FAILURE;
534 : :
535 : :
536 : : //========= Add Code by SRS of Cat, 3/3/99 2:28:31 PM =========
537 : : CubitBoolean is_tolerant();
538 : : //- Returns CUBIT_TRUE if refedge is a tolerant edge. Tolerant
539 : : //- edges can be created in the healer if it is unable to
540 : : //- heal the edge.
541 : : //========= Code End by SRS of Cat, 3/3/99 2:28:31 PM =========
542 : :
543 : : CubitStatus get_graphics( GMem& polyline, double angle_tolerance=0,
544 : : double distance_tolerance=0,
545 : : double max_edge_length=0 );
546 : :
547 : : void reverse_tangent();
548 : :
549 : : static void suppress_edge_length_warning(bool flag);
550 : :
551 : :
552 : : protected:
553 : :
554 : : RefEdge(Curve* curvePtr) ;
555 : : //- The constructor with a pointer to a Curve.
556 : :
557 : : private:
558 : : void initialize();
559 : : //- Initializes all member data
560 : :
561 : : double get_lower_param_bound();
562 : : double get_upper_param_bound();
563 : : //- Get the parameter values at the start and end locations of
564 : : //- the RefEdge. If it is periodic, this is taken into account
565 : : //- and the lower and upper bounds of the period are returned.
566 : :
567 : : int refEdgeClone;
568 : :
569 : : cBit markedFlag : 2; //- generic flag, one or two bits?
570 : :
571 : : RefEdge( const RefEdge& );
572 : : void operator=( const RefEdge& );
573 : : static bool mSuppressEdgeLengthWarning;
574 : : };
575 : :
576 : : // ********** BEGIN HELPER CLASSES **********
577 : : // ********** END HELPER CLASSES **********
578 : :
579 : : // ********** BEGIN INLINE FUNCTIONS **********
580 : :
581 : : inline int
582 : : RefEdge::get_mark()
583 : : { return markedFlag; }
584 : :
585 : : inline void
586 : : RefEdge::set_mark( int set_value )
587 : : { markedFlag = set_value; }
588 : :
589 : : template <> struct DLIListSorter<RefEdge*>
590 : : {
591 : : bool operator()(RefEdge* a, RefEdge* b) { return a->id() < b->id(); }
592 : : };
593 : :
594 : :
595 : : // ********** END INLINE FUNCTIONS **********
596 : :
597 : : // ********** BEGIN FRIEND FUNCTIONS **********
598 : : // ********** END FRIEND FUNCTIONS **********
599 : :
600 : : // ********** BEGIN EXTERN FUNCTIONS **********
601 : : // ********** END EXTERN FUNCTIONS **********
602 : :
603 : : #endif
604 : :
|