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.
81 lines
1.4 KiB
C++
81 lines
1.4 KiB
C++
#pragma once
|
|
#include "XJOSGObject.h"
|
|
#include "XJObjectManager/OMPeriodicLattice.h"
|
|
#include <osg/Geometry>
|
|
#include <osgFX/Effect>
|
|
|
|
|
|
class COSGPeriodicLattice : public CXJOSGObject
|
|
{
|
|
public:
|
|
enum {
|
|
MeshNode = 0,
|
|
IsopletheNode,
|
|
FaultNode,
|
|
WellNode,
|
|
BoundaryNode,
|
|
VertexNode
|
|
};
|
|
COSGPeriodicLattice();
|
|
virtual ~COSGPeriodicLattice();
|
|
COSGPeriodicLattice(CXJObject * pobj);
|
|
|
|
virtual int SetValue(CXJObject *obj);
|
|
|
|
//创建网格视图对象
|
|
osg::Geode* CreateObject();
|
|
|
|
protected:
|
|
virtual void UpdatePosition();
|
|
|
|
virtual void UpdateColor();
|
|
void UpdateColor2();
|
|
|
|
virtual void UpdateWireframe();
|
|
|
|
//更新是否可见
|
|
virtual void UpdateVisible();
|
|
|
|
//更新等值线
|
|
virtual void UpdateIsopleth();
|
|
|
|
//更新网格点
|
|
virtual void UpdateMeshPoint();
|
|
|
|
//更新井点
|
|
virtual void UpdateWell();
|
|
|
|
//更新断层
|
|
virtual void UpdateFault();
|
|
|
|
|
|
//创建二维网格
|
|
osg::Group* CreateMesh();
|
|
osg::Group* CreateMesh2();
|
|
|
|
//创建等值线
|
|
osg::Group* CreateIsoplethes();
|
|
|
|
//创建断层
|
|
osg::Group* CreateFaults();
|
|
|
|
//创建控制点
|
|
osg::Group* CreateControlPoints();
|
|
|
|
//创建边界
|
|
osg::Group* CreateBoundarys();
|
|
|
|
// 创建其它线
|
|
osg::Group* CreateOtherLines();
|
|
private:
|
|
osg::Drawable* InsertText(const osg::Vec3& pos, const osg::Vec3& dir, float value);
|
|
|
|
void InsertPlines(osg::Geode* geode, float zval, bool isMark, std::vector<Polyline2d>& plineData);
|
|
|
|
//更新井点差值
|
|
void UpdateControlPoints();
|
|
private:
|
|
OMPeriodicLattice *m_obj;
|
|
|
|
osg::ref_ptr<osg::Switch> m_pLaySwith;
|
|
}; |