00001 /* 00002 * Copyright (c) 1998 by Tech Soft 3D, LLC. 00003 * The information contained herein is confidential and proprietary to 00004 * Tech Soft 3D, LLC., and considered a trade secret as defined under 00005 * civil and criminal statutes. Tech Soft 3D shall pursue its civil 00006 * and criminal remedies in the event of unauthorized use or misappropriation 00007 * of its trade secrets. Use of this information by anyone other than 00008 * authorized employees of Tech Soft 3D, LLC. is granted only under a 00009 * written non-disclosure agreement, expressly prescribing the scope and 00010 * manner of such use. 00011 * 00012 * $Id: select_8h-source.html,v 1.29 2008-03-10 07:09:28 stage Exp $ 00013 */ 00014 00015 #ifndef SELECT_DEFINED 00016 00017 struct HT_Window_Tree { 00018 HT_Selection_Context alter *selection_context; 00019 HT_Window_Tree alter *underlying_sibling; 00020 HT_Window_Tree alter *children; 00021 HT_Window_Tree alter *parent; 00022 HT_Segment const *seg; 00023 bool treat_as_opaque; 00024 HT_Subsegment const *subseg; /* (for HT_Include Chains) */ 00025 HT_Rectangle window, 00026 visible_window; /* (after oversize removed) */ 00027 HT_Type_Flags selectability, 00028 restricted_selectability, 00029 even_invisible, 00030 visibility; 00031 }; 00032 00033 typedef int HT_Selection_Options; 00034 00035 #define Select_BY_AREA (HT_Selection_Options)0x0001 00036 #define Select_BY_VOLUME (HT_Selection_Options)0x0002 00037 #define Select_WORLD_SPACE (HT_Selection_Options)0x0004 00038 #define Select_POLYGON (HT_Selection_Options)0x0008 00039 #define Select_IGNORE_MODELLING (HT_Selection_Options)0x0010 00040 #define Select_CAMERA_WARNING (HT_Selection_Options)0x0020 00041 #define Select_VISUAL (HT_Selection_Options)0x0040 00042 00043 00044 struct HT_Selection_Segment_Level { 00045 HT_Selection_Segment_Level * next; 00046 HT_Segment const * segment; 00047 float zw, proximity; 00048 HT_Type_Flags typeflags; 00049 bool valid; 00050 }; 00051 00052 00053 00054 #define Owner_APERTURE 1 00055 #define Owner_VICTIM 2 00056 00057 struct HT_Selection_Context { 00058 HT_Display_Context alter *display_context; 00059 HT_Selection_Event alter *event; 00060 00061 float xw, 00062 yw; 00063 00064 float squared_radial_proximity;/* in cm? (squared!) */ 00065 HT_XY pixel_proximity; 00066 00067 HT_Volume bounding; 00068 HT_Point screen_crux; 00069 00070 int count; 00071 00072 HT_Point alter *screen_poly; 00073 HT_Vector alter *screen_vector; 00074 float alter *screen_scale; 00075 HT_Point centroid; 00076 HT_Wedge_Tree alter *wedge_tree; 00077 bool counter_clockwise; 00078 int wing_count; 00079 HT_Wing alter * alter *wing_array; 00080 00081 HT_Selection_Options options; 00082 HT_Include_Chain alter *current_include_chain; 00083 HT_Selection_Segment_Level *segment_level; 00084 int item_list_length; 00085 int related_selection_limit; 00086 HT_XY current_resolution; 00087 bool selection_aborted; 00088 bool brought_to_front; 00089 00090 bool hardware_visual_selection; 00091 00092 void alter *local_info; /* pass-through of extra data */ 00093 00094 struct { 00095 HT_Geometry const *geometry_in_progress; /* for detailed selection */ 00096 int current_offset; 00097 float best_prox, best_zw; 00098 int best_offset; 00099 int internal_limit; 00100 bool hit; 00101 HT_Selection_Extras *extras; 00102 HT_Selection_Extras **extras_linker; 00103 int extras_count; 00104 } detail; 00105 00106 }; 00107 00108 00109 00110 #ifndef TANDT_DEFINED 00111 #include "tandt.h" 00112 #endif 00113 00114 struct HT_Best_Hit { 00115 float prox; 00116 HT_DC_Point const *vertex1; 00117 HT_DC_Point const *vertex2; 00118 int face; 00119 float zw; 00120 }; 00121 00122 struct HT_PH_Selection_Info { 00123 HT_Selection_Context *sc; 00124 HT_Polyhedron const *polyhedron; 00125 HT_DC_Point *dc_points; 00126 float *ws; 00127 HT_Clip_Case *clip_case; 00128 HT_Best_Hit best_edge_hit, 00129 best_face_hit, 00130 best_vertex_hit; 00131 bool face_hit_made, 00132 edge_hit_made, 00133 vertex_hit_made; 00134 HT_Selection_Extras *extras; 00135 HT_Selection_Extras **extras_linker; 00136 int extras_count; 00137 bool multiple_selections; 00138 bool skip_details; 00139 }; 00140 00141 00142 #define SELECT_DEFINED 00143 #endif