Home | Hierarchy | Members | Alphabetical | Related Pages |
00001 #ifndef XDKWRL_PLANESENSOR_H 00002 #define XDKWRL_PLANESENSOR_H 00003 00004 #include <xdkwrl/node.h> 00005 #include <xdkwrl/fieldtypes/sfbool.h> 00006 #include <xdkwrl/fieldtypes/sfvec2f.h> 00007 #include <xdkwrl/fieldtypes/sfvec3f.h> 00008 00009 namespace wrl 00010 { 00011 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00012 // Interface of PlaneSensor 00013 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00014 class PlaneSensor : public Node 00015 { 00016 public: 00017 PlaneSensor(const char* name=""); 00018 virtual ~PlaneSensor(); 00019 virtual inline unsigned int nbFields() const; 00020 virtual FieldHandle field(const std::string& n); 00021 virtual FieldHandle field(const unsigned int i); 00022 virtual bool isSetToDefaultValue(const unsigned int i) const; 00023 virtual inline unsigned int nbEventsIn() const; 00024 virtual EventInHandle eventIn(const std::string& n); 00025 virtual EventInHandle eventIn(const unsigned int i); 00026 virtual inline unsigned int nbEventsOut() const; 00027 virtual EventOutHandle eventOut(const std::string& n); 00028 virtual EventOutHandle eventOut(const unsigned int i); 00029 inline const char* typeName() const; 00030 virtual Node* duplicate() const; 00031 virtual Node* duplicate(std::map<const Node*,Node*>&) const; 00032 /*!@name Exposed Fields 00033 * A field that is capable of receiving events via an eventIn to 00034 * change its value(s), and generating events via an eventOut 00035 * when its value(s) change. 00036 */ 00037 //!@{ 00038 /*! 00039 * See <a href="#_details" class="md">Detailed Description</a> 00040 * for meaning of this field. 00041 * Default value is set to 00042 \code 00043 autoOffset = true; 00044 \endcode 00045 */ 00046 SFBool autoOffset; 00047 /*! 00048 * See <a href="#_details" class="md">Detailed Description</a> 00049 * for meaning of this field. 00050 * Default value is set to 00051 \code 00052 enabled = true; 00053 \endcode 00054 */ 00055 SFBool enabled; 00056 /*! 00057 * See <a href="#_details" class="md">Detailed Description</a> 00058 * for meaning of this field. 00059 * Default value is set to 00060 \code 00061 maxPosition.setXY(-1,-1); 00062 \endcode 00063 */ 00064 SFVec2f maxPosition; 00065 /*! 00066 * See <a href="#_details" class="md">Detailed Description</a> 00067 * for meaning of this field. 00068 * Default value is set to 00069 \code 00070 minPosition.setXY(0,0); 00071 \endcode 00072 */ 00073 SFVec2f minPosition; 00074 /*! 00075 * See <a href="#_details" class="md">Detailed Description</a> 00076 * for meaning of this field. 00077 * Default value is set to 00078 \code 00079 offset.setXYZ(0,0,0); 00080 \endcode 00081 */ 00082 SFVec3f offset; 00083 //!@} 00084 /*!@name Fields 00085 * A property or attribute of a node. Each node type has a fixed set 00086 * of fields. Fields may contain various kinds of data and one or many 00087 * values. Each field has a default value. 00088 */ 00089 //!@{ 00090 //!@} 00091 /*!@name Events In 00092 * 00093 */ 00094 //!@{ 00095 /*! 00096 * Set event associated to exposedField autoOffset 00097 */ 00098 EventIn<SFBool> set_autoOffset; 00099 /*! 00100 * Set event associated to exposedField enabled 00101 */ 00102 EventIn<SFBool> set_enabled; 00103 /*! 00104 * Set event associated to exposedField maxPosition 00105 */ 00106 EventIn<SFVec2f> set_maxPosition; 00107 /*! 00108 * Set event associated to exposedField minPosition 00109 */ 00110 EventIn<SFVec2f> set_minPosition; 00111 /*! 00112 * Set event associated to exposedField offset 00113 */ 00114 EventIn<SFVec3f> set_offset; 00115 //!@} 00116 /*!@name Events Out 00117 * 00118 */ 00119 //!@{ 00120 /*! 00121 * See <a href="#_details" class="md">Detailed Description</a> 00122 * for meaning of this event. 00123 */ 00124 EventOut<SFBool> isActive; 00125 /*! 00126 * See <a href="#_details" class="md">Detailed Description</a> 00127 * for meaning of this event. 00128 */ 00129 EventOut<SFVec3f> trackPoint_changed; 00130 /*! 00131 * See <a href="#_details" class="md">Detailed Description</a> 00132 * for meaning of this event. 00133 */ 00134 EventOut<SFVec3f> translation_changed; 00135 /*! 00136 * Changed event associated to exposedField autoOffset 00137 */ 00138 EventOut<SFBool> autoOffset_changed; 00139 /*! 00140 * Changed event associated to exposedField enabled 00141 */ 00142 EventOut<SFBool> enabled_changed; 00143 /*! 00144 * Changed event associated to exposedField maxPosition 00145 */ 00146 EventOut<SFVec2f> maxPosition_changed; 00147 /*! 00148 * Changed event associated to exposedField minPosition 00149 */ 00150 EventOut<SFVec2f> minPosition_changed; 00151 /*! 00152 * Changed event associated to exposedField offset 00153 */ 00154 EventOut<SFVec3f> offset_changed; 00155 //!@} 00156 }; 00157 }; 00158 //************************************************************ 00159 // Implementation of PlaneSensor 00160 //************************************************************ 00161 /*! 00162 * Returns <code>"PlaneSensor"</code>. Useful for printing. 00163 */ 00164 inline const char* 00165 wrl::PlaneSensor::typeName() const 00166 { 00167 return "PlaneSensor"; 00168 } 00169 /*! 00170 * Returns the number of fields (exposed or not) for this node type. 00171 */ 00172 inline unsigned int 00173 wrl::PlaneSensor::nbFields() const 00174 { 00175 return 5; 00176 } 00177 /*! 00178 * Returns the number of events in for this node type. 00179 */ 00180 inline unsigned int 00181 wrl::PlaneSensor::nbEventsIn() const 00182 { 00183 return 0; 00184 } 00185 /*! 00186 * Returns the number of events out for this node type. 00187 */ 00188 inline unsigned int 00189 wrl::PlaneSensor::nbEventsOut() const 00190 { 00191 return 3; 00192 } 00193 #endif // XDKWRL_PLANESENSOR_H 00194 00195 // Local variables section. 00196 // This is only used by emacs! 00197 // Local Variables: 00198 // ff-search-directories: ("../../" "../../../src/xdkwrl/nodes") 00199 // End:
Generated on 24 Feb 2005 with
![]() |
|