You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
# pragma once
# include "afx.h"
# include <vector>
using namespace std ;
/*******************************************************************************
类 名: CFPoints
主要功能:实现对散点文件的读取和处理,将文件中所有点的属性值(一般为5项)
存储在各自CVector对象中, 并将该对象地址添加到指针链表pl。
Annotation: Wangcw 2011-8-11
*****************************************************************************/
class AFX_EXT_CLASS CFPoints /*:public CCurve*/
{
public :
CFPoints ( void ) ;
~ CFPoints ( void ) ;
//增加一个散点
/** @brief 数组pxyz代表了当前数据点的五项属性, 分别表示x,y,z, 平滑度(缺省为1)和盘号( 缺省为0) */
void AddNewPoint ( double * pxyz ) ; //pxyz为double[5]对象
/** @brief pl为空, 将文件打开, 返回文件长度, 否则flen=-19*/
int Open ( ) ;
/** @brief 主功能函数, 读取文件中所有的数据点, 将其五个属性存储到指针链表pl中*/
int Open ( CString m_xyz ) ;
/** @brief 从内存中读取散点数据, double指针为5个属性 x,y,z坐标, 平滑度, 盘号*/
int Open ( vector < double * > & data5_vec ) ;
void Close ( void ) ;
/** @brief 读取文件或pl中的数据到vt*/
int Read ( void ) ;
/** @brief 初始化文件名, vt*/
int Create ( CString m_xyz ) ;
/** @brief 得到散点的x,y,z极值 */
int GetRangle ( double * range ) ;
dfCProgress * pPro ;
CString m_xyz ; //文件名
double flen ; //文件长度
double smooth ;
POSITION loop ; //pl.GetHeadPosition()
/** @brief 指针链表中每个指针都指向一个double[5]类型的对象*/
CPtrList pl ;
/** @brief 临时数组vt.x代表了当前数据点的五项属性, 分别表示x,y,z, 平滑度(缺省为1)和盘号( 缺省为0) */
CVector vt ;
int IsNew ;
public :
CStdioFile fr ;
void ClearPoint ( void ) ;
BOOL IsEmpty ( void ) ;
} ;