home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.0 / NeXTSTEP3.0.iso / NextDeveloper / Headers / 3Dkit / N3DLight.h < prev    next >
Text File  |  1992-07-18  |  2KB  |  63 lines

  1. /*
  2.     Copyright (c) 1991, 1992 by NeXT Computer, Inc as an unpublished work.
  3.     All rights reserved.
  4. */
  5.  
  6. #import "N3DShape.h"
  7. #import <ri/ri.h>
  8.  
  9. #import <appkit/color.h>
  10.  
  11. @interface N3DLight : N3DShape
  12. {
  13.     RtToken        lightHandle;
  14.     N3DLightType    type;  /* one of Ambient, Point, Distant, Spot */
  15.     RtPoint        from, to;
  16.     NXColor        color;
  17.     RtFloat        intensity, coneAngle, coneDelta, beamDistribution;
  18.     struct {
  19.     unsigned int global : 1; /* turned on by N3DCamera */
  20.     unsigned int on : 1;
  21.     } lightFlags;
  22.     RtColor        _rmColor;
  23.     void        *_N3Dlprivate;
  24. }
  25.  
  26. - init;
  27.  
  28. /* These next 4 methods are shorthand methods for the built-in light types;
  29.    they only affect the values appropriate for the particular light. */
  30. - makeAmbientWithIntensity:(RtFloat)i;
  31. - makePointFrom:(RtPoint)pf intensity:(RtFloat)i;
  32. - makeDistantFrom:(RtPoint)pf to:(RtPoint)pt intensity:(RtFloat)i;
  33. - makeSpotFrom:(RtPoint)pf to:(RtPoint)pt
  34.         coneAngle:(RtFloat)ca coneDelta:(RtFloat)cd
  35.         beamDistribution:(RtFloat)bd
  36.         intensity:(RtFloat)i;
  37.  
  38.  
  39. - renderSelf:(N3DCamera *)camera;
  40. - renderGlobal:(N3DCamera *)camera;
  41.  
  42. - setGlobal:(BOOL)flag;
  43. - (BOOL)isGlobal;
  44. - switchLight:(BOOL)onOff;
  45. - setType:(N3DLightType)aType;
  46. - (N3DLightType)type;
  47. - setFrom:(RtPoint)pf;
  48. - setFrom:(RtPoint)pf to:(RtPoint)pt;
  49. - getFrom:(RtPoint *)pf to:(RtPoint *)pt;
  50. - setColor:(NXColor)c;
  51. - (NXColor)color;
  52. - setIntensity:(RtFloat)i;
  53. - (RtFloat)intensity;
  54. - setConeAngle:(RtFloat)ca coneDelta:(RtFloat)cd beamDistribution:(RtFloat)bd;
  55. - getConeAngle:(RtFloat *)cap coneDelta:(RtFloat *)cdp
  56.                 beamDistribution:(RtFloat *)bdp;
  57.  
  58. - awake;
  59. - read:(NXTypedStream *)stream;
  60. - write:(NXTypedStream *)stream;
  61.  
  62. @end
  63.