XdkWrl: box.h Source File

Home | Hierarchy | Members | Alphabetical | Related Pages

# box.h

Go to the documentation of this file.

    00001 #ifndef XDKWRL_BOX_H
    00002 #define XDKWRL_BOX_H
    00003
    00004 #include <xdkwrl/node.h>
    00005 #include <xdkwrl/fieldtypes/sfvec3f.h>
    00006
    00007 namespace wrl
    00008 {
    00009   //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    00010   // Interface of Box
    00011   //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    00012   class Box : public Node
    00013   {
    00014    public:
    00015      Box(const char* name="");
    00016      virtual ~Box();
    00017      virtual inline unsigned int nbFields() const;
    00018      virtual FieldHandle field(const std::string& n);
    00019      virtual FieldHandle field(unsigned int i);
    00020      virtual bool isSetToDefaultValue(unsigned int i) const;
    00021      virtual inline unsigned int nbEventsIn() const;
    00022      virtual EventInHandle eventIn(const std::string& n);
    00023      virtual EventInHandle eventIn(unsigned int i);
    00024      virtual inline unsigned int nbEventsOut() const;
    00025      virtual EventOutHandle eventOut(const std::string& n);
    00026      virtual EventOutHandle eventOut(unsigned int i);
    00027      inline const char* typeName() const;
    00028      virtual Node* duplicate() const;
    00029      virtual Node* duplicate(std::map<const Node*,Node*>&) const;
    00030      /*!@name Exposed Fields
    00031       * A field that is capable of receiving events via an eventIn to
    00032       * change its value(s), and generating events via an eventOut
    00033       * when its value(s) change.
    00034       */
    00035       //!@{
    00036      //!@}
    00037      /*!@name Fields
    00038       * A property or attribute of a node. Each node type has a fixed set
    00039       * of fields. Fields may contain various kinds of data and one or many
    00040       * values. Each field has a default value.
    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        size.setXYZ(2,2,2);
    00049         \endcode
    00050        */
    00051        SFVec3f    size;
    00052      //!@}
    00053      /*!@name Events In
    00054       *
    00055       */
    00056       //!@{
    00057   //!@}
    00058      /*!@name Events Out
    00059       *
    00060       */
    00061       //!@{
    00062   //!@}
    00063   };
    00064 };
    00065 //************************************************************
    00066 // Implementation of Box
    00067 //************************************************************
    00068 /*!
    00069  * Returns <code>"Box"</code>. Useful for printing.
    00070  */
    00071 inline const char*
    00072 wrl::Box::typeName() const
    00073 {
    00074   return "Box";
    00075 }
    00076 /*!
    00077  * Returns the number of fields (exposed or not) for this node type.
    00078  */
    00079 inline unsigned int
    00080 wrl::Box::nbFields() const
    00081 {
    00082    return 1;
    00083 }
    00084 /*!
    00085  * Returns the number of events in for this node type.
    00086  */
    00087 inline unsigned int
    00088 wrl::Box::nbEventsIn() const
    00089 {
    00090    return 0;
    00091 }
    00092 /*!
    00093  * Returns the number of events out for this node type.
    00094  */
    00095 inline unsigned int
    00096 wrl::Box::nbEventsOut() const
    00097 {
    00098    return 0;
    00099 }
    00100 #endif // XDKWRL_BOX_H
    00101
    00102 // Local variables section.
    00103 // This is only used by emacs!
    00104 // Local Variables:
    00105 // ff-search-directories: ("../../" "../../../src/xdkwrl/nodes")
    00106 // End:

Generated on 28 Jun 2006 with version 1.4.4. |