#pragma once

#include "WO.h"
#include "AftrOpenGLIncludes.h"

namespace Aftr
{
class WOPointCloud : public WO
{
public:
   static WOPointCloud* New( Camera** cam, bool useColors = false, bool useNormals = false, bool useTexCoords = false );
   static WOPointCloud* New( std::function< Camera const& () > getCamFunc, bool useColors = false, bool useNormals = false, bool useTexCoords = false );
   virtual ~WOPointCloud();   
   void setPoints( const std::vector<Vector>& pts, const aftrColor4ub& color = aftrColor4ub( 0, 255, 255, 255 ) );
   void setPoints( const std::vector<Vector>& pts, const std::vector<aftrColor4ub>& colors );
   int getNumPoints() const noexcept;
   const std::vector<Vector>& getPoints() const noexcept;
   void setSizeOfEachPoint( float x, float y );
   void setColors( const std::vector<aftrColor4ub>& colors );
   void setColorOfEachPoint( const aftrColor4ub& color );
protected:
   WOPointCloud();
   virtual void onCreate( Camera** cam, bool useColors, bool useNormals, bool useTexCoords );
   virtual void onCreate( std::function< Camera const& () > getCamFunc, bool useColors, bool useNormals, bool useTexCoords );
};

}
