Home | Hierarchy | Members | Alphabetical | Related Pages |
00001 #ifndef XDKWRL_TRANSFORM_H 00002 #define XDKWRL_TRANSFORM_H 00003 00004 #include <xdkwrl/node.h> 00005 #include <xdkwrl/fieldtypes/mfnode.h> 00006 #include <xdkwrl/fieldtypes/sfrotation.h> 00007 #include <xdkwrl/fieldtypes/sfvec3f.h> 00008 00009 namespace wrl 00010 { 00011 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00012 // Interface of Transform 00013 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00014 class Transform : public Node 00015 { 00016 public: 00017 Transform(const char* name=""); 00018 virtual ~Transform(); 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 MFNode default value 00051 */ 00052 MFNode children; 00053 /*! 00054 * See <a href="#_details" class="md">Detailed Description</a> 00055 * for meaning of this field. 00056 * Default value is set to 00057 \code 00058 rotation.setAxisAndAngle(0,0,1,0); 00059 \endcode 00060 */ 00061 SFRotation rotation; 00062 /*! 00063 * See <a href="#_details" class="md">Detailed Description</a> 00064 * for meaning of this field. 00065 * Default value is set to 00066 \code 00067 scale.setXYZ(1,1,1); 00068 \endcode 00069 */ 00070 SFVec3f scale; 00071 /*! 00072 * See <a href="#_details" class="md">Detailed Description</a> 00073 * for meaning of this field. 00074 * Default value is set to 00075 \code 00076 scaleOrientation.setAxisAndAngle(0,0,1,0); 00077 \endcode 00078 */ 00079 SFRotation scaleOrientation; 00080 /*! 00081 * See <a href="#_details" class="md">Detailed Description</a> 00082 * for meaning of this field. 00083 * Default value is set to 00084 \code 00085 translation.setXYZ(0,0,0); 00086 \endcode 00087 */ 00088 SFVec3f translation; 00089 //!@} 00090 /*!@name Fields 00091 * A property or attribute of a node. Each node type has a fixed set 00092 * of fields. Fields may contain various kinds of data and one or many 00093 * values. Each field has a default value. 00094 */ 00095 //!@{ 00096 /*! 00097 * See <a href="#_details" class="md">Detailed Description</a> 00098 * for meaning of this field. 00099 * Default value is set to 00100 \code 00101 bboxCenter.setXYZ(0,0,0); 00102 \endcode 00103 */ 00104 SFVec3f bboxCenter; 00105 /*! 00106 * See <a href="#_details" class="md">Detailed Description</a> 00107 * for meaning of this field. 00108 * Default value is set to 00109 \code 00110 bboxSize.setXYZ(-1,-1,-1); 00111 \endcode 00112 */ 00113 SFVec3f bboxSize; 00114 //!@} 00115 /*!@name Events In 00116 * 00117 */ 00118 //!@{ 00119 /*! 00120 * See <a href="#_details" class="md">Detailed Description</a> 00121 * for meaning of this event. 00122 */ 00123 EventIn<MFNode> addChildren; 00124 /*! 00125 * See <a href="#_details" class="md">Detailed Description</a> 00126 * for meaning of this event. 00127 */ 00128 EventIn<MFNode> removeChildren; 00129 /*! 00130 * Set event associated to exposedField center 00131 */ 00132 EventIn<SFVec3f> set_center; 00133 /*! 00134 * Set event associated to exposedField children 00135 */ 00136 EventIn<MFNode> set_children; 00137 /*! 00138 * Set event associated to exposedField rotation 00139 */ 00140 EventIn<SFRotation> set_rotation; 00141 /*! 00142 * Set event associated to exposedField scale 00143 */ 00144 EventIn<SFVec3f> set_scale; 00145 /*! 00146 * Set event associated to exposedField scaleOrientation 00147 */ 00148 EventIn<SFRotation> set_scaleOrientation; 00149 /*! 00150 * Set event associated to exposedField translation 00151 */ 00152 EventIn<SFVec3f> set_translation; 00153 //!@} 00154 /*!@name Events Out 00155 * 00156 */ 00157 //!@{ 00158 /*! 00159 * Changed event associated to exposedField center 00160 */ 00161 EventOut<SFVec3f> center_changed; 00162 /*! 00163 * Changed event associated to exposedField children 00164 */ 00165 EventOut<MFNode> children_changed; 00166 /*! 00167 * Changed event associated to exposedField rotation 00168 */ 00169 EventOut<SFRotation> rotation_changed; 00170 /*! 00171 * Changed event associated to exposedField scale 00172 */ 00173 EventOut<SFVec3f> scale_changed; 00174 /*! 00175 * Changed event associated to exposedField scaleOrientation 00176 */ 00177 EventOut<SFRotation> scaleOrientation_changed; 00178 /*! 00179 * Changed event associated to exposedField translation 00180 */ 00181 EventOut<SFVec3f> translation_changed; 00182 //!@} 00183 }; 00184 }; 00185 //************************************************************ 00186 // Implementation of Transform 00187 //************************************************************ 00188 /*! 00189 * Returns <code>"Transform"</code>. Useful for printing. 00190 */ 00191 inline const char* 00192 wrl::Transform::typeName() const 00193 { 00194 return "Transform"; 00195 } 00196 /*! 00197 * Returns the number of fields (exposed or not) for this node type. 00198 */ 00199 inline unsigned int 00200 wrl::Transform::nbFields() const 00201 { 00202 return 8; 00203 } 00204 /*! 00205 * Returns the number of events in for this node type. 00206 */ 00207 inline unsigned int 00208 wrl::Transform::nbEventsIn() const 00209 { 00210 return 2; 00211 } 00212 /*! 00213 * Returns the number of events out for this node type. 00214 */ 00215 inline unsigned int 00216 wrl::Transform::nbEventsOut() const 00217 { 00218 return 0; 00219 } 00220 #endif // XDKWRL_TRANSFORM_H 00221 00222 // Local variables section. 00223 // This is only used by emacs! 00224 // Local Variables: 00225 // ff-search-directories: ("../../" "../../../src/xdkwrl/nodes") 00226 // End:
Generated on 24 Feb 2005 with
![]() |
|