// ImageTexture.H: ImageTexture nodes.

// This file has been generated using nodegen 0.51.
// Restrict manual editing to the sections delimited by
// . the comments "utility includes" and "end of utility includes"
// . the comments "utility members" and "end of utility members"

#ifndef _ImageTexture_H_
#define _ImageTexture_H_

#include "xrml.H"
#include "Texture.H"

// utility includes
// end of utility includes

namespace xrml {
#define ImageTextureTypeId 	"ImageTexture"
extern bool IsImageTexture(SFNode*);

class ImageTexture: public virtual SFNode, public Texture {
private:
  //
  void clone_here(const ImageTexture&);
  void destruct(void);
  
  // field/eventOut update status bits
  // Use xxx_is_updated() and xxx_clear_update() to inspect/reset.
  enum status_bits {
    url_updated = 0x1,
    repeatS_updated = 0x2,
    repeatT_updated = 0x4 
  };
  
public:
  //
  int major_version(void), minor_version(void);
  bool is_leaf_class(void);
  
  ImageTexture();
  ImageTexture(const ImageTexture&);
  ImageTexture& operator=(const ImageTexture&);
  virtual ~ImageTexture();
  
  //
  SFNode*          	instantiate(Proto * =0);
  void             	render(void);
  
  // state values:
  // Do not assign directly unless you know very well what you are doing.
  MFString         	url;
  //  SFBool           	repeatS;
  //  SFBool           	repeatT;
  
  // set_<exposedField> eventIns: with forwarding and eventOut generation
  void             	set_url(const MFString&);
  
  // field assignement: no forwarding or eventOut generation!
  bool             	assign_url(const MFString&);
  bool             	assign_repeatS(const SFBool&);
  bool             	assign_repeatT(const SFBool&);
  
  // update status
  inline bool      	url_is_updated(void) { return (status & url_updated); }
  inline void      	url_clear_update(void) { status &= ~url_updated; }
  inline bool      	repeatS_is_updated(void) { return (status & repeatS_updated); }
  inline void      	repeatS_clear_update(void) { status &= ~repeatS_updated; }
  inline bool      	repeatT_is_updated(void) { return (status & repeatT_updated); }
  inline void      	repeatT_clear_update(void) { status &= ~repeatT_updated; }
  
  // utility members
  void		begin_render(void);
  void		end_render(void);

  void load(void);
  
protected:
  bool cantload;

  inline void util_init(void) { cantload = false; }
  inline void util_clone(const ImageTexture& src) { cantload = false; }
  inline void util_destruct(void) { }
};

// end of utility members
} // namespace xrml
#endif /*_ImageTexture_H_*/
