istdplug.h

Go to the documentation of this file.
00001 /**********************************************************************
00002  *<
00003     FILE: istdplug.h
00004 
00005     DESCRIPTION:  Interfaces into some of the standard plug-ins 
00006                   that ship with MAX
00007 
00008     CREATED BY: Rolf Berteig    
00009 
00010     HISTORY: created 20 January 1996
00011 
00012  *> Copyright (c) 1994, All Rights Reserved.
00013  **********************************************************************/
00014 
00015 #pragma once
00016 
00017 #include "maxheap.h"
00018 #include "iFnPub.h"
00019 #include "units.h"
00020 #include "BuildWarnings.h"
00021 #include "assetmanagement\assetUser.h"
00022 #include "object.h"
00023 #include "quat.h"
00024 #include "control.h"
00025 #include "ipoint3.h"
00026 
00027 //----------------------------------------------------------------
00028 // The following are parameter block IDs for procedural objects
00029 
00037 #define ARC_RADIUS      0
00038 #define ARC_FROM        1
00039 #define ARC_TO          2
00040 #define ARC_PIE         3
00041 #define ARC_REVERSE     4
00042 
00043 
00046 #define BOXOBJ_LENGTH   0
00047 #define BOXOBJ_WIDTH    1
00048 #define BOXOBJ_HEIGHT   2
00049 #define BOXOBJ_WSEGS    3
00050 #define BOXOBJ_LSEGS    4
00051 #define BOXOBJ_HSEGS    5
00052 #define BOXOBJ_GENUVS   6
00053 
00054 
00057 #define CIRCLE_RADIUS       0
00058 
00059 
00062 #define CONE_RADIUS1        0
00063 #define CONE_RADIUS2        1
00064 #define CONE_HEIGHT         2
00065 #define CONE_SEGMENTS       3
00066 #define CONE_CAPSEGMENTS    4
00067 #define CONE_SIDES          5
00068 #define CONE_SMOOTH         6
00069 #define CONE_SLICEON        7
00070 #define CONE_PIESLICE1      8
00071 #define CONE_PIESLICE2      9
00072 #define CONE_GENUVS         10
00073 
00074 
00077 #define CYLINDER_RADIUS         0
00078 #define CYLINDER_HEIGHT         1
00079 #define CYLINDER_SEGMENTS       2
00080 #define CYLINDER_CAPSEGMENTS    3
00081 #define CYLINDER_SIDES          4
00082 #define CYLINDER_SMOOTH         5
00083 #define CYLINDER_SLICEON        6
00084 #define CYLINDER_PIESLICE1      7
00085 #define CYLINDER_PIESLICE2      8
00086 #define CYLINDER_GENUVS         9
00087 
00088 
00091 #define DONUT_RADIUS1       0
00092 #define DONUT_RADIUS2       1
00093 
00094 
00097 #define ELLIPSE_LENGTH      0
00098 #define ELLIPSE_WIDTH       1
00099 
00100 
00103 #define HEDRA_RADIUS    0
00104 #define HEDRA_FAMILY    1
00105 #define HEDRA_P         2
00106 #define HEDRA_Q         3
00107 #define HEDRA_SCALEP    4
00108 #define HEDRA_SCALEQ    5
00109 #define HEDRA_SCALER    6
00110 #define HEDRA_VERTS     7
00111 #define HEDRA_GENUVS    8
00112 
00113 
00116 #define HELIX_RADIUS1       0
00117 #define HELIX_RADIUS2       1
00118 #define HELIX_HEIGHT        2
00119 #define HELIX_TURNS         3
00120 #define HELIX_BIAS          4
00121 #define HELIX_DIRECTION     5
00122 
00123 
00126 #define NGON_RADIUS         0
00127 #define NGON_SIDES          1
00128 #define NGON_CIRCULAR       2
00129 
00130 
00133 #define PATCHGRID_LENGTH    0
00134 #define PATCHGRID_WIDTH     1
00135 #define PATCHGRID_WSEGS     2
00136 #define PATCHGRID_LSEGS     3
00137 #define PATCHGRID_TEXTURE   4
00138 
00139 
00142 #define RSPART_VPTPARTICLES     0
00143 #define RSPART_RNDPARTICLES     1
00144 #define RSPART_DROPSIZE         2
00145 #define RSPART_SPEED            3
00146 #define RSPART_VARIATION        4
00147 #define RSPART_DISPTYPE         5
00148 #define RSPART_STARTTIME        6
00149 #define RSPART_LIFETIME         7
00150 #define RSPART_EMITTERWIDTH     8
00151 #define RSPART_EMITTERHEIGHT    9
00152 #define RSPART_HIDEEMITTER      10
00153 #define RSPART_BIRTHRATE        11
00154 #define RSPART_CONSTANT         12
00155 #define RSPART_RENDER           13
00156 #define RSPART_TUMBLE           14
00157 #define RSPART_SCALE            15
00158 
00159 
00162 #define RECTANGLE_LENGTH    0
00163 #define RECTANGLE_WIDTH     1
00164 #define RECTANGLE_FILLET    2
00165 
00166 
00169 #define SPHERE_RADIUS   0
00170 #define SPHERE_SEGS     1
00171 #define SPHERE_SMOOTH   2
00172 #define SPHERE_HEMI     3
00173 #define SPHERE_SQUASH   4
00174 #define SPHERE_RECENTER 5
00175 #define SPHERE_GENUVS   6
00176 
00177 
00180 #define START_RADIUS1       0
00181 #define START_RADIUS2       1
00182 #define START_POINTS        2
00183 #define START_DISTORT       3
00184 #define START_FILLET1       4
00185 #define START_FILLET2       5
00186 
00187 
00190 #define TEAPOT_RADIUS   0
00191 #define TEAPOT_SEGS     1
00192 #define TEAPOT_SMOOTH   2
00193 #define TEAPOT_TEAPART  3
00194 #define TEAPOT_BODY     4
00195 #define TEAPOT_HANDLE   5
00196 #define TEAPOT_SPOUT    6
00197 #define TEAPOT_LID      7
00198 #define TEAPOT_GENUVS   8
00199 
00200 
00203 #define TEXT_SIZE 0
00204 #define TEXT_KERNING 1
00205 #define TEXT_LEADING 2
00206 
00207 
00210 #define TORUS_RADIUS        0
00211 #define TORUS_RADIUS2       1
00212 #define TORUS_ROTATION      2
00213 #define TORUS_TWIST         3
00214 #define TORUS_SEGMENTS      4
00215 #define TORUS_SIDES         5
00216 #define TORUS_SMOOTH        6
00217 #define TORUS_SLICEON       7
00218 #define TORUS_PIESLICE1     8
00219 #define TORUS_PIESLICE2     9
00220 #define TORUS_GENUVS        10
00221 
00222 
00225 #define TUBE_RADIUS         0
00226 #define TUBE_RADIUS2        1
00227 #define TUBE_HEIGHT         2
00228 #define TUBE_SEGMENTS       3
00229 #define TUBE_CAPSEGMENTS    4
00230 #define TUBE_SIDES          5
00231 #define TUBE_SMOOTH         6
00232 #define TUBE_SLICEON        7
00233 #define TUBE_PIESLICE1      8
00234 #define TUBE_PIESLICE2      9
00235 #define TUBE_GENUVS         10
00236 
00237 
00240 #define GRIDHELP_LENGTH         0
00241 #define GRIDHELP_WIDTH          1
00242 #define GRIDHELP_GRID           2
00243 
00244 
00245 //----------------------------------------------------------------
00246 // The following are parameter block IDs for modifiers
00247 
00250 #define BEND_ANGLE      0
00251 #define BEND_DIR        1
00252 #define BEND_AXIS       2
00253 #define BEND_DOREGION   3
00254 #define BEND_FROM       4
00255 #define BEND_TO         5
00256 
00257 
00260 #define BOMB_STRENGTH       0
00261 #define BOMB_GRAVITY        1
00262 #define BOMB_CHAOS          2
00263 #define BOMB_DETONATION     3
00264 
00265 
00268 #define DEFLECTOR_BOUNCE    0
00269 #define DEFLECTOR_WIDTH     1
00270 #define DEFLECTOR_HEIGHT    2
00271 
00272 
00276 #define DISPLACE_MAPTYPE        0
00277 #define DISPLACE_UTILE          1
00278 #define DISPLACE_VTILE          2
00279 #define DISPLACE_WTILE          3
00280 #define DISPLACE_BLUR           4
00281 #define DISPLACE_USEMAP         5
00282 #define DISPLACE_APPLYMAP       6
00283 #define DISPLACE_STRENGTH       7
00284 #define DISPLACE_DECAY          8
00285 #define DISPLACE_CENTERLUM      9
00286 #define DISPLACE_UFLIP          10
00287 #define DISPLACE_VFLIP          11
00288 #define DISPLACE_WFLIP          12
00289 #define DISPLACE_CENTERL        13
00290 #define DISPLACE_CAP            14
00291 #define DISPLACE_LENGTH         15
00292 #define DISPLACE_WIDTH          16
00293 #define DISPLACE_HEIGHT         17
00294 #define DISPLACE_AXIS           18
00295 
00296 
00299 #define EXTRUDE_AMOUNT          0
00300 #define EXTRUDE_SEGS            1
00301 #define EXTRUDE_CAPSTART        2
00302 #define EXTRUDE_CAPEND          3
00303 #define EXTRUDE_CAPTYPE         4
00304 #define EXTRUDE_OUTPUT          5
00305 #define EXTRUDE_MAPPING         6
00306 #define EXTRUDE_GEN_MATIDS      7
00307 #define EXTRUDE_USE_SHAPEIDS    8
00308 #define EXTRUDE_SMOOTH          9
00309 
00310 
00313 #define GRAVITY_STRENGTH        0
00314 #define GRAVITY_DECAY           1
00315 #define GRAVITY_TYPE            2
00316 #define GRAVITY_DISPLENGTH      3
00317 
00318 
00321 #define WIND_STRENGTH       0
00322 #define WIND_DECAY          1
00323 #define WIND_TYPE           2
00324 #define WIND_DISPLENGTH     3
00325 #define WIND_TURBULENCE     4
00326 #define WIND_FREQUENCY      5
00327 #define WIND_SCALE          6
00328 
00329 
00332 #define UVWMAP_MAPTYPE      0
00333 #define UVWMAP_UTILE        1
00334 #define UVWMAP_VTILE        2
00335 #define UVWMAP_WTILE        3
00336 #define UVWMAP_UFLIP        4
00337 #define UVWMAP_VFLIP        5
00338 #define UVWMAP_WFLIP        6
00339 #define UVWMAP_CAP          7
00340 #define UVWMAP_CHANNEL      8
00341 #define UVWMAP_LENGTH       9
00342 #define UVWMAP_WIDTH        10
00343 #define UVWMAP_HEIGHT       11
00344 #define UVWMAP_AXIS         12
00345 
00346 
00349 #define NOISEMOD_SEED           0
00350 #define NOISEMOD_SCALE          1
00351 #define NOISEMOD_FRACTAL        2
00352 #define NOISEMOD_ROUGH          3
00353 #define NOISEMOD_ITERATIONS     4
00354 #define NOISEMOD_ANIMATE        5
00355 #define NOISEMOD_FREQ           6
00356 #define NOISEMOD_PHASE          7
00357 #define NOISEMOD_STRENGTH       8
00358 
00359 
00362 #define OPTMOD_RENDER           0
00363 #define OPTMOD_VIEWS            1
00364 #define OPTMOD_FACETHRESH1      2
00365 #define OPTMOD_EDGETHRESH1      3
00366 #define OPTMOD_BIAS1            4
00367 #define OPTMOD_PRESERVEMAT1     5
00368 #define OPTMOD_PRESERVESMOOTH1  6
00369 #define OPTMOD_MAXEDGE1         7
00370 #define OPTMOD_FACETHRESH2      8
00371 #define OPTMOD_EDGETHRESH2      9
00372 #define OPTMOD_BIAS2            10
00373 #define OPTMOD_PRESERVEMAT2     11
00374 #define OPTMOD_PRESERVESMOOTH2  12
00375 #define OPTMOD_MAXEDGE2         13
00376 #define OPTMOD_AUTOEDGE         14
00377 #define OPTMOD_MANUPDATE        15
00378 
00379 
00382 #define VOLSEL_LEVEL    0
00383 #define VOLSEL_METHOD   1
00384 #define VOLSEL_TYPE     2
00385 #define VOLSEL_VOLUME   3
00386 #define VOLSEL_INVERT   4
00387 
00388 
00392 #define RWAVE_AMPLITUDE     0
00393 #define RWAVE_AMPLITUDE2    1
00394 #define RWAVE_WAVELEN       2
00395 #define RWAVE_PHASE         3
00396 #define RWAVE_DECAY         4
00397 
00398 #define RWAVE_CIRCLES       5 //!< Valid for space warp objects only
00399 #define RWAVE_SEGMENTS      6 //!< Valid for space warp objects only
00400 #define RWAVE_DIVISIONS     7 //!< Valid for space warp objects only
00401 
00402 
00405 #define RWAVE_FLEX          0
00406 
00407 
00410 #define SKEW_AMOUNT     0
00411 #define SKEW_DIR        1
00412 #define SKEW_AXIS       2
00413 #define SKEW_DOREGION   3
00414 #define SKEW_FROM       4
00415 #define SKEW_TO         5
00416 
00417 
00420 #define MATMOD_MATID 0
00421 
00422 
00425 #define SMOOTHMOD_AUTOSMOOTH    0
00426 #define SMOOTHMOD_THRESHOLD     1
00427 #define SMOOTHMOD_SMOOTHBITS    2
00428 
00429 
00432 #define NORMMOD_UNIFY   0
00433 #define NORMMOD_FLIP    1
00434 
00435 
00438 #define SURFREV_DEGREES         0
00439 #define SURFREV_SEGS            1
00440 #define SURFREV_CAPSTART        2
00441 #define SURFREV_CAPEND          3
00442 #define SURFREV_CAPTYPE         4
00443 #define SURFREV_WELDCORE        5
00444 #define SURFREV_OUTPUT          6
00445 #define SURFREV_MAPPING         7
00446 
00447 
00450 #define TAPER_AMT           0
00451 #define TAPER_CRV           1
00452 #define TAPER_AXIS          2
00453 #define TAPER_EFFECTAXIS    3
00454 #define TAPER_SYMMETRY      4
00455 #define TAPER_DOREGION      5
00456 #define TAPER_FROM          6
00457 #define TAPER_TO            7
00458 
00459 
00462 #define TWIST_ANGLE     0
00463 #define TWIST_BIAS      1
00464 #define TWIST_AXIS      2
00465 #define TWIST_DOREGION  3
00466 #define TWIST_FROM      4
00467 #define TWIST_TO        5
00468 
00469 
00472 #define MATMOD_MATID    0
00473 
00474 
00477 #define SMOOTH_AUTOSMOOTH   0
00478 #define SMOOTH_THRESHOLD    1
00479 #define SMOOTH_SMOOTHBITS   2
00480 
00481 
00484 #define NORMALMOD_UNIFY     0
00485 #define NORMALMOD_FLIP      1
00486 
00487 
00490 #define TESSMOD_TYPE        0
00491 #define TESSMOD_TENSION     1
00492 #define TESSMOD_ITERATIONS  2
00493 #define TESSMOD_FACE_TYPE   3
00494 
00495 
00498 #define UVWXFORM_UTILE      0
00499 #define UVWXFORM_VTILE      1
00500 #define UVWXFORM_WTILE      2
00501 #define UVWXFORM_UOFFSET    3
00502 #define UVWXFORM_VOFFSET    4
00503 #define UVWXFORM_WOFFSET    5
00504 #define UVWXFORM_UFLIP      6
00505 #define UVWXFORM_VFLIP      7
00506 #define UVWXFORM_WFLIP      8
00507 #define UVWXFORM_CHANNEL    9
00508 
00509 
00511 
00512 //-- Text shape object interface -------------------------
00513 
00514 // Use GetTextObjectInterface() to get a pointer to an 
00515 // ITextObject given a pointer to an Object. 
00516 
00517 
00518 // Flags passed to ChangeFont()
00519 #define TEXTOBJ_ITALIC      (1<<1)
00520 #define TEXTOBJ_UNDERLINE   (1<<2)
00521 
00522 // Alignment types
00523 #define TEXTOBJ_LEFT 0
00524 #define TEXTOBJ_CENTER 1
00525 #define TEXTOBJ_RIGHT 2
00526 #define TEXTOBJ_JUSTIFIED 3
00527 
00553 class ITextObject: public MaxHeapOperators {
00554     public:
00555         // Returns TRUE if string is changed. Can't change string if current font is not installed
00562         virtual BOOL ChangeText(MSTR string)=0;
00563         
00564         // Returns TRUE if font is successfully changed.
00574         virtual BOOL ChangeFont(MSTR name, DWORD flags)=0;
00575 
00576         // Get fount and string
00578         virtual MSTR GetFont()=0;
00580         virtual MSTR GetString()=0;
00581         
00582         // Get/Set styles
00585         virtual BOOL GetItalic()=0;
00588         virtual BOOL GetUnderline()=0;
00593         virtual void SetItalic(BOOL sw)=0;
00598         virtual void SetUnderline(BOOL sw)=0;
00599 
00600         // Get/Set alignment
00601         virtual BOOL SetAlignment(int type)=0;
00602         virtual int GetAlignment()=0;
00603     };
00604 
00605 
00606 
00607 //-- Controller interfaces -------------------------------
00608 
00609 // Base key class
00654 class IKey: public MaxHeapOperators {
00655     public:
00656         TimeValue time;
00657         DWORD flags;
00659         IKey() {time=0;flags=0;}
00660     };
00661 
00662 //--- TCB keys -------------
00663 
00683 class ITCBKey : public IKey {
00684     public:     
00685         float tens, cont, bias, easeIn, easeOut;
00686     };
00687 
00694 class ITCBFloatKey : public ITCBKey {
00695     public:
00696         float val;      
00697     };
00698 
00699 class ITCBPoint4Key : public ITCBKey {
00700 public:
00701     Point4 val;     
00702 };
00703 
00710 class ITCBPoint3Key : public ITCBKey {
00711     public:
00712         Point3 val;     
00713     };
00714 
00721 class ITCBRotKey : public ITCBKey {
00722     public:
00723         AngAxis val;        
00724     };
00725 
00732 class ITCBScaleKey : public ITCBKey {
00733     public:
00734         ScaleValue val;     
00735     };
00736 
00737 
00738 //--- Bezier keys -------------
00739 
00754 class IBezFloatKey : public IKey {
00755     public:
00756         float intan, outtan;
00757         float val;
00758 //watje horizontal handles
00759 //these are the length of the handles
00760         float inLength, outLength;
00761     };
00762 
00795 class IBezPoint3Key : public IKey {
00796     public:
00797         Point3 intan, outtan;
00798         Point3 val;
00799 //watje horizontal handles
00800 //these are the length of the handles
00801         Point3 inLength, outLength;
00802     };
00803 
00810 class IBezQuatKey : public IKey  {
00811     public:     
00812         Quat val;
00813     };
00814 
00829 class IBezScaleKey : public IKey  {
00830     public:
00831         Point3 intan, outtan;
00832         ScaleValue val;
00833 //watje horizontal handles
00834 //these are the length of the handles
00835         Point3 inLength, outLength;
00836     };
00837 
00852 class IBezPoint4Key : public IKey {
00853 public:
00854     Point4 intan, outtan;
00855     Point4 val;
00856     //watje horizontal handles
00857     //these are the length of the handles
00858     Point4 inLength, outLength;
00859 };
00860 
00875 class IBezPoint2Key : public IKey {
00876 public:
00877     Point2 intan, outtan;
00878     Point2 val;
00879     //watje horizontal handles
00880     //these are the length of the handles
00881     Point2 inLength, outLength;
00882 };
00883 
00884 
00885 //--- Linear Keys --------------
00886 
00893 class ILinFloatKey : public IKey {
00894     public:
00895         float val;
00896     };
00897 
00904 class ILinPoint3Key : public IKey {
00905     public:
00906         Point3 val;
00907     };
00908 
00915 class ILinRotKey : public IKey {
00916     public:
00917         Quat val;
00918     };
00919 
00927 class ILinScaleKey : public IKey {
00928     public:
00929         ScaleValue val;
00930     };
00931 
00932 //--- Boolean Controller Keys -------------- AG: 11/08/01
00933 
00945 class IBoolFloatKey : public IKey {
00946     public:
00947         float val;
00948     };
00949 
00950 
00951 
00954 
00958 #define IKEY_SELECTED   (1<<0)
00959 #define IKEY_XSEL       (1<<1)
00960 #define IKEY_YSEL       (1<<2)
00961 #define IKEY_ZSEL       (1<<3)
00962 #define IKEY_WSEL       (1<<30)
00963 #define IKEY_FLAGGED    (1<<31)  //13
00964 #define IKEY_TIME_LOCK  (1<<14)
00965 
00966 #define IKEY_ALLSEL     (IKEY_SELECTED|IKEY_XSEL|IKEY_YSEL|IKEY_ZSEL|IKEY_WSEL)
00967 
00968 #define IKEY_VALLOCK_SHIFT  16
00969 #define IKEY_VALX_LOCK      (1<<IKEY_VALLOCK_SHIFT)
00970 #define IKEY_VALY_LOCK      (1<<(IKEY_VALLOCK_SHIFT+1))
00971 #define IKEY_VALZ_LOCK      (1<<(IKEY_VALLOCK_SHIFT+2))
00972 #define IKEY_VALA_LOCK      (1<<(IKEY_VALLOCK_SHIFT+3))
00973 
00974 
00977 #define TCBKEY_QUATVALID    (1<<4) //!< Angle/axis is derived from the quat instead of vice/versa
00978 
00979 
00982 #define BEZKEY_XBROKEN      (1<<4) //!< Broken means not locked
00983 #define BEZKEY_YBROKEN      (1<<5)
00984 #define BEZKEY_ZBROKEN      (1<<6)
00985 #define BEZKEY_WBROKEN      (1<<21)
00986 
00987 
00991 #define BEZKEY_NUMTYPEBITS  3
00992 #define BEZKEY_INTYPESHIFT  7
00993 #define BEZKEY_OUTTYPESHIFT (BEZKEY_INTYPESHIFT+BEZKEY_NUMTYPEBITS)
00994 #define BEZKEY_TYPEMASK     7
00995 
00996 
00999 #define BEZKEY_SMOOTH   0
01000 #define BEZKEY_LINEAR   1
01001 #define BEZKEY_STEP     2
01002 #define BEZKEY_FAST     3
01003 #define BEZKEY_SLOW     4
01004 #define BEZKEY_USER     5
01005 #define BEZKEY_FLAT     6
01006 
01007 #define NUM_TANGENTTYPES    7
01008 
01009 
01012 #define BEZKEY_CONSTVELOCITY    (1<<15) //!< Interpolated using arclength as the interpolation parameter
01013 #define BEZKEY_UNCONSTRAINHANDLE    (1<<20) //!< Determines whether a user handle is limited
01014 
01015 #define TangentsLocked(f,j) (!(f&(j <= 2 ? (BEZKEY_XBROKEN<<j) : BEZKEY_WBROKEN)))
01016 #define SetTangentLock(f,j,l) {if (l) (f)=(f)&(~(j <= 2 ? (BEZKEY_XBROKEN<<j) : BEZKEY_WBROKEN)); else (f)|=(j <= 2 ? (BEZKEY_XBROKEN<<j) : BEZKEY_WBROKEN);}
01017 
01018 
01021 #define GetInTanType(f)  int(((f)>>BEZKEY_INTYPESHIFT)&BEZKEY_TYPEMASK)
01022 #define GetOutTanType(f) int(((f)>>BEZKEY_OUTTYPESHIFT)&BEZKEY_TYPEMASK)
01023 #define SetInTanType(f,t)  {(f) = ((f)&(~(BEZKEY_TYPEMASK<<BEZKEY_INTYPESHIFT)))|(t<<BEZKEY_INTYPESHIFT);}
01024 #define SetOutTanType(f,t) {(f) = ((f)&(~(BEZKEY_TYPEMASK<<BEZKEY_OUTTYPESHIFT)))|(t<<BEZKEY_OUTTYPESHIFT);}
01025 
01026 
01027 
01028 // HitTrackRecord flags
01029 // KEY_XSEL, KEY_YSEL, KEY_ZSEL, and KEY_WSEL are also used to identify the component
01030 #define HITKEY_INTAN    (1<<10)
01031 #define HITKEY_OUTTAN   (1<<11)
01032 
01033 // Track flags
01034 #define TFLAG_CURVESEL          (1<<0)
01035 #define TFLAG_RANGE_UNLOCKED    (1<<1)
01036 #define TFLAG_LOOPEDIN          (1<<3)
01037 #define TFLAG_LOOPEDOUT         (1<<4)
01038 #define TFLAG_COLOR             (1<<5)  // Set for Bezier Point3/Point4 controlers that are color controllers
01039 #define TFLAG_HSV               (1<<6)  // Set for color controls that interpolate in HSV
01040 #define TRACK_XLOCKED           (1<<7)  // Used by controller to lock Y and Z to X.
01041 #define KT_FLAG_DELAY_KEYSCHANGED (1<<8)
01042 #define TFLAG_NOTKEYABLE        (1<<9)
01043 #define TFLAG_TCBQUAT_NOWINDUP  (1<<10)
01044 
01046 
01050 class IKeyProperty: public MaxHeapOperators {
01051 public:
01053     virtual ~IKeyProperty() {}
01054 
01056     enum PropID {
01058         kIKProp
01059     };
01060 
01063     virtual PropID GetPropID() const = 0;
01064 };
01065 
01067 
01076 class IIKKeyProp : public IKeyProperty {
01077 public:
01079     enum EnumIKSpace {
01081         kBodySpace,
01082 
01084         kObjectSpace,
01085     };
01086 
01089     PropID GetPropID() const { return IKeyProperty::kIKProp; }
01090 
01093     virtual float       GetIKBlend() const =0;
01094 
01096     virtual EnumIKSpace GetIKSpace() const =0;
01097 
01099     virtual bool        GetPivotOn() const =0;
01100 
01102     virtual Point3      GetWorldPivot() const =0;
01103 
01105     virtual INode*      GetPivotNode() const =0;
01106 
01110     virtual bool        SetIKBlend() const { return false; }
01111 
01115     virtual bool        SetIKSpace() const { return false; }
01116 
01120     virtual bool        SetPivotOn() const { return false; }
01121 
01125     virtual bool        SetWorldPivot() const { return false; }
01126 
01130     virtual bool        SetPivotNode() const { return false; }
01131 };
01132 
01147 class ISetIKKeyProp : public IIKKeyProp {
01148 public:
01150     float GetIKBlend() const { return 0.0f; }
01152     EnumIKSpace GetIKSpace() const { return kObjectSpace; }
01154     bool GetPivotOn() const { return false; }
01156     Point3 GetWorldPivot() const { return Point3::Origin; }
01158     INode* GetPivotNode() const { return NULL; }
01159 };
01160 
01161 //-------------------------------------------------------
01162 // This is an interface into key frame controllers. 
01163 // To get a pointer to the IKeyControl interface given a pointer to a controller,
01164 // use the macro defined in AnimatableInterfaceIDs.h: GetKeyControlInterface()
01165 // Use class AnyKey as wrapper for IKey for automatic handling of memory. See example below
01166 
01277 class IKeyControl: public MaxHeapOperators {
01278     public:
01279         // Total number of keys.
01281         virtual int GetNumKeys()=0;
01282         
01283         // Sets the number of keys allocated. 
01284         // May add blank keys or delete existing keys
01293         virtual void SetNumKeys(int n)=0;
01294         
01295         // Fill in 'key' with the ith key
01302         virtual void GetKey(int i,IKey *key)=0;
01303         
01304         // Set the ith key
01311         virtual void SetKey(int i,IKey *key)=0;
01312 
01313         // Append a new key onto the end. Note that the
01314         // key list will ultimately be sorted by time. Returns
01315         // the key's index.
01322         virtual int AppendKey(IKey *key)=0;
01323 
01324         // If any changes are made that would require the keys to be sorted
01325         // this method should be called.
01329         virtual void SortKeys()=0;      
01330 
01331         // Access track flags
01349         virtual DWORD &GetTrackFlags()=0;
01350 
01351         // Specify the max size of a key in bytes. Just need to implement if 
01352         // size of IKey is greater than this default value.
01358         virtual int GetKeySize() {return 128;}
01359     };
01360 
01367 #pragma warning(push)
01368 #pragma warning(disable:4100)
01369 class IKeyControl2 : public IKeyControl {
01370 public:
01374     virtual bool DoesKeyPropExist(IKeyProperty::PropID id) { return false;}
01375 
01386     virtual const IKeyProperty* GetKeyProp(IKeyProperty::PropID id, int i) { return NULL; }
01387 
01399     virtual bool SetKeyProp(IKeyProperty::PropID id, int i, const IKeyProperty& prop) { return false; }
01400 };
01401 
01402 class AnyKey: public MaxHeapOperators
01403 {
01404 public:
01405     Tab<char> data;
01406     AnyKey(int size = 128) { data.SetCount(size); } // 128 is default from IKeyControl::GetKeySize()
01407     void SetSize(int size) { data.SetCount(size); }
01408     operator IKey*() { return (IKey*)data.Addr(0); }
01409 };
01410 
01411 
01412 // ------- example:
01413 //  IKeyControl* ki = GetKeyControlInterface(controller);
01414 //  if (ki != NULL)
01415 //  {
01416 //      if (key_index >= ki->GetNumKeys())
01417 //          throw RuntimeError (MaxSDK::GetResourceStringAsMSTR(IDS_KEY_NO_LONGER_EXISTS_IN_CONTROLLER), controller);
01418 //      AnyKey ak(ki->GetKeySize()); IKey* k = ak;
01419 //      ki->GetKey(key_index, k);
01420 
01421 
01422 //--------------------------------------------------------------
01423 // The following interface is an FP interface to flag TFLAG_TCBQUAT_NOWINDUP
01424 // of IKeyControl::GetTrackFlags(). Specifically,
01425 //   IRotWindup::GetRotWindup() ==
01426 //      !(IKeyControl::GetTrackFlags()&TFLAG_TCBQUAT_NOWINDUP)
01427 // However, IRotWindup::SetRotWindup() will notify dependents and handle
01428 // undo/redo, etc.
01429 // This interface is only available to TCB rotation controller (of class id,
01430 // TCBINTERP_ROTATION_CLASS_ID).
01431 // R4.5 and later only.
01432 //
01433 #define ROTWINDUP_INTERFACE Interface_ID(0x13a3032c, 0x381345ca)
01434 class IRotWindup : public FPMixinInterface {
01435 public:
01436     static IRotWindup* GetIRotWindup(Animatable& a) {
01437         return static_cast<IRotWindup*>(a.GetInterface(ROTWINDUP_INTERFACE));}
01438 
01439     FPInterfaceDesc* GetDesc() { return GetDescByID(ROTWINDUP_INTERFACE); }
01440 
01441     virtual bool GetRotWindup() const =0;
01442     virtual void SetRotWindup(bool) =0;
01443 
01444     enum FuncID {
01445         kRotWindupGet, kRotWindupSet
01446     };
01447 
01448 BEGIN_FUNCTION_MAP
01449     PROP_FNS(kRotWindupGet, GetRotWindup, kRotWindupSet, SetRotWindup, TYPE_bool)
01450 END_FUNCTION_MAP
01451 };
01452 
01453 // Access to default key parameters
01454 CoreExport void SetBezierDefaultTangentType(int in, int out);
01455 CoreExport void GetBezierDefaultTangentType(int &in, int &out);
01456 
01457 CoreExport void SetTCBDefaultParams(float t, float c, float b, float easeIn, float easeOut);
01458 CoreExport void GetTCBDefaultParams(float &t, float &c, float &b, float &easeIn, float &easeOut);
01459 
01460 // An interface for supporting mutiple tangent adjustment.  
01461 // If the user adjusts a tangent from a different track this tells the controller what angle to apply to its selected keys
01462 // The first track hit is called to adjust its own handles and return the difference in angle and the 
01463 // percentage difference in length.  All other tracks use this info to adjust their own handles.
01464 // R4.5 and later only
01465 class IAdjustMultipleTangents: public MaxHeapOperators {
01466     public:
01467         virtual void AdjustInitialTangents(TrackHitRecord hit,ParamDimensionBase *dim,Rect& rcGraph,
01468                             float tzoom,int tscroll,float vzoom,int vscroll,int dx,int dy,DWORD flags, 
01469                             float &angle, float &length)=0;  // the angle and percentage of length offsets are retrieved here
01470         virtual void AdjustSecondaryTangents(DWORD hitFlags,ParamDimensionBase *dim,Rect& rcGraph,
01471                             float tzoom,int tscroll,float vzoom,int vscroll,float angle, float length, DWORD flags)=0;
01472 
01473     };
01474 
01475 // An interface for computing and gathering weighted key info
01476 // If a keyframe controller wants to support soft selections, they should return an instance of this class when 
01477 // GetInterface(I_SOFTSELECT) is called.  In order to limit the amount of data held by keyframe controllers 
01478 // the controller should build a weight table when ComputeWeights is called, and delete the weight table when ReleaseWeights()
01479 // is called.  The weight table is only valid while in Soft Selection mode.  The controller should keep track of how many times
01480 // GetInterface is called and only ReleaseWeights when the last client calls it.
01481 // R4.5 and later only
01482 class ISoftSelect: public MaxHeapOperators {
01483     public:
01484         virtual void ComputeWeights(TimeValue range, float falloff)=0;
01485         virtual float GetWeight(int i)=0;
01486         virtual void ReleaseWeights()=0;
01487     };
01488 
01489 //-----------------------------------------------------------
01490 // A plug-in can register itself to read a particular APP_DATA 
01491 // chunk when a 3DS file is loaded. If a chunk is encountered
01492 // that matches a registered plug-in, that plug-in will be
01493 // asked to create an instance of itself based on the contents
01494 // of the APP_DATA chunk.
01495 
01496 class TriObject;
01497 
01516 class ObjectDataReaderCallback: public MaxHeapOperators {
01517     public:
01518         // Chunk name
01525         virtual char *DataName()=0;
01526 
01527         // Create an instance of an object based on the data and the original mesh object
01548         virtual Object *ReadData(TriObject *obj, void *data, DWORD len)=0;
01549 
01554         virtual void DeleteThis()=0;
01555     };
01556  
01565 CoreExport void RegisterObjectAppDataReader(ObjectDataReaderCallback *cb);
01566  
01577 CoreExport Object *ObjectFromAppData(TriObject *obj, char *name, void *data, DWORD len);
01578 
01579 
01580 // Note about 3DS App Data:
01581 // If app data is encountered and no plug-in has registered to
01582 // convert it, then it is just hung off the object (or INode in
01583 // the case of KXP app data).
01584 // For object app data, TriObject's super class and class ID are used
01585 // to identify the chunk and the sub ID is set to 0.
01586 // For node app data, INode's super class and class ID are used
01587 // to identify the chunk and the sub ID is set to 0.
01588 //
01589 // This single MAX app data chunk will contain the entire
01590 // 3DS app data chunk, which may have sub chunks (see IPAS SDK).
01591 // The following routines will aid in parsing 3DS app data.
01592 
01593 // Get the ID string out of an XDATA_ENTRY chunk and null terminates it
01601 CoreExport void GetIDStr(char *chunk, char *idstring);
01602 
01603 // Returns the offset into 'appd' of the specified chunk 
01604 // or -1 if it is not found
01616 CoreExport int FindAppDataChunk(void *appd, DWORD len, char *idstring);
01617 
01618 // Similar to Find, but actually returns a pointer to the chunk
01619 // or NULL if it is not found
01630 CoreExport void *GetAppDataChunk(void *appd, DWORD len, char *idstring);
01631 
01632 // Adds the chunk to the appdata chunk, preserving existing chunks.
01633 // 'chunk' should point to the new chunk header followed by its data.
01645 CoreExport int SetAppDataChunk(void **pappd, DWORD &len, void *chunk);
01646 
01647 // Deletes a chunk from the appdata while preserving other chunks.
01657 CoreExport int DeleteAppDataChunk(void **pappd, DWORD &len, char *idstring);
01658 
01659 // Known sub chunks inside an appdata chunk
01660 #define XDATA_ENTRY     0x8001
01661 #define XDATA_APPNAME   0x8002
01662 
01663 
01664 
01665 //---------------------------------------------------------
01666 // Interface into MAX's default WAV sound object
01667 // use the Interface method GetSoundObject() to get a pointer
01668 // to the current sound object and then use the
01669 // GetWaveSoundInterface() on the result to see if it supports
01670 // this interface.
01671 
01686 class IWaveSound: public MaxHeapOperators {
01687     public:
01688         // Retreives the name of the current sound file asset
01690         virtual const MaxSDK::AssetManagement::AssetUser& GetSoundFile()=0;
01691 
01692         // Sets the sound file asset. This will cause the WAV to
01693         // be loaded into the tack view. Returns FALSE if
01694         // the file can't be opened or no wave track exist.
01702         virtual BOOL SetSoundFile(const MaxSDK::AssetManagement::AssetUser& name)=0;
01703 
01704         // Set the time offset for the wave
01709         virtual void SetStartTime(TimeValue t)=0;
01710 
01711         // Get the time offset for the wave
01713         virtual TimeValue GetStartTime()=0;     
01715         virtual TimeValue GetEndTime()=0;
01716     };
01717 
01718 
01719 //-----------------------------------------------------------
01720 //
01721 // Access to the boolean object's parameters. Given a pointer to
01722 // an object whose class ID is Class_ID(BOOLOBJ_CLASS_ID,0) or
01723 // NEWBOOL_CLASS_ID, you can cast that pointer to the following
01724 // class.  Note that some options do not work in the old Boolean
01725 // (BOOLOBJ_CLASS_ID), and there is no Optimize parameter in
01726 // the new Boolean.
01727 //
01728 
01729 #define BOOLOP_UNION            0
01730 #define BOOLOP_INTERSECTION     1
01731 #define BOOLOP_SUB_AB           2
01732 #define BOOLOP_SUB_BA           3
01733 #define BOOLOP_CUT              4
01734 
01735 #define BOOLOP_CUT_REFINE  0
01736 #define BOOLOP_CUT_SEPARATE  1
01737 #define BOOLOP_CUT_REMOVE_IN  2
01738 #define BOOLOP_CUT_REMOVE_OUT  3
01739 
01740 #define BOOLUPDATE_ALWAYS       0
01741 #define BOOLUPDATE_SELECTED     1
01742 #define BOOLUPDATE_RENDER       2
01743 #define BOOLUPDATE_MANUAL       3
01744 
01745 #define BOOL_ADDOP_REFERENCE 0
01746 #define BOOL_ADDOP_INSTANCE 1
01747 #define BOOL_ADDOP_COPY 2
01748 #define BOOL_ADDOP_MOVE 3
01749 
01750 #define BOOL_MAT_NO_MODIFY 0
01751 #define BOOL_MAT_IDTOMAT 1
01752 #define BOOL_MAT_MATTOID 2
01753 #define BOOL_MAT_DISCARD_ORIG 3
01754 #define BOOL_MAT_DISCARD_NEW 4
01755 
01775 class IBoolObject : public GeomObject {
01776 public:
01783     virtual BOOL GetOperandSel(int which)=0;
01791     virtual void SetOperandSel(int which,BOOL sel)=0;
01800     virtual int GetBoolOp()=0;
01811     virtual void SetBoolOp(int op)=0;
01818     virtual int GetBoolCutType()=0;
01827     virtual void SetBoolCutType(int ct)=0;
01830     virtual BOOL GetDisplayResult()=0;
01835     virtual void SetDisplayResult(BOOL onOff)=0;
01838     virtual BOOL GetShowHiddenOps()=0;
01843     virtual void SetShowHiddenOps(BOOL onOff)=0;
01850     virtual int GetUpdateMode()=0;
01859     virtual void SetUpdateMode(int mode)=0;
01863     virtual BOOL GetOptimize()=0;
01870     virtual void SetOptimize(BOOL onOff)=0;
01884     virtual void SetOperandA (TimeValue t, INode *node)=0;
01917     virtual void SetOperandB (TimeValue t, INode *node, INode *boolNode,
01918         int addOpMethod=0, int matMergeMethod=0, bool *canUndo=NULL)=0;
01919 };
01920 
01921 // The boolean object has five references. 2 references to the
01922 // operand objects, 2 references to transform controllers 
01923 // providing a transformation matrix for the 2 operands,
01924 // and one to the parameter block.
01925 #define BOOLREF_OBJECT1     0
01926 #define BOOLREF_OBJECT2     1
01927 #define BOOLREF_CONT1       2
01928 #define BOOLREF_CONT2       3
01929 #define BOOLREF_PBLOCK     4
01930 
01931 //-------------------------------------------------------------
01932 // Access to path controller's parameters.
01933 //
01934 //Function Publishing interface Added by Ambarish Goswami (8-26-2000)
01935 //***********************************************************
01936 
01937 class IPathPosition;
01938 
01939 #define PATH_CONSTRAINT_INTERFACE Interface_ID(0x79d15f78, 0x1f901f8e)
01940 #define GetIPathConstInterface(cd) \
01941         (IPathPosition*)(cd)->GetInterface(PATH_CONSTRAINT_INTERFACE)
01942 
01943 
01955 class IPathPosition : public Control, public FPMixinInterface  
01956 {
01957     public:
01958 
01959         enum {  get_num_targets,        get_node,           get_target_weight,      
01960                 set_target_weight,      append_target,      delete_target,};
01961 
01962         
01963         // Function Map for Function Publish System 
01964         //***********************************
01965         BEGIN_FUNCTION_MAP
01966         FN_0(get_num_targets,       TYPE_INT,  GetNumTargets);
01967         FN_1(get_node,              TYPE_INODE, GetNode, TYPE_INDEX);
01968         FN_1(get_target_weight,     TYPE_FLOAT, GetTargetWeight, TYPE_INDEX);
01969         FN_2(set_target_weight,     TYPE_BOOL, SetTargetWeight, TYPE_INDEX, TYPE_FLOAT);
01970         FN_2(append_target,         TYPE_BOOL, AppendTarget, TYPE_INODE, TYPE_FLOAT);
01971         FN_1(delete_target,         TYPE_BOOL, DeleteTarget, TYPE_INDEX);
01972         END_FUNCTION_MAP
01973 
01974         FPInterfaceDesc* GetDesc();    // <-- must implement 
01975 
01976         //End of Function Publishing system code 
01977         //***********************************
01978 
01982         virtual int GetNumTargets()=0;
01990         virtual INode* GetNode(int targetNumber)=0;
01999         virtual float GetTargetWeight(int targetNumber)=0;
02011         virtual BOOL SetTargetWeight(int targetNumber, float weight)=0;
02021         virtual BOOL AppendTarget(INode *target, float weight=50.0)=0;
02029         virtual BOOL DeleteTarget(int selection)=0; 
02030 
02036         virtual void SetFollow(BOOL f)=0;
02039         virtual BOOL GetFollow()=0;
02050         virtual void SetBankAmount(float a)=0;
02053         virtual float GetBankAmount()=0;
02058         virtual void SetBank(BOOL b)=0;
02061         virtual BOOL GetBank()=0;
02071         virtual void SetTracking(float t)=0;        // smoothness
02074         virtual float GetTracking()=0;
02079         virtual void SetAllowFlip(BOOL f)=0;
02082         virtual BOOL GetAllowFlip()=0;
02087         virtual void SetConstVel(BOOL cv)=0;
02090         virtual BOOL GetConstVel()=0;
02095         virtual void SetFlip(BOOL onOff)=0;
02098         virtual BOOL GetFlip()=0;
02106         virtual void SetAxis(int axis)=0;
02112         virtual int GetAxis()=0;
02117         virtual void SetLoop(BOOL l)=0;         // AG added
02120         virtual BOOL GetLoop()=0;               // AG added
02126         virtual void SetRelative(BOOL rel)=0;   // AG added
02129         virtual BOOL GetRelative()=0;   
02130 
02131     };
02132 
02133 // block IDs
02134 enum { path_params, path_joint_params };
02135 
02136 // path_params param IDs
02137 enum {  path_percent,           path_path,          path_follow,  
02138         path_bank,              path_bank_amount,   path_smoothness, 
02139         path_allow_upsidedown,  path_constant_vel,  path_axis, 
02140         path_axis_flip,         path_path_weight,   path_path_list, 
02141         path_loop,              path_relative,};
02142 
02143 // Bank and tracking are scaled in the UI.
02144 #define BANKSCALE 100.0f
02145 #define FromBankUI(a) ((a)*BANKSCALE)
02146 #define ToBankUI(a)   ((a)/BANKSCALE)
02147 
02148 #define TRACKSCALE 0.04f
02149 #define FromTrackUI(a) ((a)*TRACKSCALE)
02150 #define ToTrackUI(a)   ((a)/TRACKSCALE)
02151 
02152 // percent controller, path node and paramblock2 refs
02153 // #define PATHPOS_PERCENT_REF  0    // obsolete in Ed. 2, percent is an animatable in the ParamBlock
02154 #define PATHPOS_PATH_REF    1
02155 #define PATHPOS_PBLOCK_REF  2
02156 
02157 
02158 //-------------------------------------------------------------
02159 // // Access to Position Constraint controller's parameters.
02160 //  Ambarish Goswami implemented April, 2000
02161 
02162 //Function Publishing interface Added by Adam Felt (5-16-00)
02163 //***********************************************************
02164 
02165 class IPosConstPosition;
02166 
02167 #define POS_CONSTRAINT_INTERFACE Interface_ID(0x32040779, 0x794a1278)
02168 #define GetIPosConstInterface(cd) \
02169         (IPosConstPosition*)(cd)->GetInterface(POS_CONSTRAINT_INTERFACE)
02170 
02171 //***********************************************************
02172 
02183 class IPosConstPosition : public Control, public FPMixinInterface {
02184     public:
02185 
02186         enum {  get_num_targets,        get_node,           get_target_weight,      
02187                 set_target_weight,      append_target,      delete_target,};
02188         
02189         // Function Map for Function Publish System 
02190         //***********************************
02191         BEGIN_FUNCTION_MAP
02192         FN_0(get_num_targets,               TYPE_INT, GetNumTargets);
02193         FN_1(get_node,                      TYPE_INODE, GetNode, TYPE_INDEX);
02194         FN_1(get_target_weight,             TYPE_FLOAT, GetTargetWeight, TYPE_INDEX);
02195         FN_2(set_target_weight,             TYPE_BOOL, SetTargetWeight, TYPE_INDEX, TYPE_FLOAT);
02196         FN_2(append_target,                 TYPE_BOOL, AppendTarget, TYPE_INODE, TYPE_FLOAT);
02197         FN_1(delete_target,                 TYPE_BOOL, DeleteTarget, TYPE_INDEX);
02198         END_FUNCTION_MAP
02199 
02200         FPInterfaceDesc* GetDesc();    // <-- must implement 
02201         //End of Function Publishing system code 
02202         //***********************************
02203 
02206         virtual int GetNumTargets()=0;
02212         virtual INode* GetNode(int targetNumber)=0;
02221         virtual float GetTargetWeight(int targetNumber)=0;
02233         virtual BOOL SetTargetWeight(int targetNumber, float weight)=0;
02245         virtual BOOL AppendTarget(INode *target, float weight=50.0)=0;
02251         virtual BOOL DeleteTarget(int selection)=0; 
02252     };
02253 
02254 #define POSPOS_PBLOCK_REF   0
02255 
02256 
02257 //-------------------------------------------------------------
02258 // // Access to Orientation Constraint controller's parameters.
02259 //  Ambarish Goswami implemented May, 2000
02260 
02261 //Function Publishing interface Added by Ambarish Goswami 6/18/2000 adapted from Adam Felt (5-16-00)
02262 //**************************************************************************************************
02263 
02264 class IOrientConstRotation;
02265 
02266 #define ORIENT_CONSTRAINT_INTERFACE Interface_ID(0x71e2231b, 0x72522ab2)
02267 #define GetIOrientConstInterface(cd) \
02268         (IOrientConstRotation*)(cd)->GetInterface(ORIENT_CONSTRAINT_INTERFACE)
02269 
02270 //***********************************************************
02271 
02284 class IOrientConstRotation : public Control, public FPMixinInterface {
02285     public:
02286 
02287         enum {  get_num_targets,        get_node,           get_target_weight,      
02288                 set_target_weight,      append_target,      delete_target,};
02289 
02290         
02291         // Function Map for Function Publish System 
02292         //***********************************
02293         BEGIN_FUNCTION_MAP
02294         FN_0(get_num_targets,       TYPE_INT,  GetNumTargets);
02295         FN_1(get_node,              TYPE_INODE, GetNode, TYPE_INDEX);
02296         FN_1(get_target_weight,     TYPE_FLOAT, GetTargetWeight, TYPE_INDEX);
02297         FN_2(set_target_weight,     TYPE_BOOL, SetTargetWeight, TYPE_INDEX, TYPE_FLOAT);
02298         FN_2(append_target,         TYPE_BOOL, AppendTarget, TYPE_INODE, TYPE_FLOAT);
02299         FN_1(delete_target,         TYPE_BOOL, DeleteTarget, TYPE_INDEX);
02300         END_FUNCTION_MAP
02301 
02302         FPInterfaceDesc* GetDesc();    // <-- must implement 
02303         //End of Function Publishing system code 
02304         //***********************************
02305 
02308         virtual int GetNumTargets()=0;
02314         virtual INode* GetNode(int targetNumber)=0;
02323         virtual float GetTargetWeight(int targetNumber)=0;
02335         virtual BOOL SetTargetWeight(int targetNumber, float weight)=0;
02347         virtual BOOL AppendTarget(INode *target, float weight=50.0)=0;
02353         virtual BOOL DeleteTarget(int selection)=0;
02354     };
02355 
02356 #define ORIENT_ROT_PBLOCK_REF   0
02357 
02358 
02359 
02360 //-------------------------------------------------------------
02361 // // Access to LookAt Constraint controller's parameters.
02362 //  Ambarish Goswami implemented May, 2000
02363 
02364 //Function Publishing interface Added by Ambarish Goswami 5/24/2000 adapted from Adam Felt (5-16-00)
02365 //**************************************************************************************************
02366 
02367 
02368 class ILookAtConstRotation;
02369 
02370 #define LOOKAT_CONSTRAINT_INTERFACE Interface_ID(0x5dbe7ad8, 0x1d1b488b)
02371 #define GetILookAtConstInterface(cd) \
02372         (ILookAtConstRotation*)(cd)->GetInterface(LOOKAT_CONSTRAINT_INTERFACE)
02373 
02374 //***********************************************************
02375 
02386 class ILookAtConstRotation : public Control , public FPMixinInterface {
02387     public:
02388 
02389         enum {  get_num_targets,        get_node,           get_target_weight,      
02390                 set_target_weight,      append_target,      delete_target,};
02391 
02392         // FUNCTION_PUBLISHING
02393         
02394         // Function Map for Function Publish System 
02395         //***********************************
02396         BEGIN_FUNCTION_MAP
02397         FN_0(get_num_targets,       TYPE_INT,  GetNumTargets);
02398         FN_1(get_node,              TYPE_INODE, GetNode, TYPE_INDEX);
02399         FN_1(get_target_weight,     TYPE_FLOAT, GetTargetWeight, TYPE_INDEX);
02400         FN_2(set_target_weight,     TYPE_BOOL, SetTargetWeight, TYPE_INDEX, TYPE_FLOAT);
02401         FN_2(append_target,         TYPE_BOOL, AppendTarget, TYPE_INODE, TYPE_FLOAT);
02402         FN_1(delete_target,         TYPE_BOOL, DeleteTarget, TYPE_INDEX);
02403 
02404         END_FUNCTION_MAP
02405 
02406         FPInterfaceDesc* GetDesc();    // <-- must implement 
02407         //End of Function Publishing system code 
02408         //***********************************
02409 
02412         virtual int GetNumTargets()=0;
02413         virtual INode* GetNode(int targetNumber)=0;
02421         virtual float GetTargetWeight(int targetNumber)=0;
02431         virtual BOOL SetTargetWeight(int targetNumber, float weight)=0;
02441         virtual BOOL AppendTarget(INode *target, float weight=50.0)=0;
02446         virtual BOOL DeleteTarget(int selection)=0;
02447 
02448 
02451         virtual BOOL GetRelative()=0;
02462         virtual BOOL GetVLisAbs()=0;
02465         virtual BOOL GetUpnodeWorld()=0;
02468         virtual BOOL GetStoUPAxisFlip()=0;
02471         virtual BOOL GetTargetAxisFlip()=0;
02474         virtual BOOL Get_SetOrientation()=0;
02482         virtual int GetTargetAxis()=0;
02491         virtual int GetUpNodeAxis()=0;
02499         virtual int Get_StoUPAxis()=0;
02500         virtual int Get_upnode_control()=0;
02505         virtual void SetRelative(BOOL rel)=0;
02512         virtual void SetVLisAbs(BOOL rel)=0;
02517         virtual void SetUpnodeWorld(BOOL uw)=0;
02523         virtual void SetTargetAxisFlip(BOOL rel)=0;
02529         virtual void SetStoUPAxisFlip(BOOL rel)=0;
02534         virtual void Set_SetOrientation(BOOL rel)=0;
02537         virtual void Set_Reset_Orientation()=0;
02546         virtual void SetTargetAxis(int axis)=0;
02556         virtual void SetUpNodeAxis(int axis)=0;
02566         virtual void Set_StoUPAxis(int axis)=0;
02567 
02568 
02569     };
02570 
02571 #define LOOKAT_ROT_PBLOCK_REF   0
02572 
02573 
02574 //-------------------------------------------------------------
02575 // Access to noise controller's parameters.
02576 // All noise controllers are derived from this class
02577 //
02578 
02585 class INoiseControl : public StdControl {
02586     public:
02591         virtual void SetSeed(int seed)=0;
02593         virtual int GetSeed()=0;
02598         virtual void SetFrequency(float f)=0;
02600         virtual float GetFrequency()=0;
02605         virtual void SetFractal(BOOL f)=0;
02608         virtual BOOL GetFractal()=0;
02613         virtual void SetRoughness(float f)=0;
02615         virtual float GetRoughness()=0;
02620         virtual void SetRampIn(TimeValue in)=0;
02622         virtual TimeValue GetRampIn()=0;
02627         virtual void SetRampOut(TimeValue out)=0;
02629         virtual TimeValue GetRampOut()=0;
02638         virtual void SetPositiveOnly(int which,BOOL onOff)=0;
02645         virtual BOOL GetPositiveOnly(int which)=0;
02648         virtual Control *GetStrengthController()=0;
02653         virtual void SetStrengthController(Control *c)=0;
02654     };
02655 
02656 //-------------------------------------------------------------
02657 // Access to SurfPosition controller
02658 //
02659 
02670 class ISurfPosition : public Control {
02671     public:
02677         virtual void SetSurface(INode *node)=0;
02683         virtual int GetAlign()=0;
02691         virtual void SetAlign(int a)=0;
02693         virtual BOOL GetFlip()=0;
02698         virtual void SetFlip(BOOL f)=0;
02699     };
02700 
02701 // Surface controller references
02702 #define SURFCONT_U_REF          0
02703 #define SURFCONT_V_REF          1
02704 #define SURFCONT_SURFOBJ_REF    2
02705 
02706 
02707 //-------------------------------------------------------------
02708 // Access to the LinkCtrl
02709 //
02710 
02711 class ILinkCtrl;
02712 #define LINK_CONSTRAINT_INTERFACE Interface_ID(0x32f03b37, 0x6700693a)
02713 #define GetLinkConstInterface(cd) \
02714         (LinkConstTransform*)(cd)->GetInterface(LINK_CONSTRAINT_INTERFACE)
02715 #define ADD_WORLD_LINK  PROPID_USER + 10
02716 #define LINK_TIME_CONTROL_CLASS_ID Class_ID(0x5d084b4b, 0x1b1d318a)
02717 
02734 class ILinkCtrl : public Control, public FPMixinInterface  
02735 {
02736     public:
02737 
02738         enum {  get_num_targets,        get_node,           set_node,
02739                 get_frame_no,           set_frame_no,       add_target,     
02740                 delete_target,          add_world, };
02741         
02742 
02743         // FUNCTION_PUBLISHING      
02744         // Function Map for Function Publish System 
02745         //***********************************
02746         BEGIN_FUNCTION_MAP
02747 
02748             FN_0(get_num_targets,   TYPE_INT,  GetNumTargets);
02749             FN_1(get_node,          TYPE_INODE, GetNode, TYPE_INDEX);
02750 //          FN_2(set_node,          TYPE_BOOL, SetNode, TYPE_INODE, TYPE_INT);
02751             FN_1(get_frame_no,      TYPE_INT, GetFrameNumber, TYPE_INDEX);
02752             FN_2(set_frame_no,      TYPE_BOOL, SetFrameNumber, TYPE_INDEX, TYPE_INT);
02753             FN_2(add_target,        TYPE_BOOL, AddTarget, TYPE_INODE, TYPE_INT);
02754             FN_1(delete_target,     TYPE_BOOL, DeleteTarget, TYPE_INDEX);
02755             FN_1(add_world,         TYPE_INT, AddWorld, TYPE_INT);
02756 
02757         END_FUNCTION_MAP
02758 
02759         FPInterfaceDesc* GetDesc();    // <-- must implement 
02760         //End of Function Publishing system code 
02761         //***********************************{
02762 //  public:
02766         virtual int GetNumTargets()=0;
02771         virtual TimeValue GetLinkTime(int i)=0;
02780         virtual void SetLinkTime(int i,TimeValue t)=0;
02784         virtual void LinkTimeChanged()=0; // call after changing  Link times
02791         virtual void AddNewLink(INode *node,TimeValue t)=0;
02796         virtual BOOL DeleteTarget(int frameNo)=0;
02797 
02803         virtual int GetFrameNumber(int targetNumber)=0;
02813         virtual BOOL SetFrameNumber(int targetNumber, int frameNumber)=0;
02814 //      virtual BOOL SetNode(INode *target, int targetNumber)=0;
02824         virtual BOOL AddTarget(INode *target, int frameNo)=0;
02825 //      BOOL AddWorld(int frameNo)=0;
02833         virtual INode* GetNode(int targetNumber)=0;
02834 
02835     private:
02836 
02837         virtual int AddWorld(int frameNo)
02838         {
02839             if (frameNo==-99999) frameNo = GetCOREInterface()->GetTime()/GetTicksPerFrame();
02840             return SetProperty(ADD_WORLD_LINK, &frameNo);
02841         }
02842 
02843     };
02844 
02845 // LinkCtrl references
02846 #define LINKCTRL_CONTROL_REF        0   // the TM controller
02847 #define LINKCTRL_FIRSTPARENT_REF    1   // parent nodes... refs 1-n
02848 #define LINKCTRL_PBLOCK_REF         2   // added for Paramblock implementation
02849 #define LINKCTRL_LTCTL_REF          3
02850 #define LINKCTRL_CORE_REFs          4  //Total "core" refs for LINKCTRL, nodes references start at this index
02851 
02852 
02853 
02854 //-------------------------------------------------------------
02855 // Access to the OLD LookatControl
02856 //
02857 
02869 class ILookatControl : public Control {
02870     public:
02875         virtual void SetFlip(BOOL f)=0;
02878         virtual BOOL GetFlip()=0;
02886         virtual void SetAxis(int a)=0;
02892         virtual int GetAxis()=0;
02893     };
02894 
02895 // References for the lookat controller
02896 #define LOOKAT_TARGET_REF   0
02897 #define LOOKAT_POS_REF      1
02898 #define LOOKAT_ROLL_REF     2
02899 #define LOOKAT_SCL_REF      3
02900 
02901 //-------------------------------------------------------------
02902 //Access to the New Boolean Controller AG 11/08/01
02903 //
02904 
02905 
02906 class IBoolCntrl;
02907 #define BOOL_CONTROL_INTERFACE Interface_ID(0x5d511b6, 0x52a302db)
02908 #define GetIBoolCntrlInterface(cd) \
02909         (IBoolCntrl*)(cd)->GetInterface(BOOL_CONTROL_INTERFACE)
02910 
02949 class IBoolCntrl: public StdControl, public IKeyControl {
02950 
02951 };
02952 
02953 // References for the boolean controller controller
02954 #define BOOL_PBLOCK_REF     0
02955 
02956 
02957 
02958 //-------------------------------------------------------------
02959 // [dl | 22mar2002]
02960 // Interface for exposing the new parameter "Use Target as Up Node" of the
02961 // LookAtControl
02962 #define ILOOKATCONTROL_EXTENSION Interface_ID(0x40ce4981, 0x3ea31c3b)
02963 
02964 class ILookatControl_Extension : public FPMixinInterface {
02965 public:
02966 
02967     virtual void SetTargetIsUpNode(bool val) = 0;
02968     virtual bool GetTargetIsUpNode() const = 0;
02969 
02970     // -- From BaseInterface
02971     virtual Interface_ID GetID() { return ILOOKATCONTROL_EXTENSION; }
02972 };
02973 
02974 
02975 //-------------------------------------------------------------
02976 //Access to the List Controller
02977 //
02978 #define FLOATLIST_CONTROL_CLASS_ID      0x4b4b1000
02979 #define POINT3LIST_CONTROL_CLASS_ID     0x4b4b1001
02980 #define POSLIST_CONTROL_CLASS_ID        0x4b4b1002
02981 #define ROTLIST_CONTROL_CLASS_ID        0x4b4b1003
02982 #define SCALELIST_CONTROL_CLASS_ID      0x4b4b1004
02983 #define DUMMY_CONTROL_CLASS_ID          0xeeefffff
02984 #define MASTERLIST_CONTROL_CLASS_ID     0x4b4b1015
02985 #define POINT4LIST_CONTROL_CLASS_ID     0x4b4b1005
02986 
02987 class IListControl;
02988 
02989 #define LIST_CONTROLLER_INTERFACE Interface_ID(0x444e7687, 0x722e6e36)
02990 
02991 #define GetIListControlInterface(cd) \
02992         (IListControl*)(cd)->GetInterface(LIST_CONTROLLER_INTERFACE)
02993 
02995 
03009 class IListControl : public Control, public FPMixinInterface {
03010     public:
03011         
03012         enum{ list_getNumItems, list_setActive, list_getActive, list_cutItem, list_pasteItem, 
03013               list_deleteItem, list_count, list_setActive_prop, list_getActive_prop, 
03014               list_getName, list_setName, 
03015               list_getSubCtrl, list_getSubCtrlWeight};
03016 
03017         // FUNCTION_PUBLISHING      
03018         // Function Map for Function Publish System 
03019         //***********************************
03020         #pragma warning(push)
03021         #pragma warning(disable:4238)
03022         BEGIN_FUNCTION_MAP
03023             FN_0        (list_getNumItems,  TYPE_INT,   GetListCount                );
03024             VFN_1       (list_setActive,                SetActive,      TYPE_INDEX  );
03025             FN_0        (list_getActive,    TYPE_INDEX, GetActive                   );
03026             VFN_1       (list_deleteItem,               DeleteItem,     TYPE_INDEX  );
03027             VFN_1       (list_cutItem,                  CutItem,        TYPE_INDEX  );
03028             VFN_1       (list_pasteItem,                PasteItem,      TYPE_INDEX  );
03029             FN_1        (list_getName,    TYPE_TSTR_BV, GetName,        TYPE_INDEX  );
03030             VFN_2       (list_setName,                  SetName,        TYPE_INDEX, TYPE_STRING );
03031             RO_PROP_FN  (list_count,                    GetListCount,   TYPE_INT    ); 
03032             PROP_FNS    (list_getActive_prop, GetActive, list_setActive_prop, SetActive, TYPE_INDEX ); 
03033             FN_1        (list_getSubCtrl,   TYPE_CONTROL,   GetSubCtrl, TYPE_INDEX  );
03034             FNT_1       (list_getSubCtrlWeight, TYPE_FLOAT, GetSubCtrlWeight,   TYPE_INDEX  );
03035         END_FUNCTION_MAP
03036         #pragma warning(pop)
03037 
03038         FPInterfaceDesc* GetDesc();    // <-- must implement 
03039         //End of Function Publishing system code 
03040         //***********************************
03041 
03044         virtual int  GetListCount()=0;
03051         virtual void SetActive(int index)=0;
03054         virtual int  GetActive()=0;
03060         virtual void DeleteItem(int index)=0;
03066         virtual void CutItem(int index)=0;
03073         virtual void PasteItem(int index)=0;
03081         virtual void SetName(int index, MSTR name)=0;
03087         virtual MSTR GetName(int index)=0;
03088 
03092         virtual Control*    GetSubCtrl(int in_index) const =0;
03093 
03098         virtual float       GetSubCtrlWeight(int in_index, TimeValue in_time) const=0;
03099 };
03100 
03101 
03102 //-------------------------------------------------------------
03103 // Access to Spline IK Control modifier
03104 //
03105 class ISplineIKControl;
03106 #define SPLINEIK_CONTROL_INTERFACE Interface_ID(0x7c93607a, 0x47d54f80)
03107 #define GetISplineIKControlInterface(cd) \
03108         (ISplineIKControl*)(cd)->GetInterface(SPLINEIK_CONTROL_INTERFACE)
03109 
03148 class ISplineIKControl: public Modifier, public FPMixinInterface {
03149 
03150     public:
03151 
03152         enum { SplineIKControl_params };
03153 
03154         enum {  
03155             sm_point_node_list,     sm_helpersize,  sm_helper_centermarker,     sm_helper_axistripod, 
03156             sm_helper_cross,        sm_helper_box,  sm_helper_screensize,       sm_helper_drawontop,
03157             sm_link_types,
03158 
03159         };
03160 
03161         enum{ getHelperCount, getKnotCount, link_allToRoot, link_allinHierarchy, link_none, create_hlpr};
03162 
03163         // FUNCTION_PUBLISHING      
03164         // Function Map for Function Publish System 
03165         //***********************************
03166         BEGIN_FUNCTION_MAP
03167             FN_0        (getHelperCount,        TYPE_INT,   GetHelperCount      );
03168             FN_0        (getKnotCount,          TYPE_INT,   GetKnotCount        );
03169             FN_0        (link_allToRoot,        TYPE_BOOL,  LinkToRoot          );
03170             FN_0        (link_allinHierarchy,   TYPE_BOOL,  LinkInHierarchy     );
03171             FN_0        (link_none,             TYPE_BOOL,  UnLink              );
03172             FN_1        (create_hlpr,           TYPE_BOOL,  CreateHelpers,      TYPE_INT);
03173         END_FUNCTION_MAP
03174 
03175         FPInterfaceDesc* GetDesc();    // <-- must implement 
03176         //End of Function Publishing system code 
03177         //***********************************
03178 
03181         virtual int  GetHelperCount()=0;
03184         virtual int  GetKnotCount()=0;
03190         virtual BOOL LinkToRoot() = 0;
03198         virtual BOOL LinkInHierarchy() = 0;
03203         virtual BOOL UnLink() = 0;
03207         virtual BOOL CreateHelpers(int knotCt) = 0;
03208 
03209 };
03210 
03211 // References for the splineIK controller
03212 #define SPLINEIKCONTROL_PBLOCK_REF      0
03213 
03214 
03215 
03216 // The following two enums are transfered from helpers\pthelp.cpp by AG: 01/20/2002 
03217 // in order to access the parameters for use in Spline IK Control modifier
03218 // and the Spline IK Solver
03219 
03220 // block IDs
03221 enum { pointobj_params, };
03222 
03223 // pointobj_params IDs
03224 
03225  enum { 
03226     pointobj_size, pointobj_centermarker, pointobj_axistripod, 
03227     pointobj_cross, pointobj_box, pointobj_screensize, pointobj_drawontop };
03228 
03229 
03230 
03231 // The following two enums are transfered from modifiers\nspline.cpp  by AG: 01/20/2002 
03232 // in order to access the parameters for use in Spline IK Solver
03233 
03234 // block IDs
03235 enum { nspline_params};
03236 
03237 // nspline_params ID
03238 enum { nspline_length};
03239 
03242 class ISplineIKControl2;
03243 #define SPLINEIK_CONTROL_INTERFACE2 Interface_ID(0x72428cc, 0x2a4a1b5f)
03244 #define GetISplineIKControlInterface2(cd) \
03245         (ISplineIKControl2*)(cd)->GetInterface(SPLINEIK_CONTROL_INTERFACE2)
03246 class ISplineIKControl2 : public BaseInterface
03247 {
03248 public:
03251     virtual void GetHelperNodes(INodeTab & helperNodes)=0;
03252 };
03253 
03254 
03255 
03256 //-------------------------------------------------------------
03257 // Access to FFD modifiers
03258 //
03259 
03260 // Can either be casted to IFFDMod<Modifier> or IFFDMod<WSMObject> based on the ClassID
03279 template <class T> class IFFDMod : public T {
03280     public:
03282         virtual int         NumPts()=0;                             // number of lattice control points 
03285         virtual int         NumPtConts()=0;                         // number of CP's having controllers
03290         virtual Control*    GetPtCont(int i)=0;                     // get i'th CP controller
03297         virtual void        SetPtCont(int i,Control *c)=0;          // set i'th CP controller
03302         virtual Point3      GetPt(int i)=0;                         // get i'th CP
03309         virtual void        SetPt(int i, Point3 p)=0;               // set i'th CP
03316         virtual void        SetGridDim(IPoint3 d) { }               // set the lattice dimensions
03320         virtual IPoint3     GetGridDim() { return IPoint3(0,0,0); } // get the lattice dimensions
03325         virtual void        AnimateAll() { }                        // assign controllers to all CP's               
03331         virtual void        Conform() { }                           // not valid for WSMObject's
03343         virtual void        SelectPt(int i, BOOL sel, BOOL clearAll=FALSE) { }
03344         virtual void        PlugControllers(TimeValue t,BOOL all)=0;
03345 };
03346 
03347 //-------------------------------------------------------------
03348 // Access to mesh selections in editable mesh and edit mesh mod
03349 //
03350 
03351 #include "namesel.h"
03352 
03353 // Selection levels:
03354 #define IMESHSEL_OBJECT 0
03355 #define IMESHSEL_VERTEX 1
03356 #define IMESHSEL_FACE 2
03357 #define IMESHSEL_EDGE 3
03358 
03373 class IMeshSelect: public MaxHeapOperators {
03374 public:
03381     virtual DWORD GetSelLevel()=0;
03390     virtual void SetSelLevel(DWORD level)=0;
03396     virtual void LocalDataChanged()=0;
03401     virtual BOOL HasWeightedVertSel () { return FALSE; }
03406     virtual BOOL CanAssignWeightedVertSel () { return FALSE; }
03407 };
03408 
03426 class IMeshSelectData: public MaxHeapOperators {
03427 public:
03431     virtual BitArray GetVertSel()=0;
03435     virtual BitArray GetFaceSel()=0;
03439     virtual BitArray GetEdgeSel()=0;
03440     
03452     virtual void SetVertSel(BitArray &set, IMeshSelect *imod, TimeValue t)=0;
03464     virtual void SetFaceSel(BitArray &set, IMeshSelect *imod, TimeValue t)=0;
03476     virtual void SetEdgeSel(BitArray &set, IMeshSelect *imod, TimeValue t)=0;
03477 
03481     virtual GenericNamedSelSetList & GetNamedVertSelList ()=0;
03485     virtual GenericNamedSelSetList & GetNamedEdgeSelList ()=0;
03489     virtual GenericNamedSelSetList & GetNamedFaceSelList ()=0;
03490 
03499     virtual void GetWeightedVertSel (int nv, float *sel) {}
03513     virtual void SetWeightedVertSel (int nv, float *sel, IMeshSelect *imod, TimeValue t) {}
03514 };
03515 
03516 //-------------------------------------------------------------
03517 // Access to spline selections and operations in SplineShape and EditSplineMod
03518 //
03519 
03520 // selection levels defined in splshape.h   
03521 
03532 class ISplineSelect: public MaxHeapOperators                    // accessed via GetInterface(I_SPLINESELECT)
03533 {
03534 public:
03541     virtual DWORD GetSelLevel()=0;
03550     virtual void SetSelLevel(DWORD level)=0;
03555     virtual void LocalDataChanged()=0;
03556 };
03557 
03571 class ISplineSelectData: public MaxHeapOperators                // accessed via GetInterface(I_SPLINESELECTDATA)
03572 {
03573 public:
03574     // access spline sub-object selections, current & named
03578     virtual BitArray GetVertSel()=0;
03582     virtual BitArray GetSegmentSel()=0;
03586     virtual BitArray GetSplineSel()=0;
03587     
03597     virtual void SetVertSel(BitArray &set, ISplineSelect *imod, TimeValue t)=0;
03607     virtual void SetSegmentSel(BitArray &set, ISplineSelect *imod, TimeValue t)=0;
03617     virtual void SetSplineSel(BitArray &set, ISplineSelect *imod, TimeValue t)=0;
03618 
03622     virtual GenericNamedSelSetList & GetNamedVertSelList ()=0;
03626     virtual GenericNamedSelSetList & GetNamedSegmentSelList ()=0;
03630     virtual GenericNamedSelSetList & GetNamedSplineSelList ()=0;
03631 };
03632 
03633 enum splineCommandMode { ScmCreateLine, ScmAttach, ScmInsert, ScmConnect, ScmRefine, ScmFillet, ScmChamfer, 
03634                          ScmBind, ScmRefineConnect, ScmOutline, ScmTrim, ScmExtend, ScmCrossInsert,
03635                          ScmBreak, ScmUnion, ScmSubtract, ScmCrossSection, ScmCopyTangent, ScmPasteTangent, };
03636 enum splineButtonOp    { SopHide, SopUnhideAll, SopDelete, SopDetach, SopDivide, SopCycle,
03637                          SopUnbind, SopWeld, SopMakeFirst, SopAttachMultiple, SopExplode, SopReverse, 
03638                          SopClose, SopIntersect, SopMirrorHoriz, SopMirrorVert,
03639                          SopMirrorBoth, SopSelectByID, SopFuse, };
03640 // LAM: added 9/3/00
03641 enum splineUIParam {  };
03642 
03652 class ISplineOps: public MaxHeapOperators               // accessed via GetInterface(I_SPLINEOPS)
03653 {
03654 public:
03655     // start up interactive command mode, uses mode enum above
03675     virtual void StartCommandMode(splineCommandMode mode)=0;
03676     // perform button op, uses op enum above
03704     virtual void ButtonOp(splineButtonOp opcode)=0;
03705 // LAM: added 9/3/00
03706     // UI controls access
03716     virtual void GetUIParam (splineUIParam uiCode, int & ret) { }
03726     virtual void SetUIParam (splineUIParam uiCode, int val) { }
03736     virtual void GetUIParam (splineUIParam uiCode, float & ret) { }
03746     virtual void SetUIParam (splineUIParam uiCode, float val) { }
03747 };
03748 
03749 //-------------------------------------------------------------
03750 // Access to spline selections and operations in PatchObject and EditPatchMod
03751 //
03752 
03753 // selection levels defined in patchobj.h   
03754 
03765 class IPatchSelect: public MaxHeapOperators                 // accessed via GetInterface(I_PATCHSELECT)
03766 {
03767 public:
03774     virtual DWORD GetSelLevel()=0;
03783     virtual void SetSelLevel(DWORD level)=0;
03788     virtual void LocalDataChanged()=0;
03789 };
03790 
03804 class IPatchSelectData: public MaxHeapOperators             // accessed via GetInterface(I_PATCHSELECTDATA)
03805 {
03806 public:
03807     // access patch sub-object selections, current & named
03808     virtual BitArray GetVecSel()=0;
03812     virtual BitArray GetVertSel()=0;
03816     virtual BitArray GetEdgeSel()=0;
03820     virtual BitArray GetPatchSel()=0;
03821     
03822     virtual void SetVecSel(BitArray &set, IPatchSelect *imod, TimeValue t)=0;
03832     virtual void SetVertSel(BitArray &set, IPatchSelect *imod, TimeValue t)=0;
03842     virtual void SetEdgeSel(BitArray &set, IPatchSelect *imod, TimeValue t)=0;
03852     virtual void SetPatchSel(BitArray &set, IPatchSelect *imod, TimeValue t)=0;
03853 
03854     virtual GenericNamedSelSetList & GetNamedVecSelList ()=0;
03858     virtual GenericNamedSelSetList & GetNamedVertSelList ()=0;
03861     virtual GenericNamedSelSetList & GetNamedEdgeSelList ()=0;
03864     virtual GenericNamedSelSetList & GetNamedPatchSelList ()=0;
03865 };
03866 
03867 enum patchCommandMode { PcmAttach, PcmExtrude, PcmBevel, PcmBind, PcmCreate, PcmWeldTarget,
03868                         PcmFlipNormal, PcmCopyTangent, PcmPasteTangent };
03869 enum patchButtonOp    { PopUnbind, PopHide, PopUnhideAll, PopWeld, PopDelete, PopSubdivide,
03870                         PopAddTri, PopAddQuad, PopDetach, PopSelectOpenEdges, PopBreak, 
03871                         PopCreateShapeFromEdges, PopFlipNormal, PopUnifyNormal, PopSelectByID, 
03872                         PopSelectBySG, PopClearAllSG, PopPatchSmooth, PopSelectionShrink, PopSelectionGrow,
03873                         PopEdgeRingSel, PopEdgeLoopSel, PopShadedFaceToggle };
03874 // LAM: added 9/3/00
03875 enum patchUIParam {  };
03876 
03886 class IPatchOps: public MaxHeapOperators                // accessed via GetInterface(I_PATCHOPS)
03887 {
03888 public:
03889     // start up interactive command mode, uses mode enum above
03900     virtual void StartCommandMode(patchCommandMode mode)=0;
03901     // perform button op, uses op enum above
03917     virtual void ButtonOp(patchButtonOp opcode)=0;
03918 // LAM: added 9/3/00
03919     // UI controls access
03929     virtual void GetUIParam (patchUIParam uiCode, int & ret) { }
03939     virtual void SetUIParam (patchUIParam uiCode, int val) { }
03949     virtual void GetUIParam (patchUIParam uiCode, float & ret) { }
03959     virtual void SetUIParam (patchUIParam uiCode, float val) { }
03960 };
03961 
03962 #pragma warning(pop)
03963 
03964 //----------------------------------------------------------------
03965 // Access to the new Assign Vertex Color utility - MAB - 6/04/03
03966 
03967 #define APPLYVC_UTIL_CLASS_ID   Class_ID(0x6e989195, 0x5dfb41b7)
03968 #define IASSIGNVERTEXCOLORS_INTERFACE_ID Interface_ID(0x4f913fd8, 0x422a32af)
03969 
03970 namespace LightingModel
03971 {
03972    enum LightingModel {       
03973       kLightingOnly = 0,      
03974       kShadedLighting = 1,    
03975       kShadedOnly = 2         
03976    };
03977 }
03978 
03987 class IAssignVertexColors : public FPStaticInterface {
03988 public:
03989     DECLARE_DESCRIPTOR( IAssignVertexColors );
03990 
03991    typedef LightingModel::LightingModel LightingModel;
03992 
03994     class Options: public MaxHeapOperators {
03995     public:
03996         int mapChannel;
03997         bool mixVertColors; 
03998         bool castShadows;
03999         bool useMaps;
04000         bool useRadiosity;
04001         bool radiosityOnly;
04002         LightingModel lightingModel;
04003     };
04004 
04006 
04013     virtual int     ApplyNodes( Tab<INode*>* nodes, ReferenceTarget* iVertexPaint=NULL ) = 0;
04014     
04016     virtual void    GetOptions( Options& options ) = 0;
04018     virtual void    SetOptions( Options& options ) = 0;
04019 };
04020 
04021 #define IASSIGNVERTEXCOLORS_R7_INTERFACE_ID Interface_ID(0x77870f30, 0x4ed82b62)
04022 
04029 class IAssignVertexColors_R7 : public IAssignVertexColors {
04030 public:
04031     DECLARE_DESCRIPTOR( IAssignVertexColors_R7 );
04032 
04034     class Options2 : public IAssignVertexColors::Options
04035     {
04036     public:
04037         bool reuseIllumination;         
04038     } ;
04039 
04041     virtual void    GetOptions2( Options2& options ) = 0;
04043     virtual void    SetOptions2( Options2& options ) = 0;
04044 };
04045 
04046 //----------------------------------------------------------------
04047 // Access to the new Vertex Paint modifier in 3ds max 6 - MAB - 5/15/03
04048 
04049 #define PAINTLAYERMOD_CLASS_ID  Class_ID(0x7ebb4645, 0x7be2044b)
04050 #define IVERTEXPAINT_INTERFACE_ID Interface_ID(0x3e262ef9, 0x220e7190)
04051 
04064 class IVertexPaint : public FPMixinInterface {
04065 public:
04066     struct FaceColor: public MaxHeapOperators { 
04067         Color colors[3];
04068     };
04069     typedef Tab<Color*> VertColorTab;
04070     typedef Tab<FaceColor*> FaceColorTab;
04071     typedef IAssignVertexColors::Options Options;
04072 
04074 
04079     virtual int     SetColors( INode* node, VertColorTab& vertColors ) = 0;
04080     
04082 
04087     virtual int     SetColors( INode* node, FaceColorTab& faceColors ) = 0;
04089     virtual void    GetOptions( Options& options ) = 0;
04091     virtual void    SetOptions( Options& options ) = 0;
04092 };
04093 
04094 #define IVERTEXPAINT_R7_INTERFACE_ID Interface_ID(0x4ea42df5, 0x44a35866)
04095 
04096 class IVertexPaint_R7 : public IVertexPaint {
04097 public:
04098     typedef IAssignVertexColors_R7::Options2 Options2;
04099 
04100     // Assumes colors were calculated on the same object as seen by the modifier (converted to a tri-mesh)
04101     virtual void    GetOptions2( Options2& options ) = 0;
04102     virtual void    SetOptions2( Options2& options ) = 0;
04103 };
04104 
04105 
04106 // Interface for the TimeSlider
04107 #define TIMESLIDER_INTERFACE Interface_ID(0x829e89e5, 0x878ef6e5)
04108 
04110 
04114 class ITimeSlider : public FPStaticInterface {
04115 public:
04126     virtual void    SetVisible(BOOL bVisible, BOOL bPersistent = TRUE) = 0;
04129     virtual BOOL    IsVisible() = 0;
04130 };
04131 
04132 // Interface for the StatusPanel
04133 #define STATUSPANEL_INTERFACE Interface_ID(0x94357f0, 0x623e71c2)
04134 
04135 class IStatusPanel : public FPStaticInterface {
04136 public:
04137     virtual void    SetVisible(BOOL bVisible) = 0;
04138     virtual BOOL    IsVisible() = 0;
04139 };
04140 
04141 // Interface for the BMP I/O plug-in
04142 #define BMPIO_INTERFACE Interface_ID(0x374f288f, 0x19e460d6)
04143 // Valid types are, BMM_PALETTED, BMM_TRUE_24 and BMM_NO_TYPE (=BMM_TRUE_24)
04144 
04146 
04164 class IBitmapIO_Bmp : public FPStaticInterface {
04165 public:
04169     virtual int     GetType() = 0;
04176     virtual void    SetType(int type) = 0;
04177     };
04178 
04179 // Interface for the JPeg I/O plug-in
04180 #define JPEGIO_INTERFACE Interface_ID(0x466c7964, 0x2db94ff2)
04181 
04187 class IBitmapIO_Jpeg : public FPStaticInterface {
04188 public:
04190     virtual int     GetQuality() = 0;
04196     virtual void    SetQuality(int quality) = 0;
04199     virtual int     GetSmoothing() = 0;
04205     virtual void    SetSmoothing(int smoothing) = 0;
04206     };
04207 
04208 // Interface for the Png I/O plug-in
04209 #define PNGIO_INTERFACE Interface_ID(0x1d7c41db, 0x328c1142)
04210 
04216 class IBitmapIO_Png : public FPStaticInterface {
04217 public:
04218     // Valid type are:
04219     // BMM_PALETTED
04220     // BMM_TRUE_24
04221     // BMM_TRUE_48
04222     // BMM_GRAY_8
04223     // BMM_GRAY_16
04227     virtual int     GetType() = 0;
04233     virtual void    SetType(int type) = 0;
04236     virtual BOOL    GetAlpha() = 0;
04241     virtual void    SetAlpha(BOOL alpha) = 0;
04244     virtual BOOL    GetInterlaced() = 0;
04249     virtual void    SetInterlaced(BOOL interlaced) = 0;
04250     };
04251 
04252 // Interface for the Targa I/O plug-in
04253 #define TGAIO_INTERFACE Interface_ID(0x21d673b7, 0x1d34198d)
04254 
04260 class IBitmapIO_Tga : public FPStaticInterface {
04261 public:
04262     // 16, 24, 32
04265     virtual int     GetColorDepth() = 0;
04270     virtual void    SetColorDepth(int bpp) = 0;
04273     virtual BOOL    GetCompressed() = 0;
04278     virtual void    SetCompressed(BOOL compressed) = 0;
04281     virtual BOOL    GetAlphaSplit() = 0;
04286     virtual void    SetAlphaSplit(BOOL alphaSplit) = 0;
04289     virtual BOOL    GetPreMultAlpha() = 0;
04294     virtual void    SetPreMultAlpha(BOOL preMult) = 0;
04295     };
04296 
04297 // Interface for the RLA I/O plug-in
04298 //Fetching the interface using either RLAIO_INTERFACE or RPFIO_INTERFACE returns an object
04299 //of the same class.  But the object affects only the RLA or RPF settings accordingly.
04300 //The "RPF-specific" methods have undefined behavior unless used with an RPFIO_INTERFACE object
04301 #define RLAIO_INTERFACE Interface_ID(0x282c2f79, 0x68f7373d)
04302 #define RPFIO_INTERFACE Interface_ID(0x25a87871, 0x2e265a49)
04303 
04305 
04328 class IBitmapIO_RLA : public FPStaticInterface {
04329 public:
04330     // 8, 16, 32
04331     virtual int     GetColorDepth() = 0;
04332     virtual void    SetColorDepth(int bpp) = 0;
04333     virtual BOOL    GetStoreAlpha() = 0;
04334     virtual void    SetStoreAlpha(BOOL storeAlpha) = 0;
04335     virtual BOOL    GetPremultAlpha() = 0;
04336     virtual void    SetPremultAlpha(BOOL preMult) = 0;
04337 
04338     virtual MSTR    GetDescription() = 0;
04339     virtual void    SetDescription(MSTR description) = 0;
04340     virtual MSTR    GetAuthor() = 0;
04341     virtual void    SetAuthor(MSTR author) = 0;
04342 
04343     virtual BOOL    GetZChannel() = 0;
04344     virtual void    SetZChannel(BOOL b) = 0;
04345     virtual BOOL    GetMtlIDChannel() = 0;
04346     virtual void    SetMtlIDChannel(BOOL b) = 0;
04347     virtual BOOL    GetNodeIDChannel() = 0;
04348     virtual void    SetNodeIDChannel(BOOL b) = 0;
04349     virtual BOOL    GetUVChannel() = 0;
04350     virtual void    SetUVChannel(BOOL b) = 0;
04351     virtual BOOL    GetNormalChannel() = 0;
04352     virtual void    SetNormalChannel(BOOL b) = 0;
04353     virtual BOOL    GetRealpixChannel() = 0;
04354     virtual void    SetRealpixChannel(BOOL b) = 0;
04355     virtual BOOL    GetCoverageChannel() = 0;
04356     virtual void    SetCoverageChannel(BOOL b) = 0;
04357 
04358     // RPF-specific methods
04359     virtual BOOL    GetNodeRenderIDChannel() = 0;
04360     virtual void    SetNodeRenderIDChannel(BOOL b) = 0;
04361     virtual BOOL    GetColorChannel() = 0;
04362     virtual void    SetColorChannel(BOOL b) = 0;
04363     virtual BOOL    GetTranspChannel() = 0;
04364     virtual void    SetTranspChannel(BOOL b) = 0;
04365     virtual BOOL    GetVelocChannel() = 0;
04366     virtual void    SetVelocChannel(BOOL b) = 0;
04367     virtual BOOL    GetWeightChannel() = 0;
04368     virtual void    SetWeightChannel(BOOL b) = 0;
04369     virtual BOOL    GetMaskChannel() = 0;
04370     virtual void    SetMaskChannel(BOOL b) = 0;
04371 };
04372 
04373 // Interface for the Rgb I/O plug-in
04374 #define RGBIO_INTERFACE Interface_ID(0x096c2424, 0x21b84dae)
04375 
04381 class IBitmapIO_Rgb : public FPStaticInterface 
04382 {
04383 public:
04385     virtual int     GetBytesPerChannel() = 0;
04391     virtual void    SetBytesPerChannel(int bytesPerChannel) = 0;
04394     virtual BOOL    GetAlphaChannelState() = 0;
04399     virtual void    SetAlphaChannelState(BOOL bHasAlpha) = 0;
04402     virtual BOOL    GetCompressionState() = 0;
04407     virtual void    SetCompressionState(BOOL bCompressed) = 0;
04408 };
04409 
04410 //IUnReplaceableControl --added 08/03/04 MZ. Added for exposetransform helper object.
04411 //This interface serves 2 related functions.  First, if this interface is present, pb2's and wires won't try to replace this controller
04413 //a function to replace it's default 'clone' method. This is currently also used in wiring when a wire is unconnected.
04414 
04416 
04425 class IUnReplaceableControl: public MaxHeapOperators
04426 {
04427 public:
04428     virtual ~IUnReplaceableControl(){};
04429     virtual Control * GetReplacementClone()=0;
04430 };
04431 
04433 
04435 class IEulerControl: public MaxHeapOperators {
04436     public:
04438         
04440         virtual int GetOrder()=0;
04441 
04443         virtual void SetOrder(int newOrder)=0;
04444     };
04445 
04446 class AKey;
04447 #define I_ATTACHCTRL    Interface_ID(0x199a6b11, 0x5ca27621) // (IAttachControl*) - for attach controllers
04448 
04450 
04452 class IAttachCtrl : public BaseInterface  {
04453 public:
04455 
04458     virtual BOOL SetObject(INode *node)=0;
04459 
04461 
04463     virtual INode* GetObject()=0;
04464 
04466 
04469     virtual AKey* GetKey(int index)=0;
04470 
04472 
04476     virtual void SetKeyPos(TimeValue t, DWORD faceIndex, Point3 bary)=0;
04477 
04479 
04481     virtual BOOL GetAlign()=0;
04482 
04484 
04486     virtual void SetAlign(BOOL align)=0;
04487 
04489 
04491     virtual BOOL GetManualUpdate()=0;
04492 
04494 
04496     virtual void SetManualUpdate(BOOL manUpdate)=0;
04497 
04499 
04501     virtual void Invalidate(BOOL forceUpdate = FALSE)=0;
04502 };
04503 
04504 
04508 class ISystemXRef: public MaxHeapOperators  {
04509 public:
04511     virtual void SystemIsObjectXRef() = 0;
04512 
04514     virtual void SystemNoLongerObjectXRef() = 0;
04515 
04518     virtual void  SystemUpdated(INode *headNode) = 0;
04519 };
04520 
04521