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