//////////////////////////////////////
// START of File: CE3_PIE.HPP
//////////////////////////////////////

#ifndef CE3_PIE_HPP
#define CE3_PIE_HPP

//===================================================================
//
// COPYRIGHT NOTICE:  This code is protected by Copyright!
//
// Copyright (c) 1994 through 1997 by DPC Technology Corporation.
// All rights reserved by DPC Technology Corporation.
//
// See files "cf_copyr.txt" and "cf_licen.txt" for details of
// copyright and license specifications, and contact information.
//
//===================================================================

// Master Header File Listing:
// Usage:   #include    <cf_api/ce3_pie.hpp>
            // 3D Pie Chart Engine object derived from 2D-Pie-Chart-Engine.

//--------------------------------------------------------------------
// Include Chart Framework class or ID defs/headers this file needs.
// Paths are relative to the IDE's (global) include path: ~/cfrz
//--------------------------------------------------------------------
class       cf_2DRect;
#include    <cf_api/c0_dimen.hpp>
            // 2D-Rects define projected ellipses

class       bf_Display;
#include    <cf_api/b0_dspla.hpp>

class       cf_ChartModel;
class       cf_eng_Polar;
#include    <cf_api/ce1_pcor.hpp>

class       cf_eng_Pie2D;
#include    <cf_api/ce2_pie.hpp>

#define     CE3_PIE_3D_PCT_HEIGHT       100
            // default ratio percentage of 3D Pie height
            // to the chart-engine's 3d-box height is 100%:

//--------------------------------------------------------------------------
// Class cf_eng_Pie3D models a 3D Polar Coordinate Pie Chart in a 3D Space.
//--------------------------------------------------------------------------
class CF_EXPORT   cf_eng_Pie3D : public cf_eng_Pie2D
{

public:

    cf_eng_Pie3D();

    ~cf_eng_Pie3D();

    virtual void    applyDataUpdate( cf_ChartModel  *p_cf_cmodlDataSource );

    virtual void    applyGeomXform();

    virtual void    applyProjXform();

    virtual void    config3DBoxETC();

    virtual void    draw2D( bf_Display *p_bf_dspFromChartView );

    virtual void    draw3D( bf_Display *p_bf_dspFromChartView );

            void    preferPieHeightPct( double dWhatPctOfChartHeight );
                    // e.g. half-height pie would be 50.0 pct.


protected:

    virtual void    drawSlice(  cf_2DRect  cf_2drEllipseRectangle,
                                int         iStartAtIndex,
                                int         iFinishAtIndex,
                                bf_Display *p_bf_dspFromChartView );


    double      dPieHeightPct;  // user-specified percent value
    double      dPieHeightVal;  // engine-generated actual value
                // i.e. how "tall" do we want our pie slices
                // in relation to the height of the chart?
                // C-tor inits Pct value to CE3_PIE_3D_PCT_HEIGHT
                // -- which generates actual value.

    cf_3DPoint  cf_3dpXZPlaneTopEllipseVirtXMax,
                cf_3dpXZPlaneTopEllipseVirtXMin,
                cf_3dpXZPlaneTopEllipseVirtZMax,
                cf_3dpXZPlaneTopEllipseVirtZMin;
                // These points will mark the "top of the pie"'s
                // virtual geometry ellipse boundaries (subject
                // to rotation effects, etc)...

    cf_3DPoint  cf_3dpXZPlaneTopEllipseProjXMax,
                cf_3dpXZPlaneTopEllipseProjXMin,
                cf_3dpXZPlaneTopEllipseProjZMax,
                cf_3dpXZPlaneTopEllipseProjZMin;
                // These points will mark the "top of the pie"'s
                // projected ellipse boundaries, after correction
                // for rotation effects, etc

};  // End of cf_eng_Pie3D declaration.

#endif

//////////////////////////////////////
// END of File: CE3_PIE.HPP
//////////////////////////////////////


            
