Home | Hierarchy | Members | Alphabetical | Related Pages |
00001 #ifndef XDKWRL_GEOVIEWPOINT_H 00002 #define XDKWRL_GEOVIEWPOINT_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/sffloat.h> 00009 #include <xdkwrl/fieldtypes/sfnode.h> 00010 #include <xdkwrl/fieldtypes/sfrotation.h> 00011 #include <xdkwrl/fieldtypes/sfstring.h> 00012 #include <xdkwrl/fieldtypes/sftime.h> 00013 00014 namespace wrl 00015 { 00016 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00017 // Interface of GeoViewpoint 00018 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00019 class XDKWRL_EXPORT GeoViewpoint : public Node 00020 { 00021 public: 00022 GeoViewpoint(const char* name=""); 00023 virtual ~GeoViewpoint(); 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 fieldOfView = 0.785398f; 00049 \endcode 00050 */ 00051 SFFloat fieldOfView; 00052 /*! 00053 * See <a href="#_details" class="md">Detailed Description</a> 00054 * for meaning of this field. 00055 * Default value is set to 00056 \code 00057 headlight = true; 00058 \endcode 00059 */ 00060 SFBool headlight; 00061 /*! 00062 * See <a href="#_details" class="md">Detailed Description</a> 00063 * for meaning of this field. 00064 * Default value is set to 00065 \code 00066 jump = true; 00067 \endcode 00068 */ 00069 SFBool jump; 00070 /*! 00071 * See <a href="#_details" class="md">Detailed Description</a> 00072 * for meaning of this field. 00073 * Default value is set to 00074 \code 00075 00076 \endcode 00077 */ 00078 MFString navType; 00079 //!@} 00080 /*!@name Fields 00081 * A property or attribute of a node. Each node type has a fixed set 00082 * of fields. Fields may contain various kinds of data and one or many 00083 * values. Each field has a default value. 00084 */ 00085 //!@{ 00086 /*! 00087 * See <a href="#_details" class="md">Detailed Description</a> 00088 * for meaning of this field. 00089 * Default value is set to 00090 \code 00091 description = string(""); 00092 \endcode 00093 */ 00094 SFString description; 00095 /*! 00096 * See <a href="#_details" class="md">Detailed Description</a> 00097 * for meaning of this field. 00098 * Default value is set to SFNode default value 00099 */ 00100 SFNode geoOrigin; 00101 /*! 00102 * See <a href="#_details" class="md">Detailed Description</a> 00103 * for meaning of this field. 00104 * Default value is set to 00105 \code 00106 00107 \endcode 00108 */ 00109 MFString geoSystem; 00110 /*! 00111 * See <a href="#_details" class="md">Detailed Description</a> 00112 * for meaning of this field. 00113 * Default value is set to 00114 \code 00115 orientation.setAxisAndAngle(0,0,1,0); 00116 \endcode 00117 */ 00118 SFRotation orientation; 00119 /*! 00120 * See <a href="#_details" class="md">Detailed Description</a> 00121 * for meaning of this field. 00122 * Default value is set to 00123 \code 00124 position = string("0 0 100000"); 00125 \endcode 00126 */ 00127 SFString position; 00128 /*! 00129 * See <a href="#_details" class="md">Detailed Description</a> 00130 * for meaning of this field. 00131 * Default value is set to 00132 \code 00133 speedFactor = 1.0f; 00134 \endcode 00135 */ 00136 SFFloat speedFactor; 00137 //!@} 00138 /*!@name Events In 00139 * 00140 */ 00141 //!@{ 00142 /*! 00143 * See <a href="#_details" class="md">Detailed Description</a> 00144 * for meaning of this event. 00145 */ 00146 EventIn<SFBool> set_bind; 00147 /*! 00148 * See <a href="#_details" class="md">Detailed Description</a> 00149 * for meaning of this event. 00150 */ 00151 EventIn<SFString> set_orientation; 00152 /*! 00153 * See <a href="#_details" class="md">Detailed Description</a> 00154 * for meaning of this event. 00155 */ 00156 EventIn<SFString> set_position; 00157 /*! 00158 * Set event associated to exposedField fieldOfView 00159 */ 00160 EventIn<SFFloat> set_fieldOfView; 00161 /*! 00162 * Set event associated to exposedField headlight 00163 */ 00164 EventIn<SFBool> set_headlight; 00165 /*! 00166 * Set event associated to exposedField jump 00167 */ 00168 EventIn<SFBool> set_jump; 00169 /*! 00170 * Set event associated to exposedField navType 00171 */ 00172 EventIn<MFString> set_navType; 00173 //!@} 00174 /*!@name Events Out 00175 * 00176 */ 00177 //!@{ 00178 /*! 00179 * See <a href="#_details" class="md">Detailed Description</a> 00180 * for meaning of this event. 00181 */ 00182 EventOut<SFTime> bindTime; 00183 /*! 00184 * See <a href="#_details" class="md">Detailed Description</a> 00185 * for meaning of this event. 00186 */ 00187 EventOut<SFBool> isBound; 00188 /*! 00189 * Changed event associated to exposedField fieldOfView 00190 */ 00191 EventOut<SFFloat> fieldOfView_changed; 00192 /*! 00193 * Changed event associated to exposedField headlight 00194 */ 00195 EventOut<SFBool> headlight_changed; 00196 /*! 00197 * Changed event associated to exposedField jump 00198 */ 00199 EventOut<SFBool> jump_changed; 00200 /*! 00201 * Changed event associated to exposedField navType 00202 */ 00203 EventOut<MFString> navType_changed; 00204 //!@} 00205 }; 00206 }; 00207 //************************************************************ 00208 // Implementation of GeoViewpoint 00209 //************************************************************ 00210 /*! 00211 * Returns <code>"GeoViewpoint"</code>. Useful for printing. 00212 */ 00213 inline const char* 00214 wrl::GeoViewpoint::typeName() const 00215 { 00216 return "GeoViewpoint"; 00217 } 00218 /*! 00219 * Returns the number of fields (exposed or not) for this node type. 00220 */ 00221 inline unsigned int 00222 wrl::GeoViewpoint::nbFields() const 00223 { 00224 return 10; 00225 } 00226 /*! 00227 * Returns the number of events in for this node type. 00228 */ 00229 inline unsigned int 00230 wrl::GeoViewpoint::nbEventsIn() const 00231 { 00232 return 3; 00233 } 00234 /*! 00235 * Returns the number of events out for this node type. 00236 */ 00237 inline unsigned int 00238 wrl::GeoViewpoint::nbEventsOut() const 00239 { 00240 return 2; 00241 } 00242 #endif // XDKWRL_GEOVIEWPOINT_H 00243 00244 // Local variables section. 00245 // This is only used by emacs! 00246 // Local Variables: 00247 // ff-search-directories: ("../../" "../../../src/xdkwrl/nodes") 00248 // End:
Generated on 5 Jan 2007 with
![]() |
|