Home | Hierarchy | Members | Alphabetical | Related Pages |
00001 #ifndef XDKWRL_POINTLIGHT_H 00002 #define XDKWRL_POINTLIGHT_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 PointLight 00014 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00015 class PointLight : public Node 00016 { 00017 public: 00018 PointLight(const char* name=""); 00019 virtual ~PointLight(); 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 color.setRGB(1,1,1); 00063 \endcode 00064 */ 00065 SFColor color; 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 location.setXYZ(0,0,0); 00081 \endcode 00082 */ 00083 SFVec3f location; 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 on = true; 00090 \endcode 00091 */ 00092 SFBool on; 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 radius = 100; 00099 \endcode 00100 */ 00101 SFFloat radius; 00102 //!@} 00103 /*!@name Fields 00104 * A property or attribute of a node. Each node type has a fixed set 00105 * of fields. Fields may contain various kinds of data and one or many 00106 * values. Each field has a default value. 00107 */ 00108 //!@{ 00109 //!@} 00110 /*!@name Events In 00111 * 00112 */ 00113 //!@{ 00114 /*! 00115 * Set event associated to exposedField ambientIntensity 00116 */ 00117 EventIn<SFFloat> set_ambientIntensity; 00118 /*! 00119 * Set event associated to exposedField attenuation 00120 */ 00121 EventIn<SFVec3f> set_attenuation; 00122 /*! 00123 * Set event associated to exposedField color 00124 */ 00125 EventIn<SFColor> set_color; 00126 /*! 00127 * Set event associated to exposedField intensity 00128 */ 00129 EventIn<SFFloat> set_intensity; 00130 /*! 00131 * Set event associated to exposedField location 00132 */ 00133 EventIn<SFVec3f> set_location; 00134 /*! 00135 * Set event associated to exposedField on 00136 */ 00137 EventIn<SFBool> set_on; 00138 /*! 00139 * Set event associated to exposedField radius 00140 */ 00141 EventIn<SFFloat> set_radius; 00142 //!@} 00143 /*!@name Events Out 00144 * 00145 */ 00146 //!@{ 00147 /*! 00148 * Changed event associated to exposedField ambientIntensity 00149 */ 00150 EventOut<SFFloat> ambientIntensity_changed; 00151 /*! 00152 * Changed event associated to exposedField attenuation 00153 */ 00154 EventOut<SFVec3f> attenuation_changed; 00155 /*! 00156 * Changed event associated to exposedField color 00157 */ 00158 EventOut<SFColor> color_changed; 00159 /*! 00160 * Changed event associated to exposedField intensity 00161 */ 00162 EventOut<SFFloat> intensity_changed; 00163 /*! 00164 * Changed event associated to exposedField location 00165 */ 00166 EventOut<SFVec3f> location_changed; 00167 /*! 00168 * Changed event associated to exposedField on 00169 */ 00170 EventOut<SFBool> on_changed; 00171 /*! 00172 * Changed event associated to exposedField radius 00173 */ 00174 EventOut<SFFloat> radius_changed; 00175 //!@} 00176 }; 00177 }; 00178 //************************************************************ 00179 // Implementation of PointLight 00180 //************************************************************ 00181 /*! 00182 * Returns <code>"PointLight"</code>. Useful for printing. 00183 */ 00184 inline const char* 00185 wrl::PointLight::typeName() const 00186 { 00187 return "PointLight"; 00188 } 00189 /*! 00190 * Returns the number of fields (exposed or not) for this node type. 00191 */ 00192 inline unsigned int 00193 wrl::PointLight::nbFields() const 00194 { 00195 return 7; 00196 } 00197 /*! 00198 * Returns the number of events in for this node type. 00199 */ 00200 inline unsigned int 00201 wrl::PointLight::nbEventsIn() const 00202 { 00203 return 0; 00204 } 00205 /*! 00206 * Returns the number of events out for this node type. 00207 */ 00208 inline unsigned int 00209 wrl::PointLight::nbEventsOut() const 00210 { 00211 return 0; 00212 } 00213 #endif // XDKWRL_POINTLIGHT_H 00214 00215 // Local variables section. 00216 // This is only used by emacs! 00217 // Local Variables: 00218 // ff-search-directories: ("../../" "../../../src/xdkwrl/nodes") 00219 // End:
Generated on 24 Feb 2005 with version 1.3.9.1. |