- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

# CurveBrush/CurveCreator.h

    #ifndef _CURVE_CREATOR_H
    #define _CURVE_CREATOR_H

    #if defined(JAMBUILD)
    #include <Mudbox/mudbox.h>
    #else
    #include "../../include/Mudbox/mudbox.h"
    #endif

    using namespace mudbox;

    // this class draws curves on the surface of a mesh as a series of connected line segments.
    class CurveCreator : public BrushOperation
    {
        DECLARE_CLASS;
        CurveCreator( void );
        virtual void BeginStroke( Mesh *, Modifier, TriggerType );
        virtual void EndStroke( void );
        virtual void AddPatch( const SurfacePoint *, const Vector &, float, float, float, AxisAlignedBoundingBox & );
        virtual void MouseMove( float fXPosition, float fYPosition, float fXDelta, float fYDelta, AxisAlignedBoundingBox &cDirtyWorldArea, float fSize, float fPressure, float fStrength );
        virtual bool ExecuteAndInvert( void );
        virtual void Serialize( Stream &s );

    public:
        static QVector< Store<Vector>* >& Lines();

    private:

        // 0 - in Do state
        // 1 - in Undo state
        // 2 - in Redo state
        int m_iDoState;

        int m_iCurrentCurve;
        Store< Vector > m_iLine;

        afloatr m_fSTimes;
        int iLastFaceIndex;
        int iFirstPointIndex;
    };

    #endif