//------------------------------------------------------------
// $Id: Intensity.h,v 1.1.1.1 1999/11/25 06:26:09 yamauchi Exp $
//------------------------------------------------------------
//	intensity.h Processing Element status class
//	1996/8/19
//	Copyright (C) 1996--1998 YAMAUCHI Hitoshi »³Æâ ÀÆ
//------------------------------------------------------------
#ifndef _Intensity_h
#define _Intensity_h 1

#include "mpi2.h"
#include "Vector3.h"

class IntensityClass {
protected:
    int 	mScreenX;
    int 	mScreenY;
    Vector3 	mIntensity;

public:
    static communication_tags_e getTAG(void) { return(TAG_INTENSITY_e);	}

public:
    IntensityClass(void) : mScreenX(-1), mScreenY(-1){}
    IntensityClass(const IntensityClass& rhs)
    {
	this->mScreenX   = rhs.mScreenX;
	this->mScreenY   = rhs.mScreenY;
	this->mIntensity = rhs.mIntensity;
    }
    const IntensityClass &operator=(const IntensityClass& rhs)
    {
	if(this != &rhs)
	{
	    this->mScreenX   = rhs.mScreenX;
	    this->mScreenY   = rhs.mScreenY;
	    this->mIntensity = rhs.mIntensity;
	}
	return(*this);
    }
    IntensityClass(int x, int y, const Vector3& colorRGB)
    {
	this->mScreenX   = x;
	this->mScreenY   = y;
	this->mIntensity = colorRGB;
    }


    void setScreenPos(int x, int y)
    {
	this->mScreenX = x;
	this->mScreenY = y;
    }
    void setIntensityRGB(const Vector3& color)
    {
	this->mIntensity = color;
    }

    int getScreenX(void) const { return(this->mScreenX);	}
    int getScreenY(void) const { return(this->mScreenY);	}
    const Vector3& getIntensityRGB(void) const { return(this->mIntensity); }

    void print(const char *pHead)
    {
	cout << pHead << " Intensity (" << this->mScreenX << ", " << 
	    this->mScreenY << ") = " << this->mIntensity << endl;
    }
};

#endif				// _Intensity_h
