Home Hierarchy Members Alphabetical Related Pages

spotlight.h

Go to the documentation of this file.
00001 #ifndef XDKWRL_SPOTLIGHT_H
00002 #define XDKWRL_SPOTLIGHT_H
00003 
00004 #include <xdkwrl/node.h>
00005 #include <xdkwrl/fieldtypes/sfbool.h>
00006 #include <xdkwrl/fieldtypes/sfcolor.h>
00007 #include <xdkwrl/fieldtypes/sffloat.h>
00008 #include <xdkwrl/fieldtypes/sfvec3f.h>
00009 
00010 namespace wrl
00011 {
00012   //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00013   // Interface of SpotLight
00014   //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00015   class SpotLight : public Node
00016   {
00017    public:
00018      SpotLight(const char* name="");
00019      virtual ~SpotLight();
00020      virtual inline unsigned int nbFields() const;
00021      virtual FieldHandle field(const std::string& n);
00022      virtual FieldHandle field(const unsigned int i);
00023      virtual bool isSetToDefaultValue(const unsigned int i) const;
00024      virtual inline unsigned int nbEventsIn() const;
00025      virtual EventInHandle eventIn(const std::string& n);
00026      virtual EventInHandle eventIn(const unsigned int i);
00027      virtual inline unsigned int nbEventsOut() const;
00028      virtual EventOutHandle eventOut(const std::string& n);
00029      virtual EventOutHandle eventOut(const unsigned int i);
00030      inline const char* typeName() const;
00031      virtual Node* duplicate() const;
00032      virtual Node* duplicate(std::map<const Node*,Node*>&) const;
00033      /*!@name Exposed Fields
00034       * A field that is capable of receiving events via an eventIn to 
00035       * change its value(s), and generating events via an eventOut 
00036       * when its value(s) change.
00037       */
00038       //!@{
00039       /*!
00040        * See <a href="#_details" class="md">Detailed Description</a>
00041        * for meaning of this field.
00042        * Default value is set to 
00043        \code
00044        ambientIntensity = 0;
00045        \endcode
00046        */
00047        SFFloat    ambientIntensity;
00048       /*!
00049        * See <a href="#_details" class="md">Detailed Description</a>
00050        * for meaning of this field.
00051        * Default value is set to 
00052        \code
00053        attenuation.setXYZ(1,0,0);
00054        \endcode
00055        */
00056        SFVec3f    attenuation;
00057       /*!
00058        * See <a href="#_details" class="md">Detailed Description</a>
00059        * for meaning of this field.
00060        * Default value is set to 
00061        \code
00062        beamWidth = 1.5708;
00063        \endcode
00064        */
00065        SFFloat    beamWidth;
00066       /*!
00067        * See <a href="#_details" class="md">Detailed Description</a>
00068        * for meaning of this field.
00069        * Default value is set to 
00070        \code
00071        color.setRGB(1,1,1);
00072        \endcode
00073        */
00074        SFColor    color;
00075       /*!
00076        * See <a href="#_details" class="md">Detailed Description</a>
00077        * for meaning of this field.
00078        * Default value is set to 
00079        \code
00080        cutOffAngle = 0.785398;
00081        \endcode
00082        */
00083        SFFloat    cutOffAngle;
00084       /*!
00085        * See <a href="#_details" class="md">Detailed Description</a>
00086        * for meaning of this field.
00087        * Default value is set to 
00088        \code
00089        direction.setXYZ(0,0,-1);
00090        \endcode
00091        */
00092        SFVec3f    direction;
00093       /*!
00094        * See <a href="#_details" class="md">Detailed Description</a>
00095        * for meaning of this field.
00096        * Default value is set to 
00097        \code
00098        intensity = 1;
00099        \endcode
00100        */
00101        SFFloat    intensity;
00102       /*!
00103        * See <a href="#_details" class="md">Detailed Description</a>
00104        * for meaning of this field.
00105        * Default value is set to 
00106        \code
00107        location.setXYZ(0,0,0);
00108        \endcode
00109        */
00110        SFVec3f    location;
00111       /*!
00112        * See <a href="#_details" class="md">Detailed Description</a>
00113        * for meaning of this field.
00114        * Default value is set to 
00115        \code
00116        on = true;
00117        \endcode
00118        */
00119        SFBool     on;
00120       /*!
00121        * See <a href="#_details" class="md">Detailed Description</a>
00122        * for meaning of this field.
00123        * Default value is set to 
00124        \code
00125        radius = 100;
00126        \endcode
00127        */
00128        SFFloat    radius;
00129      //!@}
00130      /*!@name Fields
00131       * A property or attribute of a node. Each node type has a fixed set
00132       * of fields. Fields may contain various kinds of data and one or many
00133       * values. Each field has a default value.
00134       */
00135       //!@{
00136      //!@}
00137      /*!@name Events In
00138       * 
00139       */
00140       //!@{
00141       /*!
00142        * Set event associated to exposedField ambientIntensity
00143        */
00144        EventIn<SFFloat>    set_ambientIntensity;
00145       /*!
00146        * Set event associated to exposedField attenuation
00147        */
00148        EventIn<SFVec3f>    set_attenuation;
00149       /*!
00150        * Set event associated to exposedField beamWidth
00151        */
00152        EventIn<SFFloat>    set_beamWidth;
00153       /*!
00154        * Set event associated to exposedField color
00155        */
00156        EventIn<SFColor>    set_color;
00157       /*!
00158        * Set event associated to exposedField cutOffAngle
00159        */
00160        EventIn<SFFloat>    set_cutOffAngle;
00161       /*!
00162        * Set event associated to exposedField direction
00163        */
00164        EventIn<SFVec3f>    set_direction;
00165       /*!
00166        * Set event associated to exposedField intensity
00167        */
00168        EventIn<SFFloat>    set_intensity;
00169       /*!
00170        * Set event associated to exposedField location
00171        */
00172        EventIn<SFVec3f>    set_location;
00173       /*!
00174        * Set event associated to exposedField on
00175        */
00176        EventIn<SFBool>     set_on;
00177       /*!
00178        * Set event associated to exposedField radius
00179        */
00180        EventIn<SFFloat>    set_radius;
00181   //!@}
00182      /*!@name Events Out
00183       * 
00184       */
00185       //!@{
00186       /*!
00187        * Changed event associated to exposedField ambientIntensity
00188        */
00189        EventOut<SFFloat>    ambientIntensity_changed;
00190       /*!
00191        * Changed event associated to exposedField attenuation
00192        */
00193        EventOut<SFVec3f>    attenuation_changed;
00194       /*!
00195        * Changed event associated to exposedField beamWidth
00196        */
00197        EventOut<SFFloat>    beamWidth_changed;
00198       /*!
00199        * Changed event associated to exposedField color
00200        */
00201        EventOut<SFColor>    color_changed;
00202       /*!
00203        * Changed event associated to exposedField cutOffAngle
00204        */
00205        EventOut<SFFloat>    cutOffAngle_changed;
00206       /*!
00207        * Changed event associated to exposedField direction
00208        */
00209        EventOut<SFVec3f>    direction_changed;
00210       /*!
00211        * Changed event associated to exposedField intensity
00212        */
00213        EventOut<SFFloat>    intensity_changed;
00214       /*!
00215        * Changed event associated to exposedField location
00216        */
00217        EventOut<SFVec3f>    location_changed;
00218       /*!
00219        * Changed event associated to exposedField on
00220        */
00221        EventOut<SFBool>     on_changed;
00222       /*!
00223        * Changed event associated to exposedField radius
00224        */
00225        EventOut<SFFloat>    radius_changed;
00226   //!@}
00227   };
00228 };
00229 //************************************************************
00230 // Implementation of SpotLight
00231 //************************************************************
00232 /*!
00233  * Returns <code>"SpotLight"</code>. Useful for printing.
00234  */
00235 inline const char*
00236 wrl::SpotLight::typeName() const
00237 {
00238   return "SpotLight";
00239 }
00240 /*!
00241  * Returns the number of fields (exposed or not) for this node type.
00242  */
00243 inline unsigned int
00244 wrl::SpotLight::nbFields() const
00245 {
00246    return 10;
00247 }
00248 /*!
00249  * Returns the number of events in for this node type.
00250  */
00251 inline unsigned int
00252 wrl::SpotLight::nbEventsIn() const
00253 {
00254    return 0;
00255 }
00256 /*!
00257  * Returns the number of events out for this node type.
00258  */
00259 inline unsigned int
00260 wrl::SpotLight::nbEventsOut() const
00261 {
00262    return 0;
00263 }
00264 #endif // XDKWRL_SPOTLIGHT_H
00265 
00266 // Local variables section.
00267 // This is only used by emacs!
00268 // Local Variables:
00269 // ff-search-directories: ("../../" "../../../src/xdkwrl/nodes")
00270 // End:

Generated on 24 Feb 2005 with doxygen version 1.3.9.1. Valid HTML 4.0! Valid CSS!