Home | Hierarchy | Members | Alphabetical | Related Pages |
00001 #ifndef XDKWRL_CYLINDERSENSOR_H 00002 #define XDKWRL_CYLINDERSENSOR_H 00003 00004 #include <xdkwrl/node.h> 00005 #include <xdkwrl/fieldtypes/sfbool.h> 00006 #include <xdkwrl/fieldtypes/sffloat.h> 00007 #include <xdkwrl/fieldtypes/sfrotation.h> 00008 #include <xdkwrl/fieldtypes/sfvec3f.h> 00009 00010 namespace wrl 00011 { 00012 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00013 // Interface of CylinderSensor 00014 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00015 class CylinderSensor : public Node 00016 { 00017 public: 00018 CylinderSensor(const char* name=""); 00019 virtual ~CylinderSensor(); 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 autoOffset = true; 00045 \endcode 00046 */ 00047 SFBool autoOffset; 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 diskAngle = 0.262; 00054 \endcode 00055 */ 00056 SFFloat diskAngle; 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 enabled = true; 00063 \endcode 00064 */ 00065 SFBool enabled; 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 maxAngle = -1; 00072 \endcode 00073 */ 00074 SFFloat maxAngle; 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 minAngle = 0; 00081 \endcode 00082 */ 00083 SFFloat minAngle; 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 offset = 0; 00090 \endcode 00091 */ 00092 SFFloat offset; 00093 //!@} 00094 /*!@name Fields 00095 * A property or attribute of a node. Each node type has a fixed set 00096 * of fields. Fields may contain various kinds of data and one or many 00097 * values. Each field has a default value. 00098 */ 00099 //!@{ 00100 //!@} 00101 /*!@name Events In 00102 * 00103 */ 00104 //!@{ 00105 /*! 00106 * Set event associated to exposedField autoOffset 00107 */ 00108 EventIn<SFBool> set_autoOffset; 00109 /*! 00110 * Set event associated to exposedField diskAngle 00111 */ 00112 EventIn<SFFloat> set_diskAngle; 00113 /*! 00114 * Set event associated to exposedField enabled 00115 */ 00116 EventIn<SFBool> set_enabled; 00117 /*! 00118 * Set event associated to exposedField maxAngle 00119 */ 00120 EventIn<SFFloat> set_maxAngle; 00121 /*! 00122 * Set event associated to exposedField minAngle 00123 */ 00124 EventIn<SFFloat> set_minAngle; 00125 /*! 00126 * Set event associated to exposedField offset 00127 */ 00128 EventIn<SFFloat> set_offset; 00129 //!@} 00130 /*!@name Events Out 00131 * 00132 */ 00133 //!@{ 00134 /*! 00135 * See <a href="#_details" class="md">Detailed Description</a> 00136 * for meaning of this event. 00137 */ 00138 EventOut<SFBool> isActive; 00139 /*! 00140 * See <a href="#_details" class="md">Detailed Description</a> 00141 * for meaning of this event. 00142 */ 00143 EventOut<SFRotation> rotation_changed; 00144 /*! 00145 * See <a href="#_details" class="md">Detailed Description</a> 00146 * for meaning of this event. 00147 */ 00148 EventOut<SFVec3f> trackPoint_changed; 00149 /*! 00150 * Changed event associated to exposedField autoOffset 00151 */ 00152 EventOut<SFBool> autoOffset_changed; 00153 /*! 00154 * Changed event associated to exposedField diskAngle 00155 */ 00156 EventOut<SFFloat> diskAngle_changed; 00157 /*! 00158 * Changed event associated to exposedField enabled 00159 */ 00160 EventOut<SFBool> enabled_changed; 00161 /*! 00162 * Changed event associated to exposedField maxAngle 00163 */ 00164 EventOut<SFFloat> maxAngle_changed; 00165 /*! 00166 * Changed event associated to exposedField minAngle 00167 */ 00168 EventOut<SFFloat> minAngle_changed; 00169 /*! 00170 * Changed event associated to exposedField offset 00171 */ 00172 EventOut<SFFloat> offset_changed; 00173 //!@} 00174 }; 00175 }; 00176 //************************************************************ 00177 // Implementation of CylinderSensor 00178 //************************************************************ 00179 /*! 00180 * Returns <code>"CylinderSensor"</code>. Useful for printing. 00181 */ 00182 inline const char* 00183 wrl::CylinderSensor::typeName() const 00184 { 00185 return "CylinderSensor"; 00186 } 00187 /*! 00188 * Returns the number of fields (exposed or not) for this node type. 00189 */ 00190 inline unsigned int 00191 wrl::CylinderSensor::nbFields() const 00192 { 00193 return 6; 00194 } 00195 /*! 00196 * Returns the number of events in for this node type. 00197 */ 00198 inline unsigned int 00199 wrl::CylinderSensor::nbEventsIn() const 00200 { 00201 return 0; 00202 } 00203 /*! 00204 * Returns the number of events out for this node type. 00205 */ 00206 inline unsigned int 00207 wrl::CylinderSensor::nbEventsOut() const 00208 { 00209 return 3; 00210 } 00211 #endif // XDKWRL_CYLINDERSENSOR_H 00212 00213 // Local variables section. 00214 // This is only used by emacs! 00215 // Local Variables: 00216 // ff-search-directories: ("../../" "../../../src/xdkwrl/nodes") 00217 // End:
Generated on 24 Feb 2005 with version 1.3.9.1. |