home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.2 (Developer) / NS_dev_3.2.iso / NextDeveloper / Headers / 3Dkit / N3DContextManager.h < prev    next >
Text File  |  1992-07-18  |  1KB  |  45 lines

  1. /*
  2.     Copyright (c) 1991, 1992 by NeXT Computer, Inc as an unpublished work.
  3.     All rights reserved.
  4. */
  5.  
  6. #import <objc/Object.h>
  7. #import <objc/HashTable.h>
  8. #import <ri/ri.h>
  9.  
  10. @interface N3DContextManager : Object
  11. {
  12.     RtToken    mainContext;    /* the main context (not kept in list) */
  13.     id        contextTable;    /* a hash table of contexts */
  14.     RtToken    currentContext;
  15.     id        _focussedCamera;
  16.     RtPointer    _reserved;
  17.     void    *_N3Dprivate;
  18. }
  19.  
  20. + new;
  21. - free;
  22.  
  23. /* The following 4 methods cause a new context to be created (and entered
  24.    into the RMan contexts dictionary).  You can pass a null pointer as the
  25.    context name, and a unique string will be invented for the context name.
  26.    If a new context cannot be created for any reason, N3D_Null is returned.
  27.  */
  28. - (RtToken)mainContext;
  29. - (RtToken)createContext:(const char *)name;
  30. - (RtToken)createContext:(const char *)name withRenderer:(RtToken)renderer;
  31. - (RtToken)createContext:(const char *)name toFile:(const char *)ribFileName;
  32. - (RtToken)createContext:(const char *)name toStream:(NXStream *)stm;
  33. - (void)destroyContext:(RtToken)aContext;
  34. - (void)destroyContextByName:(const char *)name;
  35.  
  36. /* Methods for switching to a context, and for finding out which one
  37.    is current.  setCurrentContext: returns the token for the previous context. */
  38. - (RtToken)setCurrentContext:(RtToken)aContext;
  39. - (RtToken)setCurrentContextByName:(const char *)name;
  40. - (RtToken)currentContext;
  41.  
  42. - awake;
  43.  
  44. @end
  45.