// PhBPixelTexture.H: PhBPixelTexture nodes.

// This file has been generated using nodegen 0.5a.
// 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 _PhBPixelTexture_H_
#define _PhBPixelTexture_H_

#include "xrml.H"
#include "PhBImageTextureBase.H"

// utility includes
// end of utility includes

namespace xrml {
#define PhBPixelTextureTypeId 	"PhBPixelTexture"
extern bool IsPhBPixelTexture(SFNode*);

class PhBPixelTexture: public virtual SFNode, public PhBImageTextureBase {
private:
  //
  void clone_here(const PhBPixelTexture&);
  void destruct(void);
  
  // field/eventOut update status bits
  // Use xxx_is_updated() and xxx_clear_update() to inspect/reset.
  enum status_bits {
    channels_updated = 0x1,
    width_updated = 0x2,
    height_updated = 0x4,
    pixels_updated = 0x8,
    clamping_updated = 0x10,
    repeating_updated = 0x20 
  };
  
public:
  //
  int major_version(void), minor_version(void);
  bool is_leaf_class(void);
  
  PhBPixelTexture();
  PhBPixelTexture(const PhBPixelTexture&);
  PhBPixelTexture& operator=(const PhBPixelTexture&);
  virtual ~PhBPixelTexture();
  
  //
  SFNode*          	instantiate(Proto * =0);
  void             	render(void);
  
  // state values:
  // Do not assign directly unless you know very well what you are doing.
  SFInt32          	channels;
  SFInt32          	width;
  SFInt32          	height;
  MFFloat          	pixels;
  //  SFBool           	clamping;
  //  SFBool           	repeating;
  
  // set_<exposedField> eventIns: with forwarding and eventOut generation
  void             	set_clamping(const SFBool&);
  void             	set_repeating(const SFBool&);
  
  // field assignement: no forwarding or eventOut generation!
  bool             	assign_channels(const SFInt32&);
  bool             	assign_width(const SFInt32&);
  bool             	assign_height(const SFInt32&);
  bool             	assign_pixels(const MFFloat&);
  bool             	assign_clamping(const SFBool&);
  bool             	assign_repeating(const SFBool&);
  
  // update status
  inline bool      	channels_is_updated(void) { return (status & channels_updated); }
  inline void      	channels_clear_update(void) { status &= ~channels_updated; }
  inline bool      	width_is_updated(void) { return (status & width_updated); }
  inline void      	width_clear_update(void) { status &= ~width_updated; }
  inline bool      	height_is_updated(void) { return (status & height_updated); }
  inline void      	height_clear_update(void) { status &= ~height_updated; }
  inline bool      	pixels_is_updated(void) { return (status & pixels_updated); }
  inline void      	pixels_clear_update(void) { status &= ~pixels_updated; }
  inline bool      	clamping_is_updated(void) { return (status & clamping_updated); }
  inline void      	clamping_clear_update(void) { status &= ~clamping_updated; }
  inline bool      	repeating_is_updated(void) { return (status & repeating_updated); }
  inline void      	repeating_clear_update(void) { status &= ~repeating_updated; }
  
  // utility members
  void load(void);
  
protected:
  inline void util_init(void) { }
  inline void util_clone(const PhBPixelTexture& src) { }
  void util_destruct(void);
};

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