Home Hierarchy Members Alphabetical Related Pages

directionallight.h

Go to the documentation of this file.
00001 #ifndef XDKWRL_DIRECTIONALLIGHT_H
00002 #define XDKWRL_DIRECTIONALLIGHT_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 DirectionalLight
00014   //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00015   class DirectionalLight : public Node
00016   {
00017    public:
00018      DirectionalLight(const char* name="");
00019      virtual ~DirectionalLight();
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        color.setRGB(1,1,1);
00054        \endcode
00055        */
00056        SFColor    color;
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        direction.setXYZ(0,0,-1);
00063        \endcode
00064        */
00065        SFVec3f    direction;
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        intensity = 1;
00072        \endcode
00073        */
00074        SFFloat    intensity;
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        on = true;
00081        \endcode
00082        */
00083        SFBool     on;
00084      //!@}
00085      /*!@name Fields
00086       * A property or attribute of a node. Each node type has a fixed set
00087       * of fields. Fields may contain various kinds of data and one or many
00088       * values. Each field has a default value.
00089       */
00090       //!@{
00091      //!@}
00092      /*!@name Events In
00093       * 
00094       */
00095       //!@{
00096       /*!
00097        * Set event associated to exposedField ambientIntensity
00098        */
00099        EventIn<SFFloat>    set_ambientIntensity;
00100       /*!
00101        * Set event associated to exposedField color
00102        */
00103        EventIn<SFColor>    set_color;
00104       /*!
00105        * Set event associated to exposedField direction
00106        */
00107        EventIn<SFVec3f>    set_direction;
00108       /*!
00109        * Set event associated to exposedField intensity
00110        */
00111        EventIn<SFFloat>    set_intensity;
00112       /*!
00113        * Set event associated to exposedField on
00114        */
00115        EventIn<SFBool>     set_on;
00116   //!@}
00117      /*!@name Events Out
00118       * 
00119       */
00120       //!@{
00121       /*!
00122        * Changed event associated to exposedField ambientIntensity
00123        */
00124        EventOut<SFFloat>    ambientIntensity_changed;
00125       /*!
00126        * Changed event associated to exposedField color
00127        */
00128        EventOut<SFColor>    color_changed;
00129       /*!
00130        * Changed event associated to exposedField direction
00131        */
00132        EventOut<SFVec3f>    direction_changed;
00133       /*!
00134        * Changed event associated to exposedField intensity
00135        */
00136        EventOut<SFFloat>    intensity_changed;
00137       /*!
00138        * Changed event associated to exposedField on
00139        */
00140        EventOut<SFBool>     on_changed;
00141   //!@}
00142   };
00143 };
00144 //************************************************************
00145 // Implementation of DirectionalLight
00146 //************************************************************
00147 /*!
00148  * Returns <code>"DirectionalLight"</code>. Useful for printing.
00149  */
00150 inline const char*
00151 wrl::DirectionalLight::typeName() const
00152 {
00153   return "DirectionalLight";
00154 }
00155 /*!
00156  * Returns the number of fields (exposed or not) for this node type.
00157  */
00158 inline unsigned int
00159 wrl::DirectionalLight::nbFields() const
00160 {
00161    return 5;
00162 }
00163 /*!
00164  * Returns the number of events in for this node type.
00165  */
00166 inline unsigned int
00167 wrl::DirectionalLight::nbEventsIn() const
00168 {
00169    return 0;
00170 }
00171 /*!
00172  * Returns the number of events out for this node type.
00173  */
00174 inline unsigned int
00175 wrl::DirectionalLight::nbEventsOut() const
00176 {
00177    return 0;
00178 }
00179 #endif // XDKWRL_DIRECTIONALLIGHT_H
00180 
00181 // Local variables section.
00182 // This is only used by emacs!
00183 // Local Variables:
00184 // ff-search-directories: ("../../" "../../../src/xdkwrl/nodes")
00185 // End:

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