//////////////////////////////////////
// START of File: CO1_PSER.HPP
//////////////////////////////////////

#ifndef CO1_PSER_HPP            // Avoid multiple includes...
#define CO1_PSER_HPP    TRUE    // ...holds to a terminal #endif below...

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

//
// Master Header File Listing:
//
// #include    <cf_api/co1_pser.hpp>
// Chart Framework "2D/3D Point Series" object.
//

//--------------------------------------------------------------------
// Include Chart Framework class or ID defs/headers this file needs.
// Paths are relative to the IDE's (global) include path: ~/cfrz
//--------------------------------------------------------------------
class       cf_DyArr;   // We'll use dynamic arrays of (void) ptrs
#include    <cf_api/c0_dyarr.hpp>  // to 3D-(geom)-Point objects

class       bf_Color;
class       cf_2DPoint;
class       bf_Display;
class       cf_Kernel;
class       cf_Virt3DObj;
class       cf_3DPoint;
#include    <cf_api/co1_poin.hpp>
            // Which includes the classes above

//
// Declare a Chart Framework "Poly Line" zApp class.
//
// Class cf_3DPointSeries abstracts a set of 
// graphable Chart Framework points.
//
class CF_EXPORT   cf_3DPointSeries 

        : public cf_Virt3DObj 

{

public:

    cf_3DPointSeries(); // Default c-tor w.o. DispAttribs pointer
                        // uses Pen=CF_BLACK; brush=CF_WHITE;

    cf_3DPointSeries( cf_DispAttribs *p_attrToDrawWith );
                        // Std c-tor lets user assign display attribs
                    

    virtual         ~cf_3DPointSeries();


    cf_3DPointSeries&   
                    operator=( const cf_3DPointSeries& cr_cf_3dpsSource );
                    // VERY important for dynamic array ops, etc.!

    cf_3DPoint*     accessPoint( int iIndex );

    virtual void    addPoint( cf_3DPoint *p_cf_3dpNewPoint );
    virtual void    addPoint( const cf_3DPoint &cr_cf_3dpNewPoint );

    cf_3DPoint*     attribPoint();
                    // Access the 3D-point object which holds the master
                    // "display attributes" for this point-series object.

    cf_3DPoint      getPoint( int iIndex );


    virtual void    applyDispMetrics( cf_Kernel  *p_cf_kUseThisKernel );
    virtual void    applyGeomXform( cf_Kernel  *p_cf_kUseThisKernel );
    virtual void    applyProjXform( cf_Kernel   *p_cf_kUseThisKernel );

    virtual void    applyScaleOp(   double dXScaleFactor,
                                    double dYScaleFactor, 
                                    double dZScaleFactor );

    virtual void    applyTranslateOp(   double  dXTrans,
                                        double  dYTrans,
                                        double  dZTrans );


    double      dataXMin() const;
    double      dataXMax() const;
    double      dataYMin() const;
    double      dataYMax() const;
    double      dataZMin() const;
    double      dataZMax() const;


    virtual void    draw2D( bf_Display *p_bf_dspOutputDisplay );
    virtual void    draw3D( bf_Display *p_bf_dspOutputDisplay );


    int             numPoints();
    virtual void    reset();


    double      scaleX();
    double      scaleY();
    double      scaleZ();


    double      screenXMin();
    double      screenXMax();
    double      screenYMin();
    double      screenYMax();


    double      transX();
    double      transY();
    double      transZ();

    double      virtXMin() const;
    double      virtXMax() const;
    double      virtYMin() const;
    double      virtYMax() const;
    double      virtZMin() const;
    double      virtZMax() const;


    double      xformXMin() const;
    double      xformXMax() const;
    double      xformXCtr() const;
    double      xformYMin() const;
    double      xformYMax() const;
    double      xformYCtr() const;
    double      xformZMin() const;
    double      xformZMax() const;
    double      xformZCtr() const;


protected:

    cf_3DPoint  cf_3dpRenderAttribs_;
                // Keeps the Rendering Attributes of this Series in one spot!

    double      dDataXMax, dDataXMin;
    double      dDataYMax, dDataYMin;
    double      dDataZMax, dDataZMin;
                // Used in geometric calcs for Tick Marking Ops.
                            
    double      dVirtXMax, dVirtXMin;
    double      dVirtYMax, dVirtYMin;
    double      dVirtZMax, dVirtZMin;
                // Used in geometric calcs for XYZ scaling & xlation.
                            
    double      dTransX, dTransY, dTransZ;
    double      dScaleFacX, dScaleFacY, dScaleFacZ;
                // We'll need to keep track of how much  this object
                // has been translated, or scaled, so we can "backtrack" 
                // or reverse any operations on its components. 

    double      dGeomXMax, dGeomXMin, dGeomXCtr;
    double      dGeomYMax, dGeomYMin, dGeomYCtr;
    double      dGeomZMax, dGeomZMin, dGeomZCtr;
                // Used in geometric calcs for DSORT.
                            
    double      dScreenXMax, dScreenXMin,
                dScreenYMax, dScreenYMin;
                // Used in projection calcs for DSORT.
                            
    cf_DyArr    da_p_cf_3dpVertices;
    int         iNumPoints;
                // Dynamic Storage for the 3D Points
                // that compose this 3D Point Series.

private:

};  //
    // End of cf_3DPointSeries declaration.
    //

#endif      // Terminates include re-definition protection

//////////////////////////////////////
// END of File: CO1_PSER.HPP
//////////////////////////////////////

            
