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.
kev/Drawer/SSBase/MxnFormat/SeisIndexRandomLine.h

63 lines
1.5 KiB
C++

#pragma once
#include "DrawModel\TypeSet.h"
#include "TInterval.h"
#include "DrawModel\ObjectSet.h"
#include "RowCol.h"
namespace NSeis
{
class CSeisIndexRandomLineSet;
//任意地震测线索引,为了自定义测线(如过井测线),保存线道号序列,
//显示剖面时需要根据该线道序列读取剖面数据
class AFX_EXT_CLASS CSeisIndexRandomLine
{
public:
CSeisIndexRandomLine(void);
~CSeisIndexRandomLine(void);
bool isEmpty() const { return nodes_.isEmpty(); }
int size() { return nodes_.size(); }
int addNode(const CRowCol& rc);
void insertNode(int idx,const CRowCol& rc);
void setNodePosition(int idx,const CRowCol& rc);
void removeNode(int idx);
void removeNode(const CRowCol& rc);
//void limitTo(const CubeSampling&); // nrNodes should be 2
int nodeIndex(const CRowCol& rc) const;
int nrNodes() const;
const CRowCol& nodePosition(int idx) const;
void allNodePositions(TTypeSet<CRowCol>& rcs) const;
void setZRange( const TInterval<float>& rg ) { zrange_ = rg; }
TInterval<float> zRange() const { return zrange_; }
protected:
TTypeSet<CRowCol> nodes_; //线道号序列
TInterval<float> zrange_; //时间范围
CSeisIndexRandomLineSet* m_pLinesSet;
friend class CSeisIndexRandomLineSet;
};
class AFX_EXT_CLASS CSeisIndexRandomLineSet : public TObjectSet<CSeisIndexRandomLine>
{
public:
CSeisIndexRandomLineSet();
void AddLine(CSeisIndexRandomLine* srl) { srl->m_pLinesSet=this; *this += srl; }
void RemoveLine(int nIndex) { delete remove(nIndex); }
};
}//namespace
using namespace NSeis;