home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.0 / NeXTSTEP3.0.iso / NextDeveloper / Headers / 3Dkit / N3DContextManager.h < prev    next >
Text File  |  1992-07-18  |  1KB  |  44 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 th@6 context name, and a unique string will be invented for the context name.
  25.    If a new context cannot be created for any reason, N3D_Null is returned.
  26.  */
  27. - (RtToken)mainContext;
  28. - (RtToken)createContext:(const char *)name;
  29. - (RtToken)createContext:(const char *)name withRenderer:(RtToken)renderer;
  30. - (RtToken)createContext:(const char *)name toFile:(const char *)ribFileName;
  31. - (RtToken)createContext:(const char *)name toStream:(NXStream *)stm;
  32. - (void)destroyContext:(RtToken)aContext;
  33. - (void)destroyContextByName:(const char *)name;
  34.  
  35. /* Methods for switching to a context, and for finding out which one
  36.    is current.  setCurrentContext: returns the token for the previous context. */
  37. - (RtToken)setCurrentContext:(RtToken)aContext;
  38. - (RtToken)setCurrentContextByName:(const char *)name;
  39. - (RtToken)currentContext;
  40.  
  41. - awake;
  42.  
  43. @end
  44.