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