XdkWrl: indexedlineset.h Source File

Home | Hierarchy | Members | Alphabetical | Related Pages

# indexedlineset.h

Go to the documentation of this file.

    00001 #ifndef XDKWRL_INDEXEDLINESET_H
    00002 #define XDKWRL_INDEXEDLINESET_H
    00003
    00004 #include <xdkwrl/config.h>
    00005 #include <xdkwrl/node.h>
    00006 #include <xdkwrl/fieldtypes/mfint32.h>
    00007 #include <xdkwrl/fieldtypes/sfbool.h>
    00008 #include <xdkwrl/fieldtypes/sfnode.h>
    00009
    00010 namespace wrl
    00011 {
    00012   //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    00013   // Interface of IndexedLineSet
    00014   //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    00015   class XDKWRL_EXPORT IndexedLineSet : public Node
    00016   {
    00017    public:
    00018      IndexedLineSet(const char* name="");
    00019      virtual ~IndexedLineSet();
    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 SFNode default value
    00043        */
    00044        SFNode     color;
    00045       /*!
    00046        * See <a href="#_details" class="md">Detailed Description</a>
    00047        * for meaning of this field.
    00048        * Default value is set to SFNode default value
    00049        */
    00050        SFNode     coord;
    00051      //!@}
    00052      /*!@name Fields
    00053       * A property or attribute of a node. Each node type has a fixed set
    00054       * of fields. Fields may contain various kinds of data and one or many
    00055       * values. Each field has a default value.
    00056       */
    00057       //!@{
    00058       /*!
    00059        * See <a href="#_details" class="md">Detailed Description</a>
    00060        * for meaning of this field.
    00061        * Default value is set to MFInt32 default value
    00062        */
    00063        MFInt32    colorIndex;
    00064       /*!
    00065        * See <a href="#_details" class="md">Detailed Description</a>
    00066        * for meaning of this field.
    00067        * Default value is set to
    00068        \code
    00069        colorPerVertex = true;
    00070         \endcode
    00071        */
    00072        SFBool     colorPerVertex;
    00073       /*!
    00074        * See <a href="#_details" class="md">Detailed Description</a>
    00075        * for meaning of this field.
    00076        * Default value is set to MFInt32 default value
    00077        */
    00078        MFInt32    coordIndex;
    00079      //!@}
    00080      /*!@name Events In
    00081       *
    00082       */
    00083       //!@{
    00084       /*!
    00085        * See <a href="#_details" class="md">Detailed Description</a>
    00086        * for meaning of this event.
    00087        */
    00088        EventIn<MFInt32>    set_colorIndex;
    00089       /*!
    00090        * See <a href="#_details" class="md">Detailed Description</a>
    00091        * for meaning of this event.
    00092        */
    00093        EventIn<MFInt32>    set_coordIndex;
    00094       /*!
    00095        * Set event associated to exposedField color
    00096        */
    00097        EventIn<SFNode>     set_color;
    00098       /*!
    00099        * Set event associated to exposedField coord
    00100        */
    00101        EventIn<SFNode>     set_coord;
    00102   //!@}
    00103      /*!@name Events Out
    00104       *
    00105       */
    00106       //!@{
    00107       /*!
    00108        * Changed event associated to exposedField color
    00109        */
    00110        EventOut<SFNode>     color_changed;
    00111       /*!
    00112        * Changed event associated to exposedField coord
    00113        */
    00114        EventOut<SFNode>     coord_changed;
    00115   //!@}
    00116   };
    00117 };
    00118 //************************************************************
    00119 // Implementation of IndexedLineSet
    00120 //************************************************************
    00121 /*!
    00122  * Returns <code>"IndexedLineSet"</code>. Useful for printing.
    00123  */
    00124 inline const char*
    00125 wrl::IndexedLineSet::typeName() const
    00126 {
    00127   return "IndexedLineSet";
    00128 }
    00129 /*!
    00130  * Returns the number of fields (exposed or not) for this node type.
    00131  */
    00132 inline unsigned int
    00133 wrl::IndexedLineSet::nbFields() const
    00134 {
    00135    return 5;
    00136 }
    00137 /*!
    00138  * Returns the number of events in for this node type.
    00139  */
    00140 inline unsigned int
    00141 wrl::IndexedLineSet::nbEventsIn() const
    00142 {
    00143    return 2;
    00144 }
    00145 /*!
    00146  * Returns the number of events out for this node type.
    00147  */
    00148 inline unsigned int
    00149 wrl::IndexedLineSet::nbEventsOut() const
    00150 {
    00151    return 0;
    00152 }
    00153 #endif // XDKWRL_INDEXEDLINESET_H
    00154
    00155 // Local variables section.
    00156 // This is only used by emacs!
    00157 // Local Variables:
    00158 // ff-search-directories: ("../../" "../../../src/xdkwrl/nodes")
    00159 // End:

Generated on 5 Jan 2007 with version 1.5.1. |