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