#ifndef _BASE_CIRCLE_HPP_
#define _BASE_CIRCLE_HPP_

// ------------------------------------------------------------------------------------------------
#include "SqBase.hpp"
#include "Base/Vector2.hpp"

// ------------------------------------------------------------------------------------------------
namespace SqMod {

/* ------------------------------------------------------------------------------------------------
 *
*/
struct Circle
{
    /* --------------------------------------------------------------------------------------------
     * ...
    */
    typedef float Value;

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    static const Circle NIL;
    static const Circle MIN;
    static const Circle MAX;

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    static SQChar Delim;

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    Vector2     pos;
    Value       rad;

    /* --------------------------------------------------------------------------------------------
     *
    */
    Circle();

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    Circle(Value rv);

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    Circle(const Vector2 & pv, Value rv);

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    Circle(Value xv, Value yv, Value rv);

    /* --------------------------------------------------------------------------------------------
     *
    */
    Circle(const Circle & o);

    /* --------------------------------------------------------------------------------------------
     *
    */
    ~Circle();

    /* --------------------------------------------------------------------------------------------
     *
    */
    Circle & operator = (const Circle & o);

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    Circle & operator = (Value r);

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    Circle & operator = (const Vector2 & p);

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    Circle & operator += (const Circle & c);

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    Circle & operator -= (const Circle & c);

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    Circle & operator *= (const Circle & c);

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    Circle & operator /= (const Circle & c);

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    Circle & operator %= (const Circle & c);

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    Circle & operator += (Value r);

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    Circle & operator -= (Value r);

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    Circle & operator *= (Value r);

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    Circle & operator /= (Value r);

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    Circle & operator %= (Value r);

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    Circle & operator += (const Vector2 & p);

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    Circle & operator -= (const Vector2 & p);

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    Circle & operator *= (const Vector2 & p);

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    Circle & operator /= (const Vector2 & p);

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    Circle & operator %= (const Vector2 & p);

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    Circle & operator ++ ();

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    Circle & operator -- ();

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    Circle operator ++ (int);

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    Circle operator -- (int);

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    Circle operator + (const Circle & c) const;

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    Circle operator - (const Circle & c) const;

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    Circle operator * (const Circle & c) const;

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    Circle operator / (const Circle & c) const;

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    Circle operator % (const Circle & c) const;

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    Circle operator + (Value r) const;

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    Circle operator - (Value r) const;

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    Circle operator * (Value r) const;

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    Circle operator / (Value r) const;

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    Circle operator % (Value r) const;

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    Circle operator + (const Vector2 & p) const;

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    Circle operator - (const Vector2 & p) const;

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    Circle operator * (const Vector2 & p) const;

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    Circle operator / (const Vector2 & p) const;

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    Circle operator % (const Vector2 & p) const;

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    Circle operator + () const;

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    Circle operator - () const;

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    bool operator == (const Circle & c) const;

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    bool operator != (const Circle & c) const;

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    bool operator < (const Circle & c) const;

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    bool operator > (const Circle & c) const;

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    bool operator <= (const Circle & c) const;

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    bool operator >= (const Circle & c) const;

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    Int32 Cmp(const Circle & c) const;

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    CSStr ToString() const;

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    void Set(Value nr);

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    void Set(const Circle & nc);

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    void Set(const Vector2 & np);

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    void Set(const Vector2 & np, Value nr);

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    void Set(Value nx, Value ny);

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    void Set(Value nx, Value ny, Value nr);

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    void Set(CSStr values, SQChar delim);

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    void Generate();

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    void Generate(Value min, Value max, bool r);

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    void Generate(Value xmin, Value xmax, Value ymin, Value ymax);

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    void Generate(Value xmin, Value xmax, Value ymin, Value ymax, Value rmin, Value rmax);

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    void Clear()
    {
        pos.Clear(); rad = 0.0;
    }

    /* --------------------------------------------------------------------------------------------
     * ...
    */
    Circle Abs() const;
};

} // Namespace:: SqMod

#endif // _BASE_CIRCLE_HPP_