1 | /*********************************************************************
|
---|
2 | *<
|
---|
3 | FILE: maxapi.h
|
---|
4 |
|
---|
5 | DESCRIPTION: These are functions that are exported from the
|
---|
6 | 3DS MAX executable.
|
---|
7 |
|
---|
8 | CREATED BY: Rolf Berteig
|
---|
9 |
|
---|
10 | HISTORY: Created 28 November 1994
|
---|
11 |
|
---|
12 | *> Copyright (c) 1994, All Rights Reserved.
|
---|
13 | **********************************************************************/
|
---|
14 |
|
---|
15 | #ifndef __JAGAPI__
|
---|
16 | #define __JAGAPI__
|
---|
17 |
|
---|
18 | #include "cmdmode.h"
|
---|
19 | #include "sceneapi.h"
|
---|
20 | #include "rtclick.h"
|
---|
21 | #include "evuser.h"
|
---|
22 | #include "maxcom.h"
|
---|
23 |
|
---|
24 | class ModContext;
|
---|
25 | class HitData;
|
---|
26 | class HitLog;
|
---|
27 | class CtrlHitLog;
|
---|
28 | class MtlBase;
|
---|
29 | class PickNodeCallback;
|
---|
30 | class Renderer;
|
---|
31 | class RendParams;
|
---|
32 | class RendProgressCallback;
|
---|
33 | class Bitmap;
|
---|
34 | class BitmapInfo;
|
---|
35 | class Texmap;
|
---|
36 | class SoundObj;
|
---|
37 | class MtlBaseLib;
|
---|
38 |
|
---|
39 | // RB: I didn't want to include render.h here
|
---|
40 | #ifndef _REND_TYPE_DEFINED
|
---|
41 | #define _REND_TYPE_DEFINED
|
---|
42 | enum RendType {
|
---|
43 | RENDTYPE_NORMAL,
|
---|
44 | RENDTYPE_REGION,
|
---|
45 | RENDTYPE_BLOWUP,
|
---|
46 | RENDTYPE_SELECT
|
---|
47 | };
|
---|
48 | #endif
|
---|
49 |
|
---|
50 | class NameMaker {
|
---|
51 | public:
|
---|
52 | virtual void MakeUniqueName(TSTR &name)=0;
|
---|
53 | };
|
---|
54 |
|
---|
55 | // This class provides functions that expose the portions of View3D
|
---|
56 | // that are exported for use by plug-ins.
|
---|
57 |
|
---|
58 | class ViewExp {
|
---|
59 | public:
|
---|
60 | virtual Point3 GetPointOnCP(const IPoint2 &ps)=0;
|
---|
61 | virtual Point3 SnapPoint(const IPoint2 &in, IPoint2 &out, Matrix3 *plane2d = NULL, DWORD flags = 0)=0;
|
---|
62 | virtual float SnapLength(float in)=0;
|
---|
63 | virtual float GetCPDisp(const Point3 base, const Point3& dir,
|
---|
64 | const IPoint2& sp1, const IPoint2& sp2 )=0;
|
---|
65 | virtual GraphicsWindow *getGW()=0;
|
---|
66 | virtual int IsWire()=0;
|
---|
67 | virtual Rect GetDammageRect()=0;
|
---|
68 |
|
---|
69 | virtual Point3 MapScreenToView( IPoint2& sp, float depth )=0;
|
---|
70 | virtual void MapScreenToWorldRay(float sx, float sy, Ray& ray)=0;
|
---|
71 | virtual void GetAffineTM( Matrix3& tm )=0;
|
---|
72 | virtual float GetScreenScaleFactor(const Point3 worldPoint)=0;
|
---|
73 |
|
---|
74 | // return the viewPort screen width factor in world space at
|
---|
75 | // a point in world space
|
---|
76 | virtual float GetVPWorldWidth(const Point3 wPoint)=0;
|
---|
77 | virtual Point3 MapCPToWorld(const Point3 cpPoint)=0;
|
---|
78 | virtual void GetConstructionTM( Matrix3 &tm )=0;
|
---|
79 | virtual void SetGridSize( float size )=0;
|
---|
80 | virtual float GetGridSize()=0;
|
---|
81 | virtual BOOL IsGridVisible()=0;
|
---|
82 |
|
---|
83 | // Get the camera if there is one.
|
---|
84 | virtual INode *GetViewCamera()=0;
|
---|
85 |
|
---|
86 | // node level hit-testing
|
---|
87 | virtual void ClearHitList()=0;
|
---|
88 | virtual INode *GetClosestHit()=0;
|
---|
89 | virtual int HitCount()=0;
|
---|
90 | // subobject level hit-testing
|
---|
91 | virtual void LogHit(INode *nr, ModContext *mc, DWORD dist, ulong info, HitData *hitdat = NULL)=0;
|
---|
92 | virtual HitLog& GetSubObjHitList()=0;
|
---|
93 | virtual void ClearSubObjHitList()=0;
|
---|
94 | virtual int NumSubObjHits()=0;
|
---|
95 |
|
---|
96 | // For controller apparatus hit testing
|
---|
97 | virtual void CtrlLogHit(INode *nr,DWORD dist,ulong info,DWORD infoExtra)=0;
|
---|
98 | virtual CtrlHitLog& GetCtrlHitList()=0;
|
---|
99 | virtual void ClearCtrlHitList()=0;
|
---|
100 |
|
---|
101 | virtual float NonScalingObjectSize()=0; // 1.0 is "default"
|
---|
102 |
|
---|
103 | // Turn on and off image background display
|
---|
104 | virtual BOOL setBkgImageDsp(BOOL onOff)=0;
|
---|
105 | virtual int getBkgImageDsp(void)=0;
|
---|
106 |
|
---|
107 | // Turn on and off safe frame display
|
---|
108 | virtual void setSFDisplay(int onOff)=0;
|
---|
109 | virtual int getSFDisplay(void)=0;
|
---|
110 |
|
---|
111 | // This is the window handle of the viewport. This is the
|
---|
112 | // same window handle past to GetViewport() to get a ViewExp*
|
---|
113 | virtual HWND GetHWnd()=0;
|
---|
114 | };
|
---|
115 |
|
---|
116 |
|
---|
117 | // return values for CreateMouseCallBack
|
---|
118 | #define CREATE_CONTINUE 1
|
---|
119 | #define CREATE_STOP 0 // creation terminated normally
|
---|
120 | #define CREATE_ABORT -1 // delete the created object and node
|
---|
121 |
|
---|
122 |
|
---|
123 | // This is a specific call-back proc for handling the creation process
|
---|
124 | // of a plug-in object.
|
---|
125 | // The vpt passed in will have had setTransform called with the
|
---|
126 | // transform of the current construction plane.
|
---|
127 | class CreateMouseCallBack {
|
---|
128 | public:
|
---|
129 | virtual int proc(
|
---|
130 | ViewExp *vpt,
|
---|
131 | int msg,
|
---|
132 | int point,
|
---|
133 | int flags,
|
---|
134 | IPoint2 m,
|
---|
135 | Matrix3& mat
|
---|
136 | )=0;
|
---|
137 | virtual int override(int mode) { return mode; } // Defaults to mode supplied
|
---|
138 | };
|
---|
139 |
|
---|
140 |
|
---|
141 | class Object;
|
---|
142 | class ConstObject;
|
---|
143 | class MouseCallBack;
|
---|
144 | class IObjCreate;
|
---|
145 | class IObjParam;
|
---|
146 | class ModContext;
|
---|
147 | class ModContextList;
|
---|
148 | class INodeTab;
|
---|
149 |
|
---|
150 | // Passed to getBkgFrameRange()
|
---|
151 | #define VIEWPORT_BKG_START 0
|
---|
152 | #define VIEWPORT_BKG_END 1
|
---|
153 |
|
---|
154 | // Passed to setBkgORType().
|
---|
155 | #define VIEWPORT_BKG_BLANK 0
|
---|
156 | #define VIEWPORT_BKG_HOLD 1
|
---|
157 | #define VIEWPORT_BKG_LOOP 2
|
---|
158 |
|
---|
159 | // Passed to setBkgImageAspect()
|
---|
160 | #define VIEWPORT_BKG_ASPECT_VIEW 0
|
---|
161 | #define VIEWPORT_BKG_ASPECT_BITMAP 1
|
---|
162 | #define VIEWPORT_BKG_ASPECT_OUTPUT 2
|
---|
163 |
|
---|
164 |
|
---|
165 | // Identify the transform tool buttons
|
---|
166 | #define MOVE_BUTTON 1
|
---|
167 | #define ROTATE_BUTTON 2
|
---|
168 | #define NUSCALE_BUTTON 3
|
---|
169 | #define USCALE_BUTTON 4
|
---|
170 | #define SQUASH_BUTTON 5
|
---|
171 | #define SELECT_BUTTON 6
|
---|
172 |
|
---|
173 | // Axis constraints.
|
---|
174 | #define AXIS_XY 2
|
---|
175 | #define AXIS_ZX 1
|
---|
176 | #define AXIS_YZ 0
|
---|
177 | #define AXIS_X 3
|
---|
178 | #define AXIS_Y 4
|
---|
179 | #define AXIS_Z 5
|
---|
180 |
|
---|
181 | // Origin modes
|
---|
182 | #define ORIGIN_LOCAL 0 // Object's pivot
|
---|
183 | #define ORIGIN_SELECTION 1 // Center of selection set (or center of individual object for local or parent space)
|
---|
184 | #define ORIGIN_SYSTEM 2 // Center of the reference coord. system
|
---|
185 |
|
---|
186 | // Reference coordinate system
|
---|
187 | #define COORDS_HYBRID 0
|
---|
188 | #define COORDS_SCREEN 1
|
---|
189 | #define COORDS_WORLD 2
|
---|
190 | #define COORDS_PARENT 3
|
---|
191 | #define COORDS_LOCAL 4
|
---|
192 | #define COORDS_OBJECT 5
|
---|
193 |
|
---|
194 |
|
---|
195 | // Max cursors
|
---|
196 | #define SYSCUR_MOVE 1
|
---|
197 | #define SYSCUR_ROTATE 2
|
---|
198 | #define SYSCUR_USCALE 3
|
---|
199 | #define SYSCUR_NUSCALE 4
|
---|
200 | #define SYSCUR_SQUASH 5
|
---|
201 | #define SYSCUR_SELECT 6
|
---|
202 | #define SYSCUR_DEFARROW 7
|
---|
203 |
|
---|
204 | // flags to pass to RedrawViews
|
---|
205 | #define REDRAW_BEGIN (1<<0)
|
---|
206 | #define REDRAW_INTERACTIVE (1<<1)
|
---|
207 | #define REDRAW_END (1<<2)
|
---|
208 | #define REDRAW_NORMAL (1<<3)
|
---|
209 |
|
---|
210 | // Return values for GetNumAxis()
|
---|
211 | #define NUMAXIS_ZERO 0 // Nothing to transform
|
---|
212 | #define NUMAXIS_ALL 1 // Use only one axis.
|
---|
213 | #define NUMAXIS_INDIVIDUAL 2 // Do all, one at a time
|
---|
214 |
|
---|
215 | // MAX Directories - update APP_TOTAL_DIRS (in app.h) if this changes!
|
---|
216 | #define APP_FONT_DIR 0
|
---|
217 | #define APP_SCENE_DIR 1
|
---|
218 | #define APP_IMPORT_DIR 2
|
---|
219 | #define APP_EXPORT_DIR 3
|
---|
220 | #define APP_HELP_DIR 4
|
---|
221 | #define APP_EXPRESSION_DIR 5
|
---|
222 | #define APP_PREVIEW_DIR 6
|
---|
223 | #define APP_IMAGE_DIR 7
|
---|
224 | #define APP_SOUND_DIR 8
|
---|
225 | #define APP_PLUGCFG_DIR 9
|
---|
226 | #define APP_MAXSTART_DIR 10
|
---|
227 | #define APP_VPOST_DIR 11
|
---|
228 | #define APP_MAXROOT_DIR 12
|
---|
229 |
|
---|
230 |
|
---|
231 | // Types for status numbers
|
---|
232 | #define STATUS_UNIVERSE 1
|
---|
233 | #define STATUS_SCALE 2
|
---|
234 | #define STATUS_ANGLE 3
|
---|
235 | #define STATUS_OTHER 4
|
---|
236 |
|
---|
237 | // Extended display modes
|
---|
238 | #define EXT_DISP_NONE 0
|
---|
239 | #define EXT_DISP_SELECTED (1<<0) // object is selected
|
---|
240 | #define EXT_DISP_TARGET_SELECTED (1<<1) // object's target is selected
|
---|
241 | #define EXT_DISP_LOOKAT_SELECTED (1<<2) // object's lookat node is selected
|
---|
242 | #define EXT_DISP_ONLY_SELECTED (1<<3) // object is only thing selected
|
---|
243 | #define EXT_DISP_DRAGGING (1<<4) // object is being "dragged"
|
---|
244 | #define EXT_DISP_ZOOM_EXT (1<<5) // object is being tested for zoom ext
|
---|
245 |
|
---|
246 | // Render time types passed to SetRendTimeType()
|
---|
247 | #define REND_TIMESINGLE 0
|
---|
248 | #define REND_TIMESEGMENT 1
|
---|
249 | #define REND_TIMERANGE 2
|
---|
250 | #define REND_TIMEPICKUP 3
|
---|
251 |
|
---|
252 | // Flag bits for hide by category.
|
---|
253 | #define HIDE_OBJECTS 0x0001
|
---|
254 | #define HIDE_SHAPES 0x0002
|
---|
255 | #define HIDE_LIGHTS 0x0004
|
---|
256 | #define HIDE_CAMERAS 0x0008
|
---|
257 | #define HIDE_HELPERS 0x0010
|
---|
258 | #define HIDE_WSMS 0x0020
|
---|
259 | #define HIDE_SYSTEMS 0x0040
|
---|
260 | #define HIDE_ALL 0xffff
|
---|
261 | #define HIDE_NONE 0
|
---|
262 |
|
---|
263 |
|
---|
264 |
|
---|
265 | // viewport layout configuration
|
---|
266 | // VP_LAYOUT_ LEGEND
|
---|
267 | // # is number of viewports (total) in view panel
|
---|
268 | // V = vertical split
|
---|
269 | // H = horizontal split
|
---|
270 | // L/R = left/right placement
|
---|
271 | // T/B = top/bottom placement
|
---|
272 | // CONSTANT LEGEND
|
---|
273 | // bottom nibble is total number of views
|
---|
274 | #define VP_LAYOUT_1 0x0001
|
---|
275 | #define VP_LAYOUT_2V 0x0012
|
---|
276 | #define VP_LAYOUT_2H 0x0022
|
---|
277 | #define VP_LAYOUT_2HT 0x0032
|
---|
278 | #define VP_LAYOUT_2HB 0x0042
|
---|
279 | #define VP_LAYOUT_3VL 0x0033
|
---|
280 | #define VP_LAYOUT_3VR 0x0043
|
---|
281 | #define VP_LAYOUT_3HT 0x0053
|
---|
282 | #define VP_LAYOUT_3HB 0x0063
|
---|
283 | #define VP_LAYOUT_4 0x0074
|
---|
284 | #define VP_LAYOUT_4VL 0x0084
|
---|
285 | #define VP_LAYOUT_4VR 0x0094
|
---|
286 | #define VP_LAYOUT_4HT 0x00a4
|
---|
287 | #define VP_LAYOUT_4HB 0x00b4
|
---|
288 | #define VP_LAYOUT_1C 0x00c1
|
---|
289 | #define VP_NUM_VIEWS_MASK 0x000f
|
---|
290 |
|
---|
291 |
|
---|
292 |
|
---|
293 | class DWORDTab : public Tab<DWORD> {};
|
---|
294 |
|
---|
295 |
|
---|
296 | // A callback object passed to RegisterTimeChangeCallback()
|
---|
297 | class TimeChangeCallback {
|
---|
298 | public:
|
---|
299 | virtual void TimeChanged(TimeValue t)=0;
|
---|
300 | };
|
---|
301 |
|
---|
302 |
|
---|
303 | // A callback object passed to RegisterCommandModeChangeCallback()
|
---|
304 | class CommandModeChangedCallback {
|
---|
305 | public:
|
---|
306 | virtual void ModeChanged(CommandMode *oldM, CommandMode *newM)=0;
|
---|
307 | };
|
---|
308 |
|
---|
309 | // A call back object to filter selection in the track view.
|
---|
310 | class TrackViewFilter {
|
---|
311 | public:
|
---|
312 | // Return TRUE to accept the anim as selectable.
|
---|
313 | virtual BOOL proc(Animatable *anim, Animatable *client,int subNum)=0;
|
---|
314 | };
|
---|
315 |
|
---|
316 | // Stores the result of a track view pick
|
---|
317 | class TrackViewPick {
|
---|
318 | public:
|
---|
319 | ReferenceTarget *anim;
|
---|
320 | ReferenceTarget *client;
|
---|
321 | int subNum;
|
---|
322 |
|
---|
323 | TrackViewPick() {anim=NULL;client=NULL;subNum=0;}
|
---|
324 | };
|
---|
325 |
|
---|
326 | // A callback object passed to SetPickMode()
|
---|
327 | class PickModeCallback {
|
---|
328 | public:
|
---|
329 | // Called when ever the pick mode needs to hit test. Return TRUE if something was hit
|
---|
330 | virtual BOOL HitTest(IObjParam *ip,HWND hWnd,ViewExp *vpt,IPoint2 m,int flags)=0;
|
---|
331 |
|
---|
332 | // Called when the user picks something. The vpt should have the result of the hit test in it.
|
---|
333 | // return TRUE to end the pick mode.
|
---|
334 | virtual BOOL Pick(IObjParam *ip,ViewExp *vpt)=0;
|
---|
335 |
|
---|
336 | // Called when the user right-clicks or presses ESC
|
---|
337 | // return TRUE to end the pick mode, FALSE to continue picking
|
---|
338 | virtual BOOL RightClick(IObjParam *ip,ViewExp *vpt) { return FALSE; }
|
---|
339 |
|
---|
340 | // Called when the mode is entered and exited.
|
---|
341 | virtual void EnterMode(IObjParam *ip) {}
|
---|
342 | virtual void ExitMode(IObjParam *ip) {}
|
---|
343 |
|
---|
344 | virtual HCURSOR GetDefCursor(IObjParam *ip) {return NULL;}
|
---|
345 | virtual HCURSOR GetHitCursor(IObjParam *ip) {return NULL;}
|
---|
346 |
|
---|
347 | // If the user hits the H key while in your pick mode, you
|
---|
348 | // can provide a filter to filter the name list.
|
---|
349 | virtual PickNodeCallback *GetFilter() {return NULL;}
|
---|
350 | };
|
---|
351 |
|
---|
352 | // Not to be confused with a PickMODEcallback...
|
---|
353 | // Used to filter node's during a hit test (PickNode)
|
---|
354 | class PickNodeCallback {
|
---|
355 | public:
|
---|
356 | // Return TRUE if this is an acceptable hit, FALSE otherwise.
|
---|
357 | virtual BOOL Filter(INode *node)=0;
|
---|
358 | };
|
---|
359 |
|
---|
360 | // Used with DoHitByNameDialog();
|
---|
361 | class HitByNameDlgCallback {
|
---|
362 | public:
|
---|
363 | virtual TCHAR *dialogTitle() { return _T(""); }
|
---|
364 | virtual TCHAR *buttonText() { return _T(""); }
|
---|
365 | virtual BOOL singleSelect() { return FALSE; }
|
---|
366 | virtual BOOL useFilter() { return TRUE; }
|
---|
367 | virtual int filter(INode *node) { return TRUE; }
|
---|
368 | virtual BOOL useProc() { return TRUE; }
|
---|
369 | virtual void proc(INodeTab &nodeTab) {}
|
---|
370 | virtual BOOL doCustomHilite() { return FALSE; }
|
---|
371 | virtual BOOL doHilite(INode *node) { return FALSE; }
|
---|
372 | };
|
---|
373 |
|
---|
374 |
|
---|
375 | class Interface;
|
---|
376 |
|
---|
377 | // A callback used with RegisterRedrawViewsCallback()
|
---|
378 | class RedrawViewsCallback {
|
---|
379 | public:
|
---|
380 | // this will be called after all the viewport have completed drawing.
|
---|
381 | virtual void proc(Interface *ip)=0;
|
---|
382 | };
|
---|
383 |
|
---|
384 | // A callback used with RegisterAxisChangeCallback()
|
---|
385 | class AxisChangeCallback {
|
---|
386 | public:
|
---|
387 | // this will be called when the axis system is changed
|
---|
388 | virtual void proc(Interface *ip)=0;
|
---|
389 | };
|
---|
390 |
|
---|
391 |
|
---|
392 | // Generic interface into Jaguar
|
---|
393 | class Interface {
|
---|
394 | public:
|
---|
395 | virtual HFONT GetAppHFont()=0;
|
---|
396 | virtual void RedrawViews(TimeValue t,DWORD vpFlags=REDRAW_NORMAL, ReferenceTarget *change=NULL)=0;
|
---|
397 | virtual BOOL SetActiveViewport(HWND hwnd)=0;
|
---|
398 | virtual ViewExp *GetActiveViewport()=0; // remember to release ViewExp* with ReleaseViewport()
|
---|
399 | virtual IObjCreate *GetIObjCreate()=0;
|
---|
400 | virtual IObjParam *GetIObjParam()=0;
|
---|
401 | virtual HWND GetMAXHWnd()=0;
|
---|
402 |
|
---|
403 | // This will cause all viewports to be completely redrawn.
|
---|
404 | // This is extremely heavy handed and should only be used when
|
---|
405 | // necessary.
|
---|
406 | virtual void ForceCompleteRedraw()=0;
|
---|
407 |
|
---|
408 | // Register a call back object that gets called evrytime
|
---|
409 | // the viewports are redrawn.
|
---|
410 | virtual void RegisterRedrawViewsCallback(RedrawViewsCallback *cb)=0;
|
---|
411 | virtual void UnRegisterRedrawViewsCallback(RedrawViewsCallback *cb)=0;
|
---|
412 |
|
---|
413 | // Execute a track view pick dialog.
|
---|
414 | virtual BOOL TrackViewPickDlg(HWND hParent, TrackViewPick *res, TrackViewFilter *filter=NULL, DWORD flags=0)=0;
|
---|
415 |
|
---|
416 | // Command mode methods
|
---|
417 | virtual void PushCommandMode( CommandMode *m )=0;
|
---|
418 | virtual void SetCommandMode( CommandMode *m )=0;
|
---|
419 | virtual void PopCommandMode()=0;
|
---|
420 | virtual CommandMode* GetCommandMode()=0;
|
---|
421 | virtual void SetStdCommandMode( int cid )=0;
|
---|
422 | virtual void PushStdCommandMode( int cid )=0;
|
---|
423 | virtual void RemoveMode( CommandMode *m )=0;
|
---|
424 | virtual void DeleteMode( CommandMode *m )=0;
|
---|
425 |
|
---|
426 | // This will set the command mode to a standard pick mode.
|
---|
427 | // The callback implements hit testing and a method that is
|
---|
428 | // called when the user actually pick an item.
|
---|
429 | virtual void SetPickMode(PickModeCallback *pc)=0;
|
---|
430 |
|
---|
431 | // makes sure no pick modes are in the command stack.
|
---|
432 | virtual void ClearPickMode()=0;
|
---|
433 |
|
---|
434 | // Puts up a hit by name dialog. If the callback is NULL it
|
---|
435 | // just does a standard select by name.
|
---|
436 | // returns TRUE if the user OKs the dialog, FALSE otherwise.
|
---|
437 | virtual BOOL DoHitByNameDialog(HitByNameDlgCallback *hbncb=NULL)=0;
|
---|
438 |
|
---|
439 | // status panel prompt stuff
|
---|
440 | virtual void PushPrompt( TCHAR *s )=0;
|
---|
441 | virtual void PopPrompt()=0;
|
---|
442 | virtual void ReplacePrompt( TCHAR *s )=0;
|
---|
443 | virtual void DisplayTempPrompt( TCHAR *s, int msec=1000)=0;
|
---|
444 | virtual void RemoveTempPrompt()=0;
|
---|
445 |
|
---|
446 | // status panel progress bar
|
---|
447 | virtual BOOL ProgressStart(TCHAR *title, BOOL dispBar, LPTHREAD_START_ROUTINE fn, LPVOID arg)=0;
|
---|
448 | virtual void ProgressUpdate(int pct, BOOL showPct = TRUE, TCHAR *title = NULL)=0;
|
---|
449 | virtual void ProgressEnd()=0;
|
---|
450 | virtual BOOL GetCancel()=0;
|
---|
451 | virtual void SetCancel(BOOL sw)=0;
|
---|
452 |
|
---|
453 | // Some info about the current grid settings
|
---|
454 | virtual float GetGridSpacing()=0;
|
---|
455 | virtual int GetGridMajorLines()=0;
|
---|
456 |
|
---|
457 | // Write values to x,y,z status boxes. Before doing this, mouse
|
---|
458 | // tracking must be disabled. Typically a plug-in would disable
|
---|
459 | // mouse tracking on mouse down and enable it on mouse up.
|
---|
460 | virtual void DisableStatusXYZ()=0;
|
---|
461 | virtual void EnableStatusXYZ()=0;
|
---|
462 | virtual void SetStatusXYZ(Point3 xyz,int type)=0;
|
---|
463 | virtual void SetStatusXYZ(AngAxis aa)=0; // this will convert the aa for status display
|
---|
464 |
|
---|
465 | // Extended display modes (such as camera cones that only appear when dragging a camera)
|
---|
466 | virtual void SetExtendedDisplayMode(int flags)=0;
|
---|
467 | virtual int GetExtendedDisplayMode()=0;
|
---|
468 |
|
---|
469 | // UI flyoff timing
|
---|
470 | virtual void SetFlyOffTime(int msecs)=0;
|
---|
471 | virtual int GetFlyOffTime()=0;
|
---|
472 |
|
---|
473 | // Get standard Jaguar cursors.
|
---|
474 | virtual HCURSOR GetSysCursor( int id )=0;
|
---|
475 |
|
---|
476 | // Turn on or off a cross hair cursor which draws horizontal and vertical
|
---|
477 | // lines the size of the viewport's width and height and intersect at
|
---|
478 | // the mouse position.
|
---|
479 | virtual void SetCrossHairCur(BOOL onOff)=0;
|
---|
480 | virtual BOOL GetCrossHairCur()=0;
|
---|
481 |
|
---|
482 | // This pops all modes above the create or modify mode.
|
---|
483 | // NOTE: This is obsolete with the new modifiy panel design.
|
---|
484 | virtual void RealizeParamPanel()=0;
|
---|
485 |
|
---|
486 | // Snap an angle value (in radians)
|
---|
487 | virtual float SnapAngle(float angleIn)=0;
|
---|
488 |
|
---|
489 | // Snap a percentage value (1.0 = 100%)
|
---|
490 | virtual float SnapPercent(float percentIn)=0;
|
---|
491 |
|
---|
492 | // Get the snap switch state
|
---|
493 | virtual BOOL GetSnapState()=0;
|
---|
494 |
|
---|
495 | // Get the snap type -- Absolute or Relative (grid.h)
|
---|
496 | virtual int GetSnapMode()=0;
|
---|
497 |
|
---|
498 | // Set the snap mode -- Set to absolute will fail if not in screen space
|
---|
499 | // Returns TRUE if succeeded
|
---|
500 | virtual BOOL SetSnapMode(int mode)=0;
|
---|
501 |
|
---|
502 | // Hit tests the screen position for nodes and returns a
|
---|
503 | // INode pointer if one is hit, NULL otherwise.
|
---|
504 | virtual INode *PickNode(HWND hWnd,IPoint2 pt,PickNodeCallback *filt=NULL)=0;
|
---|
505 |
|
---|
506 | //----- Modify-related Methods--------------------------
|
---|
507 |
|
---|
508 | // Registers the sub-object types for a given plug-in object type.
|
---|
509 | virtual void RegisterSubObjectTypes( const TCHAR **types, int count )=0;
|
---|
510 |
|
---|
511 | // Add sub-object named selection sets the named selection set drop down.
|
---|
512 | // This should be done whenever the selection level changes.
|
---|
513 | virtual void AppendSubObjectNamedSelSet(const TCHAR *set)=0;
|
---|
514 |
|
---|
515 | // Clear the named selections from the drop down.
|
---|
516 | virtual void ClearSubObjectNamedSelSets()=0;
|
---|
517 |
|
---|
518 | // Clears the edit field of the named selection set drop down
|
---|
519 | virtual void ClearCurNamedSelSet()=0;
|
---|
520 |
|
---|
521 | // Returns the state of the sub object drop-down. 0 is object level
|
---|
522 | // and >= 1 refer to the levels registered by the object.
|
---|
523 | virtual int GetSubObjectLevel()=0;
|
---|
524 |
|
---|
525 | // Sets the sub-object drop down. This will cause the object being edited
|
---|
526 | // to receive a notification that the current subobject level has changed.
|
---|
527 | virtual void SetSubObjectLevel(int level)=0;
|
---|
528 |
|
---|
529 | // Enables or disables sub object selection. Note that it
|
---|
530 | // will already be disabled if there are no subobject levels
|
---|
531 | // registered. In this case, it can not be enabled.
|
---|
532 | virtual void EnableSubObjectSelection(BOOL enable)=0;
|
---|
533 | virtual BOOL IsSubObjectSelectionEnabled()=0;
|
---|
534 |
|
---|
535 | // Notifies the system that the selection level in the pipeline has chaned.
|
---|
536 | virtual void PipeSelLevelChanged()=0;
|
---|
537 |
|
---|
538 | // Returns the sub-object selection level at the point in the
|
---|
539 | // pipeline just before the current place in the history.
|
---|
540 | virtual void GetPipelineSubObjLevel(DWORDTab &levels)=0;
|
---|
541 |
|
---|
542 | // Get's all instance contexts for the modifier at the current
|
---|
543 | // place in the history.
|
---|
544 | virtual void GetModContexts(ModContextList& list, INodeTab& nodes)=0;
|
---|
545 |
|
---|
546 | // Hit tests the object currently being edited at the sub object level.
|
---|
547 | virtual int SubObHitTest(TimeValue t, int type, int crossing,
|
---|
548 | int flags, IPoint2 *p, ViewExp *vpt)=0;
|
---|
549 |
|
---|
550 | // Is the selection set frozen?
|
---|
551 | virtual BOOL SelectionFrozen()=0;
|
---|
552 | virtual void FreezeSelection()=0;
|
---|
553 | virtual void ThawSelection()=0;
|
---|
554 |
|
---|
555 | // Nodes in the current selection set.
|
---|
556 | virtual INode *GetSelNode(int i)=0;
|
---|
557 | virtual int GetSelNodeCount()=0;
|
---|
558 |
|
---|
559 | // This is the color that selected sub-object entities are to be drawn in.
|
---|
560 | virtual Point3 GetSubSelColor()=0;
|
---|
561 |
|
---|
562 | // Enable/disable show end result.
|
---|
563 | virtual void EnableShowEndResult(BOOL enabled)=0;
|
---|
564 |
|
---|
565 | // Returns the state of the 'crossing' preference for hit testing.
|
---|
566 | virtual BOOL GetCrossing()=0;
|
---|
567 |
|
---|
568 | // Sets the state of one of the transform tool buttons.
|
---|
569 | // TRUE indecates pressed, FALSE is not pressed.
|
---|
570 | virtual void SetToolButtonState(int button, BOOL state )=0;
|
---|
571 | virtual BOOL GetToolButtonState(int button)=0;
|
---|
572 |
|
---|
573 | // Finds the vpt given the HWND
|
---|
574 | virtual ViewExp *GetViewport( HWND hwnd )=0;
|
---|
575 | virtual void ReleaseViewport( ViewExp *vpt )=0;
|
---|
576 |
|
---|
577 | // Disables/Enables animate button
|
---|
578 | virtual void EnableAnimateButton(BOOL enable)=0;
|
---|
579 | virtual BOOL IsAnimateEnabled()=0;
|
---|
580 |
|
---|
581 | // Turns the animate button on or off
|
---|
582 | virtual void SetAnimateButtonState(BOOL onOff)=0;
|
---|
583 |
|
---|
584 | // Registers a callback that gets called whenever the axis
|
---|
585 | // system is changed.
|
---|
586 | virtual void RegisterAxisChangeCallback(AxisChangeCallback *cb)=0;
|
---|
587 | virtual void UnRegisterAxisChangeCallback(AxisChangeCallback *cb)=0;
|
---|
588 |
|
---|
589 | // Gets/Sets the state of the axis constraints.
|
---|
590 | virtual int GetAxisConstraints()=0;
|
---|
591 | virtual void SetAxisConstraints(int c)=0;
|
---|
592 | virtual void EnableAxisConstraints(int c,BOOL enabled)=0;
|
---|
593 |
|
---|
594 | // Gets/Sets the state of the coordinate system center
|
---|
595 | virtual int GetCoordCenter()=0;
|
---|
596 | virtual void SetCoordCenter(int c)=0;
|
---|
597 | virtual void EnableCoordCenter(BOOL enabled)=0;
|
---|
598 |
|
---|
599 | // Gets/Sets the reference coordinate systems
|
---|
600 | virtual int GetRefCoordSys()=0;
|
---|
601 | virtual void SetRefCoordSys(int c)=0;
|
---|
602 | virtual void EnableRefCoordSys(BOOL enabled)=0;
|
---|
603 |
|
---|
604 | // Gets the axis which define the space in which transforms should
|
---|
605 | // take place.
|
---|
606 | // The node and subIndex refer to the object and sub object which the axis
|
---|
607 | // system should be based on (this should be the thing the user clicked on)
|
---|
608 | // If 'local' is not NULL, it will be set to TRUE if the center of the axis
|
---|
609 | // is the pivot point of the node, FALSE otherwise.
|
---|
610 | virtual Matrix3 GetTransformAxis(INode *node,int subIndex,BOOL* local = NULL)=0;
|
---|
611 |
|
---|
612 | // This returns the number of axis tripods in the scene. When transforming
|
---|
613 | // multiple sub-objects, in some cases each sub-object is transformed in
|
---|
614 | // a different space.
|
---|
615 | // Return Values:
|
---|
616 | // NUMAXIS_ZERO - Nothing to transform
|
---|
617 | // NUMAXIS_ALL - Use only one axis.
|
---|
618 | // NUMAXIS_INDIVIDUAL - Do all, one at a time
|
---|
619 | virtual int GetNumAxis()=0;
|
---|
620 |
|
---|
621 | // Locks axis tripods so that they will not be updated.
|
---|
622 | virtual void LockAxisTripods(BOOL onOff)=0;
|
---|
623 | virtual BOOL AxisTripodLocked()=0;
|
---|
624 |
|
---|
625 | // Registers a dialog window so IsDlgMesage() gets called for it.
|
---|
626 | virtual void RegisterDlgWnd( HWND hDlg )=0;
|
---|
627 | virtual int UnRegisterDlgWnd( HWND hDlg )=0;
|
---|
628 |
|
---|
629 | // Registers a keyboard accelerator table
|
---|
630 | virtual void RegisterAccelTable( HWND hWnd, HACCEL hAccel )=0;
|
---|
631 | virtual int UnRegisterAccelTable( HWND hWnd, HACCEL hAccel )=0;
|
---|
632 |
|
---|
633 | // Adds rollup pages to the command panel. Returns the window
|
---|
634 | // handle of the dialog that makes up the page.
|
---|
635 | virtual HWND AddRollupPage( HINSTANCE hInst, TCHAR *dlgTemplate,
|
---|
636 | DLGPROC dlgProc, TCHAR *title, LPARAM param=0,DWORD flags=0 )=0;
|
---|
637 |
|
---|
638 | // Removes a rollup page and destroys it.
|
---|
639 | virtual void DeleteRollupPage( HWND hRollup )=0;
|
---|
640 |
|
---|
641 | // When the user mouses down in dead area, the plug-in should pass
|
---|
642 | // mouse messages to this function which will pass them on to the rollup.
|
---|
643 | virtual void RollupMouseMessage( HWND hDlg, UINT message,
|
---|
644 | WPARAM wParam, LPARAM lParam )=0;
|
---|
645 |
|
---|
646 | // get/set the current time.
|
---|
647 | virtual TimeValue GetTime()=0;
|
---|
648 | virtual void SetTime(TimeValue t,BOOL redraw=TRUE)=0;
|
---|
649 |
|
---|
650 | // get/set the anim interval.
|
---|
651 | virtual Interval GetAnimRange()=0;
|
---|
652 | virtual void SetAnimRange(Interval range)=0;
|
---|
653 |
|
---|
654 | // Register a callback object that will get called every time the
|
---|
655 | // user changes the frame slider.
|
---|
656 | virtual void RegisterTimeChangeCallback(TimeChangeCallback *tc)=0;
|
---|
657 | virtual void UnRegisterTimeChangeCallback(TimeChangeCallback *tc)=0;
|
---|
658 |
|
---|
659 | // Register a callback object that will get called when the user
|
---|
660 | // causes the command mode to change
|
---|
661 | virtual void RegisterCommandModeChangedCallback(CommandModeChangedCallback *cb)=0;
|
---|
662 | virtual void UnRegisterCommandModeChangedCallback(CommandModeChangedCallback *cb)=0;
|
---|
663 |
|
---|
664 | virtual RightClickMenuManager* GetRightClickMenuManager()=0;
|
---|
665 |
|
---|
666 | // Delete key notitfication
|
---|
667 | virtual void RegisterDeleteUser(EventUser *user)=0; // Register & Activate
|
---|
668 | virtual void UnRegisterDeleteUser(EventUser *user)=0; // Deactivate & UnRegister
|
---|
669 |
|
---|
670 | //----- Creation-related Methods--------------------------
|
---|
671 |
|
---|
672 | virtual void MakeNameUnique(TSTR &name)=0;
|
---|
673 | virtual INode *CreateObjectNode( Object *obj)=0;
|
---|
674 | virtual void *CreateInstance(SClass_ID superID, Class_ID classID)=0;
|
---|
675 | virtual int BindToTarget(INode *laNode, INode *targNode)=0;
|
---|
676 | virtual int IsCPEdgeOnInView()=0;
|
---|
677 | virtual void DeleteNode(INode *node)=0;
|
---|
678 | virtual INode *GetRootNode()=0;
|
---|
679 | virtual void NodeInvalidateRect( INode *node )=0;
|
---|
680 | virtual void SelectNode( INode *node, int clearSel = 1)=0;
|
---|
681 | virtual void AddLightToScene(INode *node)=0;
|
---|
682 | virtual void SetNodeTMRelConstPlane(INode *node, Matrix3& mat)=0;
|
---|
683 | virtual void SetActiveGrid(INode *node)=0;
|
---|
684 |
|
---|
685 | // When a plug-in object implements it's own BeginCreate()/EndCreate()
|
---|
686 | // it can cause EndCreate() to be called by calling this method.
|
---|
687 | virtual void StopCreating()=0;
|
---|
688 |
|
---|
689 | // This creates a new object/node with out going throught the usual
|
---|
690 | // create mouse proc sequence.
|
---|
691 | // The matrix is relative to the contruction plane.
|
---|
692 | virtual void NonMouseCreate(Matrix3 tm)=0;
|
---|
693 |
|
---|
694 | // directories
|
---|
695 | virtual TCHAR *GetDir(int which)=0; // which = APP_XXX_DIR
|
---|
696 | virtual int GetPlugInEntryCount()=0; // # of entries in PLUGIN.INI
|
---|
697 | virtual TCHAR *GetPlugInDesc(int i)=0; // ith description
|
---|
698 | virtual TCHAR *GetPlugInDir(int i)=0; // ith directory
|
---|
699 |
|
---|
700 | // bitmap path
|
---|
701 | virtual int GetMapDirCount()=0; // number of dirs in path
|
---|
702 | virtual TCHAR *GetMapDir(int i)=0; // i'th dir of path
|
---|
703 | virtual BOOL AddMapDir(TCHAR *dir)=0; // add a path to the list
|
---|
704 |
|
---|
705 | virtual float GetLightConeConstraint()=0;
|
---|
706 |
|
---|
707 | // for light exclusion/inclusion lists
|
---|
708 | virtual int DoExclusionListDialog(NameTab *nl, BOOL doShadows=TRUE)=0;
|
---|
709 |
|
---|
710 | virtual MtlBase *DoMaterialBrowseDlg(HWND hParent,DWORD flags,BOOL &newMat,BOOL &cancel)=0;
|
---|
711 |
|
---|
712 | virtual void PutMtlToMtlEditor(MtlBase *mb)=0;
|
---|
713 |
|
---|
714 | // Access names of current files
|
---|
715 | virtual TSTR &GetCurFileName()=0;
|
---|
716 | virtual TSTR &GetCurFilePath()=0;
|
---|
717 | virtual TCHAR *GetMatLibFileName()=0;
|
---|
718 |
|
---|
719 | // These may bring up file requesters
|
---|
720 | virtual void FileOpen()=0;
|
---|
721 | virtual BOOL FileSave()=0;
|
---|
722 | virtual BOOL FileSaveAs()=0;
|
---|
723 | virtual void FileSaveSelected()=0;
|
---|
724 | virtual void FileReset(BOOL noPrompt=FALSE)=0;
|
---|
725 | virtual void FileMerge()=0;
|
---|
726 | virtual void FileHold()=0;
|
---|
727 | virtual void FileFetch()=0;
|
---|
728 | virtual void FileOpenMatLib(HWND hWnd)=0; // Window handle is parent window
|
---|
729 | virtual void FileSaveMatLib(HWND hWnd)=0;
|
---|
730 | virtual void FileSaveAsMatLib(HWND hWnd)=0;
|
---|
731 |
|
---|
732 | // This loads 3dsmax.mat (if it exists
|
---|
733 | virtual void LoadDefaultMatLib()=0;
|
---|
734 |
|
---|
735 | // These do not bring up file requesters
|
---|
736 | virtual int LoadFromFile(const TCHAR *name)=0;
|
---|
737 | virtual int SaveToFile(const TCHAR *fname)=0;
|
---|
738 | virtual int LoadMaterialLib(const TCHAR *name)=0;
|
---|
739 | virtual int SaveMaterialLib(const TCHAR *name)=0;
|
---|
740 | virtual int MergeFromFile(const TCHAR *name, BOOL mergeAll=FALSE,BOOL selMerged=FALSE)=0;
|
---|
741 |
|
---|
742 | // Returns TRUE if this instance of MAX is in slave mode
|
---|
743 | virtual BOOL InSlaveMode()=0;
|
---|
744 |
|
---|
745 | // Brings up the object color picker. Returns TRUE if the user
|
---|
746 | // picks a color and FALSE if the user cancels the dialog.
|
---|
747 | // If the user picks a color than 'col' will be set to the color.
|
---|
748 | virtual BOOL NodeColorPicker(HWND hWnd,DWORD &col)=0;
|
---|
749 |
|
---|
750 |
|
---|
751 | // The following gourping functions will operate on the table
|
---|
752 | // of nodes passed in or the current selection set if the table is NULL
|
---|
753 |
|
---|
754 | // If name is NULL a dialog box will prompt the user to select a name.
|
---|
755 | // If sel group is TRUE, the group node will be selected after the operation completes.
|
---|
756 | // returns a pointer to the group node created.
|
---|
757 | virtual INode *GroupNodes(INodeTab *nodes=NULL,TSTR *name=NULL,BOOL selGroup=TRUE)=0;
|
---|
758 | virtual void UngroupNodes(INodeTab *nodes=NULL)=0;
|
---|
759 | virtual void ExplodeNodes(INodeTab *nodes=NULL)=0;
|
---|
760 | virtual void OpenGroup(INodeTab *nodes=NULL,BOOL clearSel=TRUE)=0;
|
---|
761 | virtual void CloseGroup(INodeTab *nodes=NULL,BOOL selGroup=TRUE)=0;
|
---|
762 |
|
---|
763 | // If a plug-in needs to do a PeekMessage() and wants to actually remove the
|
---|
764 | // message from the queue, it can use this method to have the message
|
---|
765 | // translated and dispatched.
|
---|
766 | virtual void TranslateAndDispatchMAXMessage(MSG &msg)=0;
|
---|
767 |
|
---|
768 | // This will go into a PeekMessage loop until there are no more
|
---|
769 | // messages left. If this method returns FALSE then the user
|
---|
770 | // is attempting to quit MAX and the caller should return.
|
---|
771 | virtual BOOL CheckMAXMessages()=0;
|
---|
772 |
|
---|
773 | // Access viewport background image settings.
|
---|
774 | virtual BOOL setBkgImageName(TCHAR *name)=0;
|
---|
775 | virtual TCHAR * getBkgImageName(void)=0;
|
---|
776 | virtual void setBkgImageAspect(int t)=0;
|
---|
777 | virtual int getBkgImageAspect()=0;
|
---|
778 | virtual void setBkgImageAnimate(BOOL onOff)=0;
|
---|
779 | virtual int getBkgImageAnimate(void)=0;
|
---|
780 | virtual void setBkgFrameRange(int start, int end, int step=1)=0;
|
---|
781 | virtual int getBkgFrameRangeVal(int which)=0;
|
---|
782 | virtual void setBkgORType(int which, int type)=0; // which=0 => before start, which=1 => after end
|
---|
783 | virtual int getBkgORType(int which)=0;
|
---|
784 | virtual void setBkgStartTime(TimeValue t)=0;
|
---|
785 | virtual TimeValue getBkgStartTime()=0;
|
---|
786 | virtual void setBkgSyncFrame(int f)=0;
|
---|
787 | virtual int getBkgSyncFrame()=0;
|
---|
788 | virtual int getBkgFrameNum(TimeValue t)=0;
|
---|
789 |
|
---|
790 | // Gets the state of the real-time animation playback toggle.
|
---|
791 | virtual BOOL GetRealTimePlayback()=0;
|
---|
792 | virtual void SetRealTimePlayback(BOOL realTime)=0;
|
---|
793 | virtual BOOL GetPlayActiveOnly()=0;
|
---|
794 | virtual void SetPlayActiveOnly(BOOL playActive)=0;
|
---|
795 | virtual void StartAnimPlayback(int selOnly=FALSE)=0;
|
---|
796 | virtual void EndAnimPlayback()=0;
|
---|
797 | virtual BOOL IsAnimPlaying()=0;
|
---|
798 |
|
---|
799 | // The following APIs provide a simplistic method to call
|
---|
800 | // the renderer and render frames. The renderer just uses the
|
---|
801 | // current user specified parameters.
|
---|
802 | // Note that the renderer uses the width, height, and aspect
|
---|
803 | // of the specified bitmap so the caller can control the size
|
---|
804 | // of the rendered image rendered.
|
---|
805 |
|
---|
806 | // Renderer must be opened before frames can be rendered.
|
---|
807 | // Either camNode or view must be non-NULL but not both.
|
---|
808 | //
|
---|
809 | // Returns the result of the open call on the current renderer.
|
---|
810 | // 0 is fail and 1 is succeed.
|
---|
811 | virtual int OpenCurRenderer(INode *camNode,ViewExp *view)=0;
|
---|
812 |
|
---|
813 | // The renderer must be closed when you are done with it.
|
---|
814 | virtual void CloseCurRenderer()=0;
|
---|
815 |
|
---|
816 | // Renders a frame to the given bitmap.
|
---|
817 | // The RendProgressCallback is an optional callback (the base class is
|
---|
818 | // defined in render.h).
|
---|
819 | //
|
---|
820 | // Returns the result of the render call on the current renderer.
|
---|
821 | // 0 is fail and 1 is succeed.
|
---|
822 | virtual int CurRendererRenderFrame(TimeValue t,Bitmap *bm,RendProgressCallback *prog=NULL, float frameDur = 1.0f)=0;
|
---|
823 |
|
---|
824 |
|
---|
825 | // To get more control over the renderer, the renderer can
|
---|
826 | // be called dircetly. The following methods give access to
|
---|
827 | // the current renderer and the the user's current rendering settings.
|
---|
828 |
|
---|
829 | // Retreives a pointer the renderer currently set to be the
|
---|
830 | // active renderer.
|
---|
831 | virtual Renderer *GetCurrentRenderer()=0;
|
---|
832 |
|
---|
833 | // Fills in a RendParams structure that can be passed to the
|
---|
834 | // renderer with the user's current rendering settings.
|
---|
835 | // A vpt pointer only needs to be passed in if the RendType
|
---|
836 | // is RENDTYPE_REGION or RENDTYPE_BLOWUP. In these cases it will
|
---|
837 | // set up the RendParams regxmin,regxmax,regymin,regymax from
|
---|
838 | // values stored in the viewport.
|
---|
839 | virtual void SetupRendParams(RendParams &rp, ViewExp *vpt, RendType t = RENDTYPE_NORMAL)=0;
|
---|
840 |
|
---|
841 | // These give access to individual user specified render parameters
|
---|
842 | // These are either parameters that the user specifies in the
|
---|
843 | // render dialog or the renderer page of the preferences dialog.
|
---|
844 | virtual int GetRendTimeType()=0;
|
---|
845 | virtual void SetRendTimeType(int type)=0;
|
---|
846 | virtual TimeValue GetRendStart()=0;
|
---|
847 | virtual void SetRendStart(TimeValue start)=0;
|
---|
848 | virtual TimeValue GetRendEnd()=0;
|
---|
849 | virtual void SetRendEnd(TimeValue end)=0;
|
---|
850 | virtual int GetRendNThFrame()=0;
|
---|
851 | virtual void SetRendNThFrame(int n)=0;
|
---|
852 | virtual BOOL GetRendShowVFB()=0;
|
---|
853 | virtual void SetRendShowVFB(BOOL onOff)=0;
|
---|
854 | virtual BOOL GetRendSaveFile()=0;
|
---|
855 | virtual void SetRendSaveFile(BOOL onOff)=0;
|
---|
856 | virtual BOOL GetRendUseDevice()=0;
|
---|
857 | virtual void SetRendUseDevice(BOOL onOff)=0;
|
---|
858 | virtual BOOL GetRendUseNet()=0;
|
---|
859 | virtual void SetRendUseNet(BOOL onOff)=0;
|
---|
860 | virtual BitmapInfo& GetRendFileBI()=0;
|
---|
861 | virtual BitmapInfo& GetRendDeviceBI()=0;
|
---|
862 | virtual int GetRendWidth()=0;
|
---|
863 | virtual void SetRendWidth(int w)=0;
|
---|
864 | virtual int GetRendHeight()=0;
|
---|
865 | virtual void SetRendHeight(int h)=0;
|
---|
866 | virtual float GetRendApect()=0;
|
---|
867 | virtual void SetRendAspect(float a)=0;
|
---|
868 | virtual BOOL GetRendFieldRender()=0;
|
---|
869 | virtual void SetRendFieldRender(BOOL onOff)=0;
|
---|
870 | virtual BOOL GetRendColorCheck()=0;
|
---|
871 | virtual void SetRendColorCheck(BOOL onOff)=0;
|
---|
872 | virtual BOOL GetRendSuperBlack()=0;
|
---|
873 | virtual void SetRendSuperBlack(BOOL onOff)=0;
|
---|
874 | virtual BOOL GetRendHidden()=0;
|
---|
875 | virtual void SetRendHidden(BOOL onOff)=0;
|
---|
876 | virtual BOOL GetRendForce2Side()=0;
|
---|
877 | virtual void SetRendForce2Side(BOOL onOff)=0;
|
---|
878 | virtual BOOL GetRendAtmosphere()=0;
|
---|
879 | virtual void SetRendAtmosphere(BOOL onOff)=0;
|
---|
880 | virtual TSTR& GetRendPickFramesString()=0;
|
---|
881 | virtual BOOL GetRendDitherTrue()=0;
|
---|
882 | virtual void SetRendDitherTrue(BOOL onOff)=0;
|
---|
883 | virtual BOOL GetRendDither256()=0;
|
---|
884 | virtual void SetRendDither256(BOOL onOff)=0;
|
---|
885 | virtual BOOL GetRendMultiThread()=0;
|
---|
886 | virtual void SetRendMultiThread(BOOL onOff)=0;
|
---|
887 | virtual BOOL GetRendNThSerial()=0;
|
---|
888 | virtual void SetRendNThSerial(BOOL onOff)=0;
|
---|
889 | virtual int GetRendVidCorrectMethod()=0; // 0->FLAG, 1->SCALE_LUMA 2->SCALE_SAT
|
---|
890 | virtual void SetRendVidCorrectMethod(int m)=0;
|
---|
891 | virtual int GetRendFieldOrder()=0; // 0->even, 1-> odd
|
---|
892 | virtual void SetRendFieldOrder(int fo)=0;
|
---|
893 | virtual int GetRendNTSC_PAL()=0; // 0 ->NTSC, 1 ->PAL
|
---|
894 | virtual void SetRendNTSC_PAL(int np)=0;
|
---|
895 | virtual int GetRendSuperBlackThresh()=0;
|
---|
896 | virtual void SetRendSuperBlackThresh(int sb)=0;
|
---|
897 | virtual float GetRendMaxPixelSize()=0;
|
---|
898 | virtual void SetRendMaxPixelSize(float s)=0;
|
---|
899 |
|
---|
900 | virtual DWORD GetHideByCategoryFlags()=0;
|
---|
901 | virtual void SetHideByCategoryFlags(DWORD f)=0;
|
---|
902 |
|
---|
903 | virtual int GetViewportLayout()=0;
|
---|
904 | virtual BOOL IsViewportMaxed()=0;
|
---|
905 | virtual void SetViewportMax(BOOL max)=0;
|
---|
906 |
|
---|
907 | // Zoom extents the active viewport, or all
|
---|
908 | virtual void ViewportZoomExtents(BOOL doAll, BOOL skipPersp=FALSE)=0;
|
---|
909 |
|
---|
910 | // Gets the world space bounding box of the selection.
|
---|
911 | virtual void GetSelectionWorldBox(TimeValue t,Box3 &box)=0;
|
---|
912 |
|
---|
913 | // Find an INode with the given name
|
---|
914 | virtual INode *GetINodeByName(const TCHAR *name)=0;
|
---|
915 |
|
---|
916 | // Executes a MAX command. See maxcom.h for available commands
|
---|
917 | virtual void ExecuteMAXCommand(int id)=0;
|
---|
918 |
|
---|
919 | // Returns a class used for efficiently creating unique names
|
---|
920 | virtual NameMaker* NewNameMaker()=0;
|
---|
921 |
|
---|
922 | // Get set the viewport background color.
|
---|
923 | virtual void SetViewportBGColor(const Point3 &color)=0;
|
---|
924 | virtual Point3 GetViewportBGColor()=0;
|
---|
925 |
|
---|
926 | // Get/Set the environment texture map.
|
---|
927 | virtual Texmap *GetEnvironmentMap()=0;
|
---|
928 | virtual void SetEnvironmentMap(Texmap *map)=0;
|
---|
929 |
|
---|
930 | // Get/Set the current sound object.
|
---|
931 | virtual SoundObj *GetSoundObject()=0;
|
---|
932 | virtual void SetSoundObject(SoundObj *snd)=0;
|
---|
933 |
|
---|
934 | // Access the current mat lib loaded.
|
---|
935 | virtual MtlBaseLib& GetMaterialLibrary()=0;
|
---|
936 |
|
---|
937 | // Network error logging
|
---|
938 | // for writing multiple lines, use NetOpenLog(), NetCloseLog().
|
---|
939 | // For a single line, just call NetLog: it will automatically do
|
---|
940 | // an Open and Close.
|
---|
941 | virtual int NetOpenLog()=0; // returns 1 if is network server and open succeeded
|
---|
942 | virtual void NetLog(const TCHAR *format,...)=0; // noop unless network server
|
---|
943 | virtual void NetCloseLog()=0;
|
---|
944 | virtual BOOL IsNetServer()=0; // returns 1 iff is network server
|
---|
945 | };
|
---|
946 |
|
---|
947 | class IObjParam: public Interface{};
|
---|
948 | class IObjCreate: public IObjParam{};
|
---|
949 |
|
---|
950 |
|
---|
951 | #endif // __JAGAPI__
|
---|
952 |
|
---|