Home | Hierarchy | Members | Alphabetical | Related Pages |
00001 #ifndef XDKWRL_VISIBILITYSENSOR_H 00002 #define XDKWRL_VISIBILITYSENSOR_H 00003 00004 #include <xdkwrl/node.h> 00005 #include <xdkwrl/fieldtypes/sfbool.h> 00006 #include <xdkwrl/fieldtypes/sftime.h> 00007 #include <xdkwrl/fieldtypes/sfvec3f.h> 00008 00009 namespace wrl 00010 { 00011 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00012 // Interface of VisibilitySensor 00013 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00014 class VisibilitySensor : public Node 00015 { 00016 public: 00017 VisibilitySensor(const char* name=""); 00018 virtual ~VisibilitySensor(); 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 center.setXYZ(0,0,0); 00044 \endcode 00045 */ 00046 SFVec3f center; 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 size.setXYZ(0,0,0); 00062 \endcode 00063 */ 00064 SFVec3f size; 00065 //!@} 00066 /*!@name Fields 00067 * A property or attribute of a node. Each node type has a fixed set 00068 * of fields. Fields may contain various kinds of data and one or many 00069 * values. Each field has a default value. 00070 */ 00071 //!@{ 00072 //!@} 00073 /*!@name Events In 00074 * 00075 */ 00076 //!@{ 00077 /*! 00078 * Set event associated to exposedField center 00079 */ 00080 EventIn<SFVec3f> set_center; 00081 /*! 00082 * Set event associated to exposedField enabled 00083 */ 00084 EventIn<SFBool> set_enabled; 00085 /*! 00086 * Set event associated to exposedField size 00087 */ 00088 EventIn<SFVec3f> set_size; 00089 //!@} 00090 /*!@name Events Out 00091 * 00092 */ 00093 //!@{ 00094 /*! 00095 * See <a href="#_details" class="md">Detailed Description</a> 00096 * for meaning of this event. 00097 */ 00098 EventOut<SFTime> enterTime; 00099 /*! 00100 * See <a href="#_details" class="md">Detailed Description</a> 00101 * for meaning of this event. 00102 */ 00103 EventOut<SFTime> exitTime; 00104 /*! 00105 * See <a href="#_details" class="md">Detailed Description</a> 00106 * for meaning of this event. 00107 */ 00108 EventOut<SFBool> isActive; 00109 /*! 00110 * Changed event associated to exposedField center 00111 */ 00112 EventOut<SFVec3f> center_changed; 00113 /*! 00114 * Changed event associated to exposedField enabled 00115 */ 00116 EventOut<SFBool> enabled_changed; 00117 /*! 00118 * Changed event associated to exposedField size 00119 */ 00120 EventOut<SFVec3f> size_changed; 00121 //!@} 00122 }; 00123 }; 00124 //************************************************************ 00125 // Implementation of VisibilitySensor 00126 //************************************************************ 00127 /*! 00128 * Returns <code>"VisibilitySensor"</code>. Useful for printing. 00129 */ 00130 inline const char* 00131 wrl::VisibilitySensor::typeName() const 00132 { 00133 return "VisibilitySensor"; 00134 } 00135 /*! 00136 * Returns the number of fields (exposed or not) for this node type. 00137 */ 00138 inline unsigned int 00139 wrl::VisibilitySensor::nbFields() const 00140 { 00141 return 3; 00142 } 00143 /*! 00144 * Returns the number of events in for this node type. 00145 */ 00146 inline unsigned int 00147 wrl::VisibilitySensor::nbEventsIn() const 00148 { 00149 return 0; 00150 } 00151 /*! 00152 * Returns the number of events out for this node type. 00153 */ 00154 inline unsigned int 00155 wrl::VisibilitySensor::nbEventsOut() const 00156 { 00157 return 3; 00158 } 00159 #endif // XDKWRL_VISIBILITYSENSOR_H 00160 00161 // Local variables section. 00162 // This is only used by emacs! 00163 // Local Variables: 00164 // ff-search-directories: ("../../" "../../../src/xdkwrl/nodes") 00165 // End:
Generated on 24 Feb 2005 with version 1.3.9.1. |