/** SGX

The   sss    gggg x   x   
     s      g      x x    Engine
      sss   g  gg   x
         s  g   g  x x          Copyright 1995-2008.
     ssss    gggg x   x         Steven Goodwin. All Rights Reserved.
    
This version has been released under the GNU Public License v2.0.

Please see the license files for details.

File: include/sgx/graphics/alphasorter.hpp

*/

#ifndef SGX_GRAPHICS_ALPHASORTER_HPP
#define SGX_GRAPHICS_ALPHASORTER_HPP	1


class CSGXAlphaSortData {
public:
	virtual void	draw() const { }
	virtual tREAL32	getDepth(const sgxVector3 &from) const { SGX_UNUSED(from); return 0; }
};


class CSGXAlphaSortValue : public CSGXAlphaSortData {
public:
	sgxColorRGBA	color;
	sgxMatrix43		transform;

	virtual tREAL32	getDepth(const sgxVector3 &from) const;
};

class CSGXAlphaSortPolygon : public CSGXAlphaSortValue {
public:
	sgxGfxPolygon				poly;
	virtual void	draw() const;
};

class CSGXAlphaSortSphere : public CSGXAlphaSortValue {
public:
	sgxGfxSphere	sphere;
	virtual void	draw() const;
};

class CSGXAlphaSortCuboid : public CSGXAlphaSortValue {
public:
	sgxGfxCuboid	cuboid;
	virtual void	draw() const;
};


// Any class derived from this must not be > 4 bytes
// since it fits inside the alpha sort structure
class CSGXAlphaSortReference : public CSGXAlphaSortData {

};

class CSGXAlphaSortPolygonReference : public CSGXAlphaSortData {
public:
//	sgxGfxPolygon		*pPoly;
};



#endif /* SGX_GRAPHICS_ALPHASORTER_HPP */
