/*-----------------------------------------------------------------
LOG
    GEM - Graphics Environment for Multimedia

    A pix_coordinate

    Copyright (c) 1997-1998 Mark Danks
    For information on usage and redistribution, and for a DISCLAIMER OF ALL
    WARRANTIES, see the file, "GEM.LICENSE.TERMS" in this distribution.

-----------------------------------------------------------------*/

#ifndef INCLUDE_PIX_COORDINATE_H_
#define INCLUDE_PIX_COORDINATE_H_

#include "Base/GemBase.h"

class TexCoord;

/*-----------------------------------------------------------------
-------------------------------------------------------------------
CLASS
    pix_coordinate
    
    sets the texture coordinates

KEYWORDS
    pix
    
DESCRIPTION

    Inlet for a list - "coords"
    "coords" - The texture coordinate list

-----------------------------------------------------------------*/
class GEM_EXTERN pix_coordinate : public GemBase
{
    CPPEXTERN_HEADER(pix_coordinate, GemBase)

    public:

	    //////////
	    // Constructor
    	pix_coordinate();
    	
    protected:
    	
    	//////////
    	// Destructor
    	virtual ~pix_coordinate();

    	//////////
    	// Do the rendering
    	virtual void 	render(GemState *state);

    	//////////
    	// Turn back off texture mapping
    	virtual void 	postrender(GemState *state);

    	//////////
    	// The texture coordinates
    	TexCoord    	*m_coords;
    	
    	//////////
    	// The number
    	int 	    	m_numCoords;

    	//////////
    	// Set the texture coordinates
    	void	    	coordsMess(int argc, t_atom *argv);
    	
    private:
    
    	//////////
    	// Static member functions
    	static void 	coordsMessCallback(void *data, t_symbol *, int argc, t_atom *argv);
};

#endif	// for header file
