iepoly.h

Go to the documentation of this file.
00001 /**********************************************************************
00002  *<
00003     FILE: iEPoly.h
00004 
00005     DESCRIPTION:   Editable Polygon Mesh Object SDK Interface
00006 
00007     CREATED BY: Steve Anderson
00008 
00009     HISTORY: created March 2000
00010 
00011  *> Copyright (c) 2000, All Rights Reserved.
00012  **********************************************************************/
00013 #pragma once
00014 
00015 #include "iFnPub.h"
00016 #include "point3.h"
00017 #include "mesh.h"
00018 #include "mnmesh.h"
00019 #include "color.h"
00020 // forward declarations
00021 class MNMesh;
00022 class INodeTab;
00023 class IParamBlock2;
00024 
00025 
00026 // Editable Poly Selection Levels
00027 enum ePolySelLevel { EP_SL_OBJECT, EP_SL_VERTEX, EP_SL_EDGE, 
00028     EP_SL_BORDER, EP_SL_FACE, EP_SL_ELEMENT, EP_SL_CURRENT };
00029 
00030 // Editable Poly Parameters:
00031 enum epolyParameters { ep_by_vertex, ep_ignore_backfacing, ep_show_normals,
00032     ep_normal_size, ep_ss_use, ep_ss_retro, ep_ss_edist_use, ep_ss_edist,
00033     ep_ss_affect_back, ep_ss_falloff, ep_ss_pinch, ep_ss_bubble,
00034     ep_extrusion_type, ep_split, ep_refine_ends, ep_weld_threshold,
00035     ep_weld_pixels, ep_ms_smoothness, ep_ms_smooth, ep_ms_sep_smooth,
00036     ep_ms_sep_mat, ep_tess_type, ep_tess_tension, ep_surf_subdivide,
00037     ep_surf_ig_sel, ep_surf_iter, ep_surf_thresh, ep_surf_riter,
00038     ep_surf_rthresh, ep_surf_use_riter, ep_surf_use_rthresh,
00039     ep_surf_sep_smooth, ep_surf_sep_mat, ep_surf_update,
00040     ep_vert_sel_color, ep_vert_selc_r, ep_vert_selc_g, ep_vert_selc_b,
00041     ep_face_smooth_thresh, ep_vert_color_selby,
00042     ep_sd_use, ep_sd_split_mesh, ep_sd_method, ep_sd_tess_steps,
00043     ep_sd_tess_edge, ep_sd_tess_distance, ep_sd_tess_angle, ep_sd_view_dependent,
00044     ep_asd_style, ep_asd_min_iters, ep_asd_max_iters, ep_asd_max_tris,
00045     ep_surf_subdiv_smooth, ep_face_extrude_height, ep_bevel_outline,
00046     ep_vertex_chamfer, ep_cut_start_level, ep_cut_start_index,
00047     ep_cut_start_coords, ep_cut_end_coords, ep_cut_normal,
00048     ep_interactive_full, ep_vertex_extrude_width, ep_lift_angle, ep_lift_edge, 
00049     ep_lift_segments, ep_connect_edge_segments, ep_slide_edge_direction,
00050     ep_slide_edge_start, ep_extrude_spline_node, ep_extrude_spline_segments,
00051     ep_extrude_spline_taper, ep_extrude_spline_taper_curve, ep_extrude_spline_twist,
00052     ep_extrude_spline_rotation, ep_inset, ep_inset_type, ep_constrain_type,
00053     ep_extrude_spline_align, ep_show_cage, ep_bevel_height, ep_vertex_extrude_height,
00054     ep_edge_extrude_height, ep_edge_extrude_width, ep_outline, ep_edge_chamfer, 
00055     ep_bevel_type, ep_edge_weld_threshold, ep_surf_isoline_display,
00056     ep_delete_isolated_verts, ep_preserve_maps,
00057 
00058     // Paint tools
00059     ep_ss_lock,
00060     ep_paintsel_value, ep_paintsel_size, ep_paintsel_strength,
00061     ep_paintdeform_value, ep_paintdeform_size, ep_paintdeform_strength,
00062     ep_paintdeform_axis,
00063 
00064     // New parameters in 7.0:
00065     ep_bridge_taper, ep_bridge_bias, ep_bridge_segments, ep_bridge_smooth_thresh,
00066     // Target 1 and target 2 contain either edge or face indices, in 1-based indexing.
00067     // Value of 0 indicates not yet set.
00068     ep_bridge_target_1, ep_bridge_target_2, ep_bridge_twist_1, ep_bridge_twist_2,
00069     ep_bridge_selected,
00070     ep_relax_amount, ep_relax_iters, ep_relax_hold_boundary, ep_relax_hold_outer,
00071     ep_select_by_angle, ep_select_angle,
00072 
00073     //new params for 8.0
00074     ep_bridge_adjacent,
00075     ep_vertex_chamfer_open,
00076     ep_edge_chamfer_open,
00077     ep_bridge_reverse_triangle,
00078     ep_connect_edge_pinch,
00079     ep_connect_edge_slide,
00080     ep_ring_edge_sel,
00081     ep_loop_edge_sel,
00082     ep_vertex_break,
00083     ep_cage_color,
00084     ep_selected_cage_color,
00085     ep_cage_color_changed,
00086     ep_selected_cage_color_changed,
00087     ep_paintsel_mode,
00088     ep_paintdeform_mode,
00089 
00090     //new params for 9.5
00091     ep_edge_chamfer_segments,
00092 
00093     //new for 10.0
00094     ep_select_mode              // BOOL     -  the select mode that we are in, none, sub object, or multi.
00095 };
00096 
00097 // Editable Poly Operations:
00098 enum epolyButtonOp { epop_hide, epop_unhide, epop_ns_copy, epop_ns_paste,
00099     epop_cap, epop_delete, epop_detach, epop_attach_list, epop_split,
00100     epop_break, epop_collapse, epop_reset_plane, epop_slice, epop_weld_sel,
00101     epop_create_shape, epop_make_planar, epop_align_grid, epop_align_view,
00102     epop_remove_iso_verts,
00103     epop_meshsmooth, epop_tessellate, epop_update, epop_selby_vc,
00104     epop_retriangulate, epop_flip_normals, epop_selby_matid, epop_selby_smg,
00105     epop_autosmooth, epop_clear_smg, epop_bevel, epop_chamfer, epop_cut,
00106     epop_null, epop_sel_grow, epop_sel_shrink, epop_inset, epop_extrude,
00107     epop_extrude_along_spline, epop_connect_edges, epop_connect_vertices,
00108     epop_lift_from_edge, epop_select_ring, epop_select_loop,
00109     epop_remove_iso_map_verts, epop_remove, epop_outline,
00110     epop_toggle_shaded_faces, epop_hide_unsel,
00111 
00112     // New operations in 7.0:
00113     epop_bridge_border, epop_bridge_polygon, epop_make_planar_x, epop_make_planar_y,
00114     epop_make_planar_z, epop_relax,
00115 
00116     // New operation in 8.0
00117     epop_bridge_edge,
00118     //11.0
00119     epop_selby_matidfloater,    // select id coming from the floater
00120     //12.0
00121     epop_preserve_uv_settings   // Launch Preserve UV Settings Dialog
00122 };
00123 
00124 // Editable Poly Command modes:
00125 enum epolyCommandMode { epmode_create_vertex, epmode_create_edge,
00126     epmode_create_face, epmode_divide_edge, epmode_divide_face,
00127     epmode_extrude_vertex, epmode_extrude_edge,
00128     epmode_extrude_face, epmode_chamfer_vertex, epmode_chamfer_edge,
00129     epmode_bevel, epmode_sliceplane, epmode_cut_vertex, epmode_cut_edge,
00130     epmode_cut_face, epmode_weld, epmode_edit_tri, epmode_inset_face,
00131     epmode_quickslice, epmode_lift_from_edge, epmode_pick_lift_edge,
00132     epmode_outline,
00133 
00134     // New command modes in 7.0:
00135     epmode_bridge_border, epmode_bridge_polygon,
00136     epmode_pick_bridge_1, epmode_pick_bridge_2,
00137     epmode_turn_edge,
00138 
00139     // new command modes in 8.0
00140     epmode_bridge_edge,
00141 
00143     epmode_edit_ss
00144 };
00145 
00146 // Editable Poly Pick modes:
00147 enum epolyPickMode { epmode_attach, epmode_pick_shape };
00148 
00149 // ---- from here on, everything is used in Editable Poly, but not in Edit Poly ----
00150 
00151 // Enum our enums, for use in the function publishing interface description
00152 enum epolyEnumList { epolyEnumButtonOps, epolyEnumCommandModes, epolyEnumPickModes,
00153     ePolySelLevel, PMeshSelLevel, axisEnum, mapChannelEnum };
00154 
00155 #define EPOLY_INTERFACE Interface_ID( 0x092779, 0x634020)
00156 
00157 #define GetEPolyInterface(cd) (EPoly *)(cd)->GetInterface(EPOLY_INTERFACE)
00158 
00159 // "Mixin" Interface methods:
00160 enum ePolyMethods { epfn_hide, epfn_unhide_all, epfn_named_selection_copy,
00161     epfn_named_selection_paste, epfn_create_vertex, epfn_create_edge,
00162     epfn_create_face, epfn_cap_holes, epfn_delete, epfn_attach, epfn_multi_attach,
00163     epfn_detach_to_element, epfn_detach_to_object, epfn_split_edges,
00164     epfn_break_verts, epfn_divide_face, epfn_divide_edge,
00165     epfn_collapse, epfn_extrude_faces, epfn_bevel_faces,
00166     epfn_chamfer_vertices, epfn_chamfer_edges, epfn_slice, epfn_cut_vertex,
00167     epfn_cut_edge, epfn_cut_face, epfn_weld_verts, epfn_weld_edges,
00168     epfn_weld_flagged_verts, epfn_weld_flagged_edges, epfn_create_shape,
00169     epfn_make_planar, epfn_move_to_plane, epfn_align_to_grid, epfn_align_to_view,
00170     epfn_delete_iso_verts, epfn_meshsmooth,
00171     epfn_tessellate, epfn_set_diagonal, epfn_retriangulate,
00172     epfn_flip_normals, epfn_select_by_mat, epfn_select_by_smooth_group,
00173     epfn_autosmooth, epfn_in_slice_plane_mode, epfn_force_subdivision,
00174     epfn_button_op, epfn_toggle_command_mode, epfn_enter_pick_mode,
00175     epfn_exit_command_modes,
00176     // Flag Accessors:
00177     epfn_get_vertices_by_flag, epfn_get_edges_by_flag, epfn_get_faces_by_flag,
00178     epfn_set_vertex_flags, epfn_set_edge_flags, epfn_set_face_flags,
00179     // Data accessors:
00180     epfn_reset_slice_plane, epfn_set_slice_plane, epfn_get_slice_plane,
00181     epfn_get_vertex_color, epfn_set_vertex_color, epfn_get_face_color,
00182     epfn_set_face_color, epfn_get_vertex_data, epfn_get_edge_data,
00183     epfn_set_vertex_data, epfn_set_edge_data, epfn_reset_vertex_data,
00184     epfn_reset_edge_data, epfn_begin_modify_perdata, 
00185     epfn_in_modify_perdata, epfn_end_modify_perdata,
00186     epfn_begin_modify_vertex_color, epfn_in_modify_vertex_color,
00187     epfn_end_modify_vertex_color,
00188     epfn_get_mat_index, epfn_set_mat_index,
00189     epfn_get_smoothing_groups, epfn_set_smoothing_groups,
00190     // other things...
00191     epfn_collapse_dead_structs, /*epfn_apply_delta,*/ epfn_propagate_component_flags,
00192 
00193     // New for Luna:
00194     // Preview mode access:
00195     epfn_preview_clear, epfn_preview_begin, epfn_preview_cancel, epfn_preview_accept,
00196     epfn_preview_invalidate, epfn_preview_on, epfn_preview_set_dragging, epfn_preview_get_dragging,
00197 
00198     // Popup dialog access:
00199     epfn_popup_dialog, epfn_close_popup_dialog,
00200 
00201     // Other new stuff:
00202     epfn_repeat_last, epfn_grow_selection, epfn_shrink_selection, epfn_convert_selection,
00203     epfn_select_border, epfn_select_element, epfn_select_edge_loop, epfn_select_edge_ring,
00204     epfn_remove, epfn_delete_iso_map_verts, epfn_outline, epfn_connect_edges,
00205     epfn_connect_vertices, epfn_extrude_along_spline, epfn_lift_from_edge,
00206     epfn_toggle_shaded_faces,
00207 
00208     // Access to selections:
00209     epfn_get_epoly_sel_level, epfn_get_mn_sel_level, epfn_get_selection, epfn_set_selection,
00210 
00211     // Access to information about mesh:
00212     epfn_get_num_vertices, epfn_get_vertex, epfn_get_vertex_face_count, epfn_get_vertex_face,
00213     epfn_get_vertex_edge_count, epfn_get_vertex_edge, epfn_get_num_edges, epfn_get_edge_vertex,
00214     epfn_get_edge_face, epfn_get_num_faces, epfn_get_face_degree, epfn_get_face_vertex,
00215     epfn_get_face_edge, epfn_get_face_material, epfn_get_face_smoothing_group,
00216     epfn_get_num_map_channels, epfn_get_map_channel_active,
00217     epfn_get_num_map_vertices, epfn_get_map_vertex, epfn_get_map_face_vertex,
00218 
00219     // All right all ready
00220     epfn_collapse_dead_structs_spelled_right, epfn_get_map_face_vert,
00221 
00222     // New published functions in 7.0:
00223     epfn_get_preserve_map, epfn_set_preserve_map,
00224     epfn_bridge, epfn_ready_to_bridge_selected, epfn_turn_diagonal,
00225     epfn_relax, epfn_make_planar_in,
00226 
00227     // new function in 8.0 
00228     epfn_chamfer_vertices_open,
00229     epfn_chamfer_edges_open,
00230     epfn_set_ring_shift,
00231     epfn_set_loop_shift,
00232     epfn_convert_selection_to_border,
00233     epfn_paintdeform_commit,
00234     epfn_paintdeform_cancel,
00235 
00236     epfn_set_cache_systemon,epfn_get_cache_systemoff,
00237     epfn_set_cache_suspend_dxcache,epfn_get_cache_suspend_dxcache,
00238     epfn_set_cache_cutoff_count,epfn_get_cache_cutoff_count,
00239 
00240     epfn_get_command_mode,
00241     epfn_get_pick_mode,
00242 
00243     epfn_matid_floater,epfn_matid_floatervisible,
00244     epfn_smgrp_floater,epfn_smgrp_floatervisible
00245 };
00246 
00256 #pragma warning(push)
00257 #pragma warning(disable:4100)
00258 class EPoly : public FPMixinInterface {
00259 public:
00260     #pragma warning(push)
00261     #pragma warning(disable:4238)
00262     BEGIN_FUNCTION_MAP
00263         FN_2(epfn_hide, TYPE_bool, EpfnHide, TYPE_INT, TYPE_DWORD);
00264         FN_1(epfn_unhide_all, TYPE_bool, EpfnUnhideAll, TYPE_INT);
00265         VFN_1(epfn_named_selection_copy, EpfnNamedSelectionCopy, TYPE_STRING);
00266         VFN_1(epfn_named_selection_paste, EpfnNamedSelectionPaste, TYPE_bool);
00267         FN_3(epfn_create_vertex, TYPE_INDEX, EpfnCreateVertex, TYPE_POINT3, TYPE_bool, TYPE_bool);
00268         FN_3(epfn_create_edge, TYPE_INDEX, EpfnCreateEdge, TYPE_INDEX, TYPE_INDEX, TYPE_bool);
00269         FN_2(epfn_create_face, TYPE_INDEX, EpfnCreateFace2, TYPE_INDEX_TAB, TYPE_bool); // switching in createFace2, because CreateFace wasn't working here.
00270         FN_2(epfn_cap_holes, TYPE_bool, EpfnCapHoles, TYPE_INT, TYPE_DWORD);
00271         FN_3(epfn_delete, TYPE_bool, EpfnDelete, TYPE_INT, TYPE_DWORD, TYPE_bool);
00272         VFNT_2(epfn_attach, EpfnAttach, TYPE_INODE, TYPE_INODE);
00273         //VFNT_2(epfn_multi_attach, EpfnMultiAttach, TYPE_INODE_TAB, TYPE_INODE);
00274         FN_3(epfn_detach_to_element, TYPE_bool, EpfnDetachToElement, TYPE_INT, TYPE_DWORD, TYPE_bool);
00275         //FNT_5(epfn_detach_to_object, TYPE_bool, EpfnDetachToObject, TYPE_STRING, TYPE_INT, TYPE_DWORD, TYPE_bool, TYPE_INODE_BP);
00276         FN_1(epfn_split_edges, TYPE_bool, EpfnSplitEdges, TYPE_DWORD);
00277         FN_1(epfn_break_verts, TYPE_bool, EpfnBreakVerts, TYPE_DWORD);
00278         FN_3(epfn_divide_face, TYPE_INDEX, EpfnDivideFace, TYPE_INDEX, TYPE_FLOAT_TAB_BR, TYPE_bool);
00279         FN_3(epfn_divide_edge, TYPE_INDEX, EpfnDivideEdge, TYPE_INDEX, TYPE_FLOAT, TYPE_bool);
00280         FN_2(epfn_collapse, TYPE_bool, EpfnCollapse, TYPE_INT, TYPE_DWORD);
00281         VFNT_2(epfn_extrude_faces, EpfnExtrudeFaces, TYPE_FLOAT, TYPE_DWORD);
00282         VFNT_3(epfn_bevel_faces, EpfnBevelFaces, TYPE_FLOAT, TYPE_FLOAT, TYPE_DWORD);
00283         VFNT_1(epfn_chamfer_vertices, EpfnChamferVertices, TYPE_FLOAT);
00284         VFNT_1(epfn_chamfer_edges, EpfnChamferEdges, TYPE_FLOAT);
00285         FN_4(epfn_slice, TYPE_bool, EpfnSlice, TYPE_POINT3, TYPE_POINT3, TYPE_bool, TYPE_DWORD);
00286         FN_0(epfn_in_slice_plane_mode, TYPE_bool, EpfnInSlicePlaneMode);
00287         FN_3(epfn_cut_vertex, TYPE_INDEX, EpfnCutVertex, TYPE_INDEX, TYPE_POINT3, TYPE_POINT3);
00288         FN_5(epfn_cut_edge, TYPE_INDEX, EpfnCutEdge, TYPE_INDEX, TYPE_FLOAT, TYPE_INDEX, TYPE_FLOAT, TYPE_POINT3);
00289         FN_4(epfn_cut_face, TYPE_INDEX, EpfnCutFace, TYPE_INDEX, TYPE_POINT3, TYPE_POINT3, TYPE_POINT3);
00290         FN_3(epfn_weld_verts, TYPE_bool, EpfnWeldVerts, TYPE_INDEX, TYPE_INDEX, TYPE_POINT3);
00291         FN_2(epfn_weld_edges, TYPE_bool, EpfnWeldEdges, TYPE_INDEX, TYPE_INDEX);
00292         FN_1(epfn_weld_flagged_verts, TYPE_bool, EpfnWeldFlaggedVerts, TYPE_DWORD);
00293         FN_1(epfn_weld_flagged_edges, TYPE_bool, EpfnWeldFlaggedEdges, TYPE_DWORD);
00294         FN_4(epfn_create_shape, TYPE_bool, EpfnCreateShape, TYPE_STRING, TYPE_bool, TYPE_INODE, TYPE_DWORD);
00295         FNT_2(epfn_make_planar, TYPE_bool, EpfnMakePlanar, TYPE_INT, TYPE_DWORD);
00296         FNT_4(epfn_move_to_plane, TYPE_bool, EpfnMoveToPlane, TYPE_POINT3, TYPE_FLOAT, TYPE_INT, TYPE_DWORD);
00297         FN_2(epfn_align_to_grid, TYPE_bool, EpfnAlignToGrid, TYPE_INT, TYPE_DWORD);
00298         FN_2(epfn_align_to_view, TYPE_bool, EpfnAlignToView, TYPE_INT, TYPE_DWORD);
00299         FN_0(epfn_delete_iso_verts, TYPE_bool, EpfnDeleteIsoVerts);
00300         FN_2(epfn_meshsmooth, TYPE_bool, EpfnMeshSmooth, TYPE_INT, TYPE_DWORD );
00301         FN_2(epfn_tessellate, TYPE_bool, EpfnTessellate, TYPE_INT, TYPE_DWORD );
00302         VFN_0(epfn_force_subdivision, EpfnForceSubdivision);
00303         VFN_3(epfn_set_diagonal, EpfnSetDiagonal, TYPE_INDEX, TYPE_INDEX, TYPE_INDEX);
00304         FN_1(epfn_retriangulate, TYPE_bool, EpfnRetriangulate, TYPE_DWORD);
00305         FN_1(epfn_flip_normals, TYPE_bool, EpfnFlipNormals, TYPE_DWORD);
00306         VFNT_2(epfn_select_by_mat, EpfnSelectByMat, TYPE_INDEX, TYPE_bool);
00307         VFNT_2(epfn_select_by_smooth_group, EpfnSelectBySmoothGroup, TYPE_DWORD, TYPE_bool);
00308         VFNT_0(epfn_autosmooth, EpfnAutoSmooth);
00309 
00310         VFN_1(epfn_button_op, EpActionButtonOp, TYPE_ENUM);
00311         VFN_1(epfn_toggle_command_mode, EpActionToggleCommandMode, TYPE_ENUM);
00312         FN_0(epfn_get_command_mode, TYPE_ENUM, EpActionGetCommandMode);
00313         VFN_1(epfn_enter_pick_mode, EpActionEnterPickMode, TYPE_ENUM);
00314         FN_0(epfn_get_pick_mode, TYPE_ENUM, EpActionGetPickMode);
00315         VFN_0(epfn_exit_command_modes, EpActionExitCommandModes);
00316 
00317         // Flag accessors:
00318         FN_3(epfn_get_vertices_by_flag, TYPE_bool, EpGetVerticesByFlag, TYPE_BITARRAY_BR, TYPE_DWORD, TYPE_DWORD);
00319         FN_3(epfn_get_edges_by_flag, TYPE_bool, EpGetEdgesByFlag, TYPE_BITARRAY_BR, TYPE_DWORD, TYPE_DWORD);
00320         FN_3(epfn_get_faces_by_flag, TYPE_bool, EpGetFacesByFlag, TYPE_BITARRAY_BR, TYPE_DWORD, TYPE_DWORD);
00321 
00322         VFN_4(epfn_set_vertex_flags, EpSetVertexFlags, TYPE_BITARRAY_BR, TYPE_DWORD, TYPE_DWORD, TYPE_bool);
00323         VFN_4(epfn_set_edge_flags, EpSetEdgeFlags, TYPE_BITARRAY_BR, TYPE_DWORD, TYPE_DWORD, TYPE_bool);
00324         VFN_4(epfn_set_face_flags, EpSetFaceFlags, TYPE_BITARRAY_BR, TYPE_DWORD, TYPE_DWORD, TYPE_bool);
00325 
00326         // Data accessors:
00327         VFN_0(epfn_reset_slice_plane, EpResetSlicePlane);
00328         VFN_3(epfn_get_slice_plane, EpGetSlicePlane, TYPE_POINT3_BR, TYPE_POINT3_BR, TYPE_FLOAT_BP);
00329         VFN_3(epfn_set_slice_plane, EpSetSlicePlane, TYPE_POINT3_BR, TYPE_POINT3_BR, TYPE_FLOAT);
00330         FNT_4(epfn_get_vertex_data, TYPE_FLOAT, GetVertexDataValue, TYPE_INT, TYPE_INT_BP, TYPE_bool_BP, TYPE_DWORD);
00331         FNT_4(epfn_get_edge_data, TYPE_FLOAT, GetEdgeDataValue, TYPE_INT, TYPE_INT_BP, TYPE_bool_BP, TYPE_DWORD);
00332         VFNT_3(epfn_set_vertex_data, SetVertexDataValue, TYPE_INT, TYPE_FLOAT, TYPE_DWORD);
00333         VFNT_3(epfn_set_edge_data, SetEdgeDataValue, TYPE_INT, TYPE_FLOAT, TYPE_DWORD);
00334         VFN_1(epfn_reset_vertex_data, ResetVertexData, TYPE_INT);
00335         VFN_1(epfn_reset_edge_data, ResetEdgeData, TYPE_INT);
00336         VFN_2(epfn_begin_modify_perdata, BeginPerDataModify, TYPE_INT, TYPE_INT);
00337         FN_0(epfn_in_modify_perdata, TYPE_bool, InPerDataModify);
00338         VFN_1(epfn_end_modify_perdata, EndPerDataModify, TYPE_bool);
00339         FN_1(epfn_get_vertex_color, TYPE_COLOR_BV, EpFnGetVertexColor, TYPE_ENUM);
00340         VFN_2(epfn_set_vertex_color, EpFnSetVertexColor, TYPE_COLOR, TYPE_ENUM); //color map channel
00341         FN_1(epfn_get_face_color, TYPE_COLOR_BV, EpFnGetFaceColor, TYPE_ENUM);
00342         VFN_2(epfn_set_face_color, EpFnSetFaceColor, TYPE_COLOR, TYPE_ENUM); //color map channel
00343         //VFN_1(epfn_begin_modify_vertex_color, BeginVertexColorModify, TYPE_INT);
00344         //FN_0(epfn_in_modify_vertex_color, TYPE_bool, InVertexColorModify);
00345         //VFN_1(epfn_end_modify_vertex_color, EndVertexColorModify, TYPE_bool);
00346         FN_1(epfn_get_mat_index, TYPE_INDEX, GetMatIndex, TYPE_bool_BP);
00347         VFN_2(epfn_set_mat_index, SetMatIndex, TYPE_INDEX, TYPE_DWORD);
00348         VFN_3(epfn_get_smoothing_groups, GetSmoothingGroups, TYPE_DWORD, TYPE_DWORD_BP, TYPE_DWORD_BP);
00349         VFN_3(epfn_set_smoothing_groups, SetSmoothBits, TYPE_DWORD, TYPE_DWORD, TYPE_DWORD);
00350 
00351         VFN_0(epfn_collapse_dead_structs, CollapseDeadStructs);
00352         VFN_0(epfn_collapse_dead_structs_spelled_right, CollapseDeadStructs);
00353 //      VFNT_2(epfn_apply_delta, ApplyDelta, TYPE_POINT3_TAB_BR, TYPE_IOBJECT); // no type corresponding to Tab<Point3>
00354         FN_7(epfn_propagate_component_flags, TYPE_INT, EpfnPropagateComponentFlags, TYPE_INT, TYPE_DWORD, TYPE_INT, TYPE_DWORD, TYPE_bool, TYPE_bool, TYPE_bool);
00355 
00356         VFN_1 (epfn_preview_begin, EpPreviewBegin, TYPE_ENUM);
00357         VFN_0 (epfn_preview_cancel, EpPreviewCancel);
00358         VFN_0 (epfn_preview_accept, EpPreviewAccept);
00359         VFN_0 (epfn_preview_invalidate, EpPreviewInvalidate);
00360         FN_0 (epfn_preview_on, TYPE_bool, EpPreviewOn);
00361         VFN_1 (epfn_preview_set_dragging, EpPreviewSetDragging, TYPE_bool);
00362         FN_0 (epfn_preview_get_dragging, TYPE_bool, EpPreviewGetDragging);
00363 
00364         FN_1 (epfn_popup_dialog, TYPE_bool, EpfnPopupDialog, TYPE_ENUM);
00365         VFN_0 (epfn_close_popup_dialog, EpfnClosePopupDialog);
00366 
00367         VFN_0 (epfn_repeat_last, EpfnRepeatLastOperation);
00368         VFN_1 (epfn_grow_selection, EpfnGrowSelection, TYPE_ENUM);
00369         VFN_1 (epfn_shrink_selection, EpfnShrinkSelection, TYPE_ENUM);
00370         FN_3 (epfn_convert_selection, TYPE_INT, EpfnConvertSelection, TYPE_ENUM, TYPE_ENUM, TYPE_bool);
00371         VFN_0 (epfn_select_border, EpfnSelectBorder);
00372         VFN_0 (epfn_select_element, EpfnSelectElement);
00373         VFN_0 (epfn_select_edge_loop, EpfnSelectEdgeLoop);
00374         VFN_0 (epfn_select_edge_ring, EpfnSelectEdgeRing);
00375         FN_2 (epfn_remove, TYPE_bool, EpfnRemove, TYPE_ENUM, TYPE_DWORD);
00376         FN_0 (epfn_delete_iso_map_verts, TYPE_bool, EpfnDeleteIsoMapVerts);
00377         FN_1 (epfn_outline, TYPE_bool, EpfnOutline, TYPE_DWORD);
00378         FN_1 (epfn_connect_edges, TYPE_bool, EpfnConnectEdges, TYPE_DWORD);
00379         FN_1 (epfn_connect_vertices, TYPE_bool, EpfnConnectVertices, TYPE_DWORD);
00380         FN_1 (epfn_extrude_along_spline, TYPE_bool, EpfnExtrudeAlongSpline, TYPE_DWORD);
00381         FN_1 (epfn_lift_from_edge, TYPE_bool, EpfnLiftFromEdge, TYPE_DWORD);
00382         VFN_0 (epfn_toggle_shaded_faces, EpfnToggleShadedFaces);
00383 
00384         FN_0 (epfn_get_epoly_sel_level, TYPE_ENUM, GetEPolySelLevel);
00385         FN_0 (epfn_get_mn_sel_level, TYPE_ENUM, GetMNSelLevel);
00386 
00387         FN_1 (epfn_get_selection, TYPE_BITARRAY, EpfnGetSelection, TYPE_ENUM);
00388         VFN_2 (epfn_set_selection, EpfnSetSelection, TYPE_ENUM, TYPE_BITARRAY);
00389 
00390         FN_0 (epfn_get_num_vertices, TYPE_INT, EpfnGetNumVertices);
00391         FN_1 (epfn_get_vertex, TYPE_POINT3_BV, EpfnGetVertex, TYPE_INDEX);
00392         FN_1 (epfn_get_vertex_face_count, TYPE_INT, EpfnGetVertexFaceCount, TYPE_INDEX);
00393         FN_2 (epfn_get_vertex_face, TYPE_INDEX, EpfnGetVertexFace, TYPE_INDEX, TYPE_INDEX);
00394         FN_1 (epfn_get_vertex_edge_count, TYPE_INT, EpfnGetVertexEdgeCount, TYPE_INDEX);
00395         FN_2 (epfn_get_vertex_edge, TYPE_INDEX, EpfnGetVertexEdge, TYPE_INDEX, TYPE_INDEX);
00396 
00397         FN_0 (epfn_get_num_edges, TYPE_INT, EpfnGetNumEdges);
00398         FN_2 (epfn_get_edge_vertex, TYPE_INDEX, EpfnGetEdgeVertex, TYPE_INDEX, TYPE_INDEX);
00399         FN_2 (epfn_get_edge_face, TYPE_INDEX, EpfnGetEdgeFace, TYPE_INDEX, TYPE_INDEX);
00400 
00401         FN_0 (epfn_get_num_faces, TYPE_INT, EpfnGetNumFaces);
00402         FN_1 (epfn_get_face_degree, TYPE_INT, EpfnGetFaceDegree, TYPE_INDEX);
00403         FN_2 (epfn_get_face_vertex, TYPE_INDEX, EpfnGetFaceVertex, TYPE_INDEX, TYPE_INDEX);
00404         FN_2 (epfn_get_face_edge, TYPE_INDEX, EpfnGetFaceEdge, TYPE_INDEX, TYPE_INDEX);
00405         FN_1 (epfn_get_face_material, TYPE_INDEX, EpfnGetFaceMaterial, TYPE_INDEX);
00406         FN_1 (epfn_get_face_smoothing_group, TYPE_DWORD, EpfnGetFaceSmoothingGroup, TYPE_INDEX);
00407 
00408         FN_0 (epfn_get_num_map_channels, TYPE_INT, EpfnGetNumMapChannels);
00409         FN_1 (epfn_get_map_channel_active, TYPE_bool, EpfnGetMapChannelActive, TYPE_INT);
00410         FN_1 (epfn_get_num_map_vertices, TYPE_INT, EpfnGetNumMapVertices, TYPE_INT);
00411         FN_2 (epfn_get_map_vertex, TYPE_POINT3_BV, EpfnGetMapVertex, TYPE_INT, TYPE_INDEX);
00412         FN_3 (epfn_get_map_face_vertex, TYPE_INT, EpfnGetMapFaceVertex, TYPE_INT, TYPE_INDEX, TYPE_INDEX);
00413         FN_3 (epfn_get_map_face_vert, TYPE_INDEX, EpfnGetMapFaceVertex, TYPE_INT, TYPE_INDEX, TYPE_INDEX);
00414 
00415         // New functionality in 7.0:
00416         FN_2 (epfn_bridge, TYPE_bool, EpfnBridge, TYPE_ENUM, TYPE_DWORD);
00417         FN_2 (epfn_ready_to_bridge_selected, TYPE_bool, EpfnReadyToBridgeFlagged, TYPE_ENUM, TYPE_DWORD);
00418         FN_2 (epfn_turn_diagonal, TYPE_bool, EpfnTurnDiagonal, TYPE_INDEX, TYPE_INDEX);
00419         FNT_2 (epfn_relax, TYPE_bool, EpfnRelax, TYPE_ENUM, TYPE_DWORD);
00420         FNT_3 (epfn_make_planar_in, TYPE_bool, EpfnMakePlanarIn, TYPE_ENUM, TYPE_ENUM, TYPE_DWORD);
00421 
00422         FN_1(epfn_get_preserve_map, TYPE_bool, EpfnGetPreserveMap, TYPE_INT);
00423         VFN_2(epfn_set_preserve_map, EpfnSetPreserveMap, TYPE_INT, TYPE_bool);
00424 
00425         //Added in Max 8 - Removed from EPoly8
00426         VFNT_2(epfn_chamfer_vertices_open, EpfnChamferVerticesOpen, TYPE_FLOAT,TYPE_bool);
00427         VFNT_2(epfn_chamfer_edges_open, EpfnChamferEdgesOpen, TYPE_FLOAT,TYPE_bool);
00428         VFN_3(epfn_set_ring_shift, EpfnSetRingShift, TYPE_INT, TYPE_bool, TYPE_bool);
00429         VFN_3(epfn_set_loop_shift, EpfnSetLoopShift, TYPE_INT, TYPE_bool, TYPE_bool);
00430         FN_2 (epfn_convert_selection_to_border, TYPE_INT, EpfnConvertSelectionToBorder, TYPE_ENUM, TYPE_ENUM);
00431         VFN_0(epfn_paintdeform_commit,EpfnPaintDeformCommit);
00432         VFN_0(epfn_paintdeform_cancel,EpfnPaintDeformCancel);
00433 
00434         VFN_0(epfn_smgrp_floater, SmGrpFloater);
00435         FN_0(epfn_smgrp_floatervisible,TYPE_BOOL, SmGrpFloaterVisible);
00436         
00437         VFN_0(epfn_matid_floater, MatIDFloater);
00438         FN_0(epfn_matid_floatervisible,TYPE_BOOL, MatIDFloaterVisible);
00439         
00440     END_FUNCTION_MAP
00441     #pragma warning(pop)
00442 
00445     FPInterfaceDesc *GetDesc ();
00446 
00447     // General interface tools for accessing polymesh, updating object.
00452     virtual MNMesh* GetMeshPtr () { return NULL; }
00569     virtual IParamBlock2    *getParamBlock () { return NULL; }
00580     virtual void            LocalDataChanged (DWORD parts) { }
00581 
00582     // Invalidates soft selection values:
00587     virtual void InvalidateSoftSelectionCache () { }
00588 
00589     // Invalidates precomputed distances on which soft selection values are based
00590     // (as well as soft selection values) - note this is automatically done when
00591     // you call LocalDataChanged (PART_GEOM).  Should also be done if the soft
00592     // selection parameters are changed.
00599     virtual void InvalidateDistanceCache () { }
00600 
00601     // Simple call to ip->RedrawViewports.
00609     virtual void RefreshScreen () { }
00610 
00611     // returns TRUE if between BeginEditParams, EndEditParams
00617     virtual bool Editing () { return FALSE; }
00618 
00619     // Selection level accessors:
00626     virtual int  GetEPolySelLevel() { return EP_SL_OBJECT; }
00635     virtual int  GetMNSelLevel () { return MNM_SL_OBJECT; }
00644     virtual void SetEPolySelLevel(int level) { }
00645 
00646     // Component flag accessors:
00666     virtual bool EpGetVerticesByFlag (BitArray & vset, DWORD flags, DWORD fmask=0x0) { return false; }
00686     virtual bool EpGetEdgesByFlag (BitArray & eset, DWORD flags, DWORD fmask=0x0) { return false; }
00706     virtual bool EpGetFacesByFlag (BitArray & fset, DWORD flags, DWORD fmask=0x0) { return false; }
00726     virtual void EpSetVertexFlags (BitArray &vset, DWORD flags, DWORD fmask=0x0, bool undoable=true) { return; }
00745     virtual void EpSetEdgeFlags (BitArray &eset, DWORD flags, DWORD fmask = 0x0, bool undoable=true) { return; }
00765     virtual void EpSetFaceFlags (BitArray &fset, DWORD flags, DWORD fmask = 0x0, bool undoable=true) { return; }
00766 
00767     // Action interface stuff:
00817     virtual void EpActionButtonOp (int opcode) { }
00845     virtual void EpActionToggleCommandMode (int mode) { }
00855     virtual void EpActionEnterPickMode (int mode) { }
00861     virtual void EpActionExitCommandModes () { }
00862 
00868     virtual int EpActionGetCommandMode () { return -1; }
00869 
00875     virtual int EpActionGetPickMode () { return -1; }
00876 
00877     // Transform commands:
00897     virtual void MoveSelection(int level, TimeValue t, Matrix3& partm, Matrix3& tmAxis, Point3& val, BOOL localOrigin) { }
00917     virtual void RotateSelection(int level, TimeValue t, Matrix3& partm, Matrix3& tmAxis, Quat& val, BOOL localOrigin) { }
00937     virtual void ScaleSelection(int level, TimeValue t, Matrix3& partm, Matrix3& tmAxis, Point3& val, BOOL localOrigin) { }
00951     virtual void ApplyDelta (Tab<Point3> & delta, EPoly *epol, TimeValue t) { }
00952 
00953     // Slice plane accessors:
00957     virtual void EpResetSlicePlane () { }
00970     virtual void EpGetSlicePlane (Point3 & planeNormal, Point3 & planeCenter, float *planeSize=NULL) { }
00984     virtual void EpSetSlicePlane (Point3 & planeNormal, Point3 & planeCenter, float planeSize) { }
00985 
00986     // Component data access methods:
01014     virtual Color GetVertexColor (bool* uniform = NULL, int* num = NULL, int mp = 0, DWORD flag = MN_SEL, TimeValue t = 0) { return Color(1,1,1); }
01034     virtual void  SetVertexColor (Color clr, int mp=0, DWORD flag=MN_SEL, TimeValue t=0) { }
01035 
01062     virtual Color GetFaceColor (bool *uniform=NULL, int *num=NULL, int mp=0, DWORD flag=MN_SEL, TimeValue t=0) { return Color(1,1,1); }
01082     virtual void  SetFaceColor (Color clr, int mp=0, DWORD flag=MN_SEL, TimeValue t=0) { }
01105     virtual float GetVertexDataValue (int channel, int *numSel, bool *uniform, DWORD vertexFlags, TimeValue t) { return 1.0f; }
01128     virtual float GetEdgeDataValue (int channel, int *numSel, bool *uniform, DWORD edgeFlags, TimeValue t) { return 1.0f; }
01145     virtual void  SetVertexDataValue (int channel, float w, DWORD vertexFlags, TimeValue t) { }
01162     virtual void  SetEdgeDataValue (int channel, float w, DWORD edgeFlags, TimeValue t) { }
01173     virtual void  ResetVertexData (int channel) { }
01185     virtual void  ResetEdgeData (int channel) { }
01199     virtual void  BeginPerDataModify (int mnSelLevel, int channel) { }
01204     virtual bool  InPerDataModify () { return false; }
01214     virtual void  EndPerDataModify (bool success) { }
01227     virtual void  BeginVertexColorModify (int mp=0) { }
01232     virtual bool  InVertexColorModify () { return false; }
01242     virtual void  EndVertexColorModify (bool success) { }
01243 
01244     // Face level characteristics:
01255     virtual int GetMatIndex (bool *determined) { determined=false; return 0; }
01264     virtual void SetMatIndex (int index, DWORD flag=MN_SEL) { }
01280     virtual void GetSmoothingGroups (DWORD faceFlag, DWORD *anyFaces, DWORD *allFaces=NULL) { if (anyFaces) *anyFaces = 0; if (allFaces) *allFaces = 0; }
01294     virtual void SetSmoothBits (DWORD bits, DWORD bitmask, DWORD flag) { }
01295 
01296     // Displacement approximation methods:
01297     // Copy displacement parameters from pblock to polyobject:
01302     virtual void SetDisplacementParams () { }
01303 
01304     // Copy displacement parameters from polyobject to pblock:
01309     virtual void UpdateDisplacementParams () { }
01310 
01311     // Engage a displacement approximation preset:
01319     virtual void UseDisplacementPreset (int presetNumber) { }
01320 
01321     // Drag operations:
01334     virtual void EpfnBeginExtrude (int msl, DWORD flag, TimeValue t) { }
01345     virtual void EpfnEndExtrude (bool accept, TimeValue t) { }
01356     virtual void EpfnDragExtrude (float amount, TimeValue t) { }
01374     virtual void EpfnBeginBevel (int msl, DWORD flag, bool doExtrude, TimeValue t) { }
01385     virtual void EpfnEndBevel (bool accept, TimeValue t) { }
01398     virtual void EpfnDragBevel (float outline, float height, TimeValue t) { }
01410     virtual void EpfnBeginChamfer (int msl, TimeValue t) { }
01421     virtual void EpfnEndChamfer (bool accept, TimeValue t) { }
01433     virtual void EpfnDragChamfer (float amount, TimeValue t) { }
01434 
01435     // Operations:
01436     // Select panel ops:
01448     virtual bool EpfnHide (int msl, DWORD flags) { return false; }
01457     virtual bool EpfnUnhideAll (int msl) { return false; }
01465     virtual void EpfnNamedSelectionCopy (MSTR setName) {}
01476     virtual void EpfnNamedSelectionPaste (bool useDlgToRename) {}
01477 
01478     // Topological & Geometric ops from the Edit Geometry panel:
01479     // Create button:
01495     virtual int  EpfnCreateVertex(Point3 pt, bool pt_local=false, bool select=true) { return -1; }
01508     virtual int  EpfnCreateEdge (int v1, int v2, bool select=true) { return -1; }
01523     virtual int  EpfnCreateFace(int *v, int deg, bool select=true) { return -1; }
01537     virtual bool EpfnCapHoles (int msl=MNM_SL_EDGE, DWORD targetFlags=MN_SEL) { return false; }
01538 
01539     // Delete button:
01558     virtual bool EpfnDelete (int msl, DWORD delFlag=MN_SEL, bool delIsoVerts=false) { return false; }
01559 
01560     // Attach button:
01561     virtual void EpfnAttach (INode *node, bool & canUndo, INode *myNode, TimeValue t) {}
01562 
01563     // Detach button:
01577     virtual void EpfnMultiAttach (INodeTab& nodeTab, INode* myNode, TimeValue t) {}
01592     virtual bool EpfnDetachToElement (int msl, DWORD flag, bool keepOriginal) { return false; }
01614     virtual bool EpfnDetachToObject (MSTR name, int msl, DWORD flag, bool keepOriginal, INode *myNode, TimeValue t) { return false; }
01626     virtual bool EpfnSplitEdges (DWORD flag=MN_SEL) { return false; }
01627 
01628     // Break/divide button:
01640     virtual bool EpfnBreakVerts (DWORD flag=MN_SEL) { return false; }
01658     virtual int  EpfnDivideFace (int face, Tab<float> &bary, bool select=true) { return -1; }
01674     virtual int  EpfnDivideEdge (int edge, float prop, bool select=true) { return -1; }
01675 
01676     // Collapse button:
01690     virtual bool EpfnCollapse (int msl, DWORD flag) { return false; }
01691 
01692     // Extrude/Bevel/Chamfer section:
01708     virtual void EpfnExtrudeFaces (float amount, DWORD flag, TimeValue t) {}
01728     virtual void EpfnBevelFaces (float height, float outline, DWORD flag, TimeValue t) {}
01738     virtual void EpfnChamferVertices (float amount, TimeValue t) {}
01748     virtual void EpfnChamferEdges (float amount, TimeValue t) {}
01749 
01750     // Cut 'n' Slice
01765     virtual bool EpfnSlice (Point3 planeNormal, Point3 planeCenter, bool flaggedFacesOnly=false, DWORD faceFlags=MN_SEL) { return false; }
01770     virtual bool EpfnInSlicePlaneMode () { return false; }
01786     virtual int  EpfnCutVertex (int startv, Point3 destination, Point3 projDir) { return -1; }
01806     virtual int  EpfnCutEdge (int e1, float prop1, int e2, float prop2, Point3 projDir) { return -1; }
01826     virtual int  EpfnCutFace (int f1, Point3 p1, Point3 p2, Point3 projDir) { return -1; }
01827 
01828     // Weld section:
01842     virtual bool EpfnWeldVerts (int vert1, int vert2, Point3 destination) { return false; }
01853     virtual bool EpfnWeldEdges (int edge1, int edge2) { return false; }
01865     virtual bool EpfnWeldFlaggedVerts (DWORD flag) { return false; }
01875     virtual bool EpfnWeldFlaggedEdges (DWORD flag) { return false; }
01876 
01877     // Rest of Geom Panel
01894     virtual bool EpfnCreateShape (MSTR name, bool smooth, INode *myNode, DWORD edgeFlag=MN_SEL) { return false; }
01909     virtual bool EpfnMakePlanar (int msl, DWORD flag=MN_SEL, TimeValue t=0) { return false; }
01928     virtual bool EpfnMoveToPlane (Point3 planeNormal, float planeOffset, int msl, DWORD flag=MN_SEL, TimeValue t=0) { return false; }
01941     virtual bool EpfnAlignToGrid (int msl, DWORD flag=MN_SEL) { return false; }
01954     virtual bool EpfnAlignToView (int msl, DWORD flag=MN_SEL) { return false; }
01960     virtual bool EpfnDeleteIsoVerts () { return false; }
01961 
01962     // Subdivision panel
01982     virtual bool EpfnMeshSmooth (int msl, DWORD flag=MN_SEL)  { return false; }
01995     virtual bool EpfnTessellate (int msl, DWORD flag=MN_SEL) { return false; }
01996 
01997     // Surface panels
02004     virtual void EpfnForceSubdivision () { }
02025     virtual void EpfnSelectVertByColor (BOOL add, BOOL sub, int mp=0, TimeValue t=0) { }
02039     virtual void EpfnSetDiagonal (int face, int corner1, int corner2) { }
02051     virtual bool EpfnRetriangulate (DWORD flag=MN_SEL) { return false; }
02063     virtual bool EpfnFlipNormals (DWORD flag=MN_SEL) { return false; }
02075     virtual void EpfnSelectByMat (int index, bool clear, TimeValue t) { }
02087     virtual void EpfnSelectBySmoothGroup (DWORD bits, BOOL clear, TimeValue t) { }
02095     virtual void EpfnAutoSmooth (TimeValue t) { }
02096 
02097     // other things...
02106     virtual void CollapseDeadStructs () { }
02150     virtual int  EpfnPropagateComponentFlags (int slTo, DWORD flTo, int slFrom, DWORD flFrom, bool ampersand=FALSE, bool set=TRUE, bool undoable=FALSE) { return 0; }
02151 
02152     //----------------------------------------
02153     //Methods from Max 8 - removed from EPoly8
02154     //----------------------------------------
02155 
02160 
02161     virtual void EpfnChamferVerticesOpen (float in_amount, bool in_open , TimeValue in_time) {}
02162 
02167 
02168     virtual void EpfnChamferEdgesOpen (float in_amount,bool in_open,TimeValue in_time) {}                       
02169 
02170 
02172 
02181     virtual void EpfnSetRingShift(int in_newPos,bool in_moveOnly, bool in_add) {}
02182 
02184 
02193     virtual void EpfnSetLoopShift(int in_newPos,bool in_moveOnly,bool in_add) {}        
02194 
02196 
02202     virtual int EpfnConvertSelectionToBorder (int in_epSelLevelFrom,int in_epSelLevelTo) { return false; }  
02203 
02205 
02207     virtual void EpfnPaintDeformCommit() {}
02208 
02210 
02212     virtual void EpfnPaintDeformCancel() {}
02213 
02214 
02215 
02217     virtual void CloseSmGrpFloater() {}
02218     
02220     virtual void CloseMatIDFloater() {}
02221 
02223     virtual HWND MatIDFloaterHWND() { return NULL; }
02225     virtual HWND SmGrpFloaterHWND() { return NULL; }
02226 
02227 
02229     virtual void        SmGrpFloater() = 0;
02231     virtual void        MatIDFloater() = 0;
02233     virtual BOOL        MatIDFloaterVisible() = 0;
02235     virtual BOOL        SmGrpFloaterVisible() = 0;
02236 
02237 
02238 private:
02239     // Access to new Preview mode:
02240     virtual void        EpPreviewBegin (int previewOperation) { }
02241     virtual void        EpPreviewCancel () { }
02242     virtual void        EpPreviewAccept () { }
02243     virtual void        EpPreviewInvalidate () { }
02244     virtual bool        EpPreviewOn () { return false; }
02245     virtual void        EpPreviewSetDragging (bool drag) { }
02246     virtual bool        EpPreviewGetDragging () { return false; }
02247 
02248     virtual bool        EpfnPopupDialog (int popupOperation) { return false; }
02249     virtual void        EpfnClosePopupDialog () { }
02250 
02251     virtual void        EpfnRepeatLastOperation () { }
02252 
02253     virtual void        EpfnGrowSelection (int meshSelLevel) { }
02254     virtual void        EpfnShrinkSelection (int meshSelLevel) { }
02255     virtual int         EpfnConvertSelection (int epSelLevelFrom, int epSelLevelTo, bool requireAll=false) { return false; }
02256     virtual void        EpfnSelectBorder () { }
02257     virtual void        EpfnSelectElement () { }
02258     virtual void        EpfnSelectEdgeLoop () { }
02259     virtual void        EpfnSelectEdgeRing () { }
02260     virtual bool        EpfnRemove (int msl, DWORD delFlag=MN_SEL) { return false; }
02261     virtual bool        EpfnDeleteIsoMapVerts () { return false; }
02262     virtual bool        EpfnOutline (DWORD flag) { return false; }
02263     virtual bool        EpfnConnectEdges (DWORD edgeFlag) { return false; }
02264     virtual bool        EpfnConnectVertices (DWORD vertexFlag) { return false; }
02265     virtual bool        EpfnExtrudeAlongSpline (DWORD faceFlag) { return false; }
02266     virtual bool        EpfnLiftFromEdge (DWORD faceFlag) { return false; }
02267     virtual void        EpfnToggleShadedFaces () { }
02268     virtual int         EpfnCreateFace2 (Tab<int> *vertices, bool select=true) { return -1; }
02282     virtual void        EpfnAttach (INode *node, INode *myNode, TimeValue t) { }
02283 
02284     virtual BitArray    *EpfnGetSelection (int msl) { return NULL; }
02285     virtual void        EpfnSetSelection (int msl, BitArray *newSel) { }
02286 
02287     virtual int         EpfnGetNumVertices () { return 0; }
02288     virtual Point3      EpfnGetVertex (int vertIndex) { return Point3(0,0,0); }
02289     virtual int         EpfnGetVertexFaceCount (int vertIndex) { return 0; }
02290     virtual int         EpfnGetVertexFace (int vertIndex, int whichFace) { return 0; }
02291     virtual int         EpfnGetVertexEdgeCount (int vertIndex) { return 0; }
02292     virtual int         EpfnGetVertexEdge (int vertIndex, int whichEdge) { return 0; }
02293 
02294     virtual int         EpfnGetNumEdges () { return 0; }
02295     virtual int         EpfnGetEdgeVertex (int edgeIndex, int end) { return 0; }
02296     virtual int         EpfnGetEdgeFace (int edgeIndex, int side) { return 0; }
02297 
02298     virtual int         EpfnGetNumFaces() { return 0; }
02299     virtual int         EpfnGetFaceDegree (int faceIndex) { return 0; }
02300     virtual int         EpfnGetFaceVertex (int faceIndex, int corner) { return 0; }
02301     virtual int         EpfnGetFaceEdge (int faceIndex, int side) { return 0; }
02302     virtual int         EpfnGetFaceMaterial (int faceIndex) { return 0; }
02303     virtual DWORD       EpfnGetFaceSmoothingGroup (int faceIndex) { return 0; }
02304 
02305     virtual int         EpfnGetNumMapChannels () { return 0; }
02306     virtual bool        EpfnGetMapChannelActive (int mapChannel) { return false; }
02307     virtual int         EpfnGetNumMapVertices (int mapChannel) { return 0; }
02308     virtual UVVert      EpfnGetMapVertex (int mapChannel, int vertIndex) { return UVVert(0,0,0); }
02309     virtual int         EpfnGetMapFaceVertex (int mapChannel, int faceIndex, int corner) { return 0; }
02310 
02311     // New in 7.0:
02312     virtual MapBitArray GetPreserveMapSettings () const { return MapBitArray(true, false); }
02313     virtual void        SetPreserveMapSettings (const MapBitArray & mapSettings) { }
02314     virtual void        EpfnSetPreserveMap (int mapChannel, bool preserve) { }
02315     virtual bool        EpfnGetPreserveMap (int mapChannel) { return (mapChannel>0); }
02316 
02317     virtual bool        EpfnBridge (int epolySelLevel, DWORD flag) { return false; }
02318     virtual bool        EpfnReadyToBridgeFlagged (int epolySelLevel, DWORD flag) { return false; }
02319     virtual bool        EpfnTurnDiagonal (int face, int diag) { return false; }
02320     virtual bool        EpfnRelax (int msl, DWORD flag, TimeValue t) { return false; }
02321     virtual bool        EpfnMakePlanarIn (int dimension, int msl, DWORD flag, TimeValue t) { return false; }
02322 
02323     virtual void        EpFnSetVertexColor (Color *clr, int mp) {}
02324     virtual Color       EpFnGetVertexColor (int mp) { return Color(0,0,0); }
02325     virtual void        EpFnSetFaceColor (Color *clr, int mp) {}
02326     virtual Color       EpFnGetFaceColor (int mp) { return Color(0,0,0); }
02327 
02328 };
02329 
02330 
02331 class EPolyManipulatorGrip_Imp;
02332 
02334 class EPoly13: public EPoly
02335 {
02336     friend class EPolyManipulatorGrip_Imp;
02337 protected:
02342     enum ManipulateGrips
02343     {
02345         eSoftSelFalloff = 0,
02347         eSoftSelPinch,
02349         eSoftSelBubble,
02351         eSetFlow,
02353         eLoopShift,
02355         eRingShift,
02357         eEdgeCrease,
02359         eEdgeWeight,
02361         eVertexWeight
02362     };
02363     //}@
02364 
02369     virtual void SetManipulateGrip(bool on, ManipulateGrips item) = 0;
02370 
02376     virtual bool GetManipulateGrip(ManipulateGrips item) = 0;
02377 
02378 };
02379 
02380 
02381 #pragma warning(pop)
02382