XdkWrl: texturetransform.h Source File

Home | Hierarchy | Members | Alphabetical | Related Pages

# texturetransform.h

Go to the documentation of this file.

    00001 #ifndef XDKWRL_TEXTURETRANSFORM_H
    00002 #define XDKWRL_TEXTURETRANSFORM_H
    00003
    00004 #include <xdkwrl/config.h>
    00005 #include <xdkwrl/node.h>
    00006 #include <xdkwrl/fieldtypes/sffloat.h>
    00007 #include <xdkwrl/fieldtypes/sfvec2f.h>
    00008
    00009 namespace wrl
    00010 {
    00011   //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    00012   // Interface of TextureTransform
    00013   //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    00014   class XDKWRL_EXPORT TextureTransform : public Node
    00015   {
    00016    public:
    00017      TextureTransform(const char* name="");
    00018      virtual ~TextureTransform();
    00019      virtual inline unsigned int nbFields() const;
    00020      virtual FieldHandle field(const std::string& n);
    00021      virtual FieldHandle field(unsigned int i);
    00022      virtual bool isSetToDefaultValue(unsigned int i) const;
    00023      virtual inline unsigned int nbEventsIn() const;
    00024      virtual EventInHandle eventIn(const std::string& n);
    00025      virtual EventInHandle eventIn(unsigned int i);
    00026      virtual inline unsigned int nbEventsOut() const;
    00027      virtual EventOutHandle eventOut(const std::string& n);
    00028      virtual EventOutHandle eventOut(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.setXY(0,0);
    00044        \endcode
    00045        */
    00046        SFVec2f    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        rotation = 0.0f;
    00053        \endcode
    00054        */
    00055        SFFloat    rotation;
    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        scale.setXY(1,1);
    00062        \endcode
    00063        */
    00064        SFVec2f    scale;
    00065       /*!
    00066        * See <a href="#_details" class="md">Detailed Description</a>
    00067        * for meaning of this field.
    00068        * Default value is set to
    00069        \code
    00070        translation.setXY(0,0);
    00071        \endcode
    00072        */
    00073        SFVec2f    translation;
    00074      //!@}
    00075      /*!@name Fields
    00076       * A property or attribute of a node. Each node type has a fixed set
    00077       * of fields. Fields may contain various kinds of data and one or many
    00078       * values. Each field has a default value.
    00079       */
    00080       //!@{
    00081      //!@}
    00082      /*!@name Events In
    00083       *
    00084       */
    00085       //!@{
    00086       /*!
    00087        * Set event associated to exposedField center
    00088        */
    00089        EventIn<SFVec2f>    set_center;
    00090       /*!
    00091        * Set event associated to exposedField rotation
    00092        */
    00093        EventIn<SFFloat>    set_rotation;
    00094       /*!
    00095        * Set event associated to exposedField scale
    00096        */
    00097        EventIn<SFVec2f>    set_scale;
    00098       /*!
    00099        * Set event associated to exposedField translation
    00100        */
    00101        EventIn<SFVec2f>    set_translation;
    00102   //!@}
    00103      /*!@name Events Out
    00104       *
    00105       */
    00106       //!@{
    00107       /*!
    00108        * Changed event associated to exposedField center
    00109        */
    00110        EventOut<SFVec2f>    center_changed;
    00111       /*!
    00112        * Changed event associated to exposedField rotation
    00113        */
    00114        EventOut<SFFloat>    rotation_changed;
    00115       /*!
    00116        * Changed event associated to exposedField scale
    00117        */
    00118        EventOut<SFVec2f>    scale_changed;
    00119       /*!
    00120        * Changed event associated to exposedField translation
    00121        */
    00122        EventOut<SFVec2f>    translation_changed;
    00123   //!@}
    00124   };
    00125 };
    00126 //************************************************************
    00127 // Implementation of TextureTransform
    00128 //************************************************************
    00129 /*!
    00130  * Returns <code>"TextureTransform"</code>. Useful for printing.
    00131  */
    00132 inline const char*
    00133 wrl::TextureTransform::typeName() const
    00134 {
    00135   return "TextureTransform";
    00136 }
    00137 /*!
    00138  * Returns the number of fields (exposed or not) for this node type.
    00139  */
    00140 inline unsigned int
    00141 wrl::TextureTransform::nbFields() const
    00142 {
    00143    return 4;
    00144 }
    00145 /*!
    00146  * Returns the number of events in for this node type.
    00147  */
    00148 inline unsigned int
    00149 wrl::TextureTransform::nbEventsIn() const
    00150 {
    00151    return 0;
    00152 }
    00153 /*!
    00154  * Returns the number of events out for this node type.
    00155  */
    00156 inline unsigned int
    00157 wrl::TextureTransform::nbEventsOut() const
    00158 {
    00159    return 0;
    00160 }
    00161 #endif // XDKWRL_TEXTURETRANSFORM_H
    00162
    00163 // Local variables section.
    00164 // This is only used by emacs!
    00165 // Local Variables:
    00166 // ff-search-directories: ("../../" "../../../src/xdkwrl/nodes")
    00167 // End:

Generated on 5 Jan 2007 with version 1.5.1. |