- 博客(13)
- 资源 (8)
- 收藏
- 关注
原创 Camera类
为视口添加Camera的类,用于显示。类的继承关系如下图 void setView(View *view) 说明:为camera设置依附的view View *getView() const View *getView() const 说明:得到该camera的view void setStates(osg::State *states) 说明:为该camera设置states
2017-01-16 01:54:44 1060
原创 OpenThreads线程的创建与控制
下面的例子创建了一个新的线程并使其运行,同时阻塞主进程,直到新县城完成任务为止。#include <OpenThreads/Thread>#include <OpenThreads/Block>#include <iostream>class TestThread:public OpenThreads::Thread{public: TestThread() {
2017-01-15 22:33:06 1306
原创 GraphicsWindowQt类参考
公有成员 GraphicsWindowQt (osg::GraphicsContext::Traits *traits, QWidget *parent=NULL, const QGLWidget *shareWidget=NULL, Qt::WindowFlags f=0) GraphicsWindowQt (GLWidget *widget) GLWidget *getGLWidget()
2017-01-13 23:59:57 2870
原创 Viewer类参考
类描述: 为一个单独的场景[scene]保存一个单独的view. Viewer()Viewer (osg::ArgumentParser &arguments)从类osg::ArgumentParser中传递参数入Viewer,类ArgumentParser可以获取main入口参数以及程序的其它信息,也可以判断传参是否有误。Viewer (const osgViewer::Viewer &v
2017-01-13 22:49:28 570
原创 Operation类参考
图形操作的基类 继承关系如下图: #include <OperationThread.h>Operation(const std::string &name , bool keep)void setName(const std::string &name)const std::string & getName() const获取可读的操作名称void setKeep(bool keep
2017-01-12 21:24:46 1296
原创 AnimationPath类
bool getMatrix (double time, Matrixf &matrix) const bool getMatrix (double time, Matrixd &matrix) const bool getInverse (double time, Matrixf &matrix) const bool getInverse (double time, Matrixd
2017-01-12 00:21:28 864
原创 osgGA的CameraManipulator类
操作器基类,用于实现各种操作器接口。本身也是一个操作器的管理类,里面可以压入多个操作器,根据用户按键选择使用哪一个操作器。virtual const char * className() const 说明:获取当前类的名称 void addMatrixManipulator(int key , std::string nam , CameraManipulator *cm) 说明:添加一个操作
2017-01-12 00:20:19 877 1
原创 osg中的LOD类
LOD () LOD (const LOD &, const CopyOp ©op=CopyOp::SHALLOW_COPY) 说明:构造函数,第二个构造函数为从已知的LOD构造新的LOD,第二个参数为拷贝类型。默认为是浅拷贝。 参数 lod 源LOD copyop 拷贝方式,默认为是浅拷贝,可以为深拷贝:DEEP_COPY_OBJECTSvirtua
2017-01-11 23:44:35 2422
原创 osg中的Impostor
类说明:用图代替模型的LOD技术。 类继承图: 类中方法: Impostor () Impostor (const Impostor &lod, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY) 说明:构造函数。第二个从已有的Imposter中构造现在的Imposter。 参数 lod 源LOD copyop
2017-01-11 23:39:45 956
原创 osg中的MatrixTransform
类说明:这是一个最常用的移动结点的类,可以随动,旋转控制结点。这些操作都是乘矩阵得到。 类继承图: MatrixTransform () MatrixTransform (const MatrixTransform &, const CopyOp ©op=CopyOp::SHALLOW_COPY) MatrixTransform (const Matrix &matix) 说明:构
2017-01-11 23:38:38 3414
原创 osgViewer::ViewerBase
类描述:是view的基本类,同时也是osgViewer::CompositeViewer和osgViewer::Viewer的父类。 类继承图:由于是osgViewer::Viewer的父类,所以它的方法一般都会提供给osgVIewer::Viewer使用,而且非常重要。 ViewerBase () ViewerBase (const ViewerBase &vb) 说明:构造函数。第二个构造
2017-01-11 23:35:55 1271
转载 半边数据结构
翻译文章来自:http://www.flipcode.com/archives/The_Half-Edge_Data_Structure.shtml 介绍 表示多边形网格(polygon mesh)的一个常用方式就是使用共享的顶点列表和面的列表(里面包含面所含的顶点)。这样的表示方法在许多情况下都非常方便和高效,但是在某些特定的领域,反而会效率比较低。 举例来说,网格简化(mesh simpl
2017-01-05 10:05:43 980
原创 boost thread_group
boost库提供thread_group用于管理一组线程,就像是一个线程池,它内部使用std::list#include <boost/thread/thread.hpp>#include <boost/bind.hpp>#include <boost/thread/mutex.hpp>#include <iostream>using namespace std ;boost::mutex i
2017-01-02 23:58:55 6727
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人