随笔分类 - openscenegraph(osg)
摘要:osg::Shape类 继承自osg::Object类; osg::Shape类是各种内嵌几何体的基类,不但可以用于剔除和碰撞检测,还可用于生成预定义的几何体对象; osg::ShapeDrawable类: 派生自osg::Drawable类; 在osg::ShapeDrawable类的构造函数中提
阅读全文
摘要:遍历节点树:osg::Node类中有两个辅助函数: 转自:https://www.cnblogs.com/hzhg/archive/2010/12/17/1908764.html
阅读全文
摘要://顶点着色器 static const char* vertShader = { "varying vec4 color;\n" "void main(void)\n" "{\n" "color = gl_Vertex;\n" "gl_Position=gl_ModelViewProjectionMatrix*gl_Vertex;\n" "}...
阅读全文
摘要:日志: “TeslaManage.exe”(Win32): 已加载“F:\OpenScenceGraphProject\OSG_QT_2019\x64\Debug\TeslaManage.exe”。已加载符号。“TeslaManage.exe”(Win32): 已加载“C:\Windows\Syst
阅读全文
摘要:/******************************************************************************** ** Form generated from reading UI file 'qt_chart1.ui' ** ** Created by: Qt User Interface Compiler version 5.12.2 *...
阅读全文
摘要:QString item1 = QString::fromStdString(groupParam->getChild(k)->getName()); QStandardItem* itemProject = new QStandardItem(item1); //设置树形控件子项的属性 itemP
阅读全文
摘要:void TeslaManage::OnlineTreeViewDoubleClick(const QModelIndex & index) { int row = index.row(); qDebug() index(0, 0).child(row, 0).data().toString(); if (root != NULL) { osg...
阅读全文
摘要:void Test::printOsgGroup(osg::ref_ptr &groupParam) { qDebug() getNumChildren(); //std::cout getNumChildren() getNumChildren(); k++) { osg::ref_ptr group_index = groupParam->getC...
阅读全文
摘要:void TeslaManage::loadModelFile(QString &filename) { file_node = osgDB::readNodeFile(std::string((const char *)filename.toLocal8Bit())); root->addChild(file_node); root->addChild(create...
阅读全文
摘要:模型节点控制隐藏于显示,只需要调用 节点的 setNodeMask(1);即可,0:隐藏 1:显示 export root nodeNode : RootNodeNode : 三维视图: {三维} eCamera : 涓夌淮瑙嗗浘: {涓夌淮}Node : 基本墙 wall_240 [361750]
阅读全文
摘要:效果图片: 参考:https://blog.csdn.net/sun222555888/article/details/52083413
阅读全文
摘要:for (int k = 0; kgetNumChildren(); k++) { //转换编 std::string name = vcfbx1.w2m1(vcfbx1.m2w1(sg->getChild(k)->getName(), CP_UTF8)); }
阅读全文
摘要:class CPickHandler :public osgGA::GUIEventHandler { public: CPickHandler(osgViewer::Viewer *viewer) :mViewer(viewer) {} virtual bool handle(const osgGA::GUIEventAdapter &ea, osgGA::GUIActionA...
阅读全文
摘要:void setNodeStateset(osg::Node *nodeParam) { osg::ref_ptr stateset1 = nodeParam->getOrCreateStateSet(); osg::ref_ptr program1 = new osg::Program; program1->addShader(new osg::Shader(os...
阅读全文
摘要:fbx model element count:80 三维视图: {三维} 4294967295 osg::MatrixTransform1 基本墙 wall_240 [361750] 4294967295 osg::MatrixTransform2 基本墙 wall_240 [361813] 42
阅读全文
摘要:count:560 construction_worker 4294967295 osg::MatrixTransform1 Bip001 L Finger02 4294967295 osg::MatrixTransform2 Bip001 L Finger01 4294967295 osg::Ma
阅读全文
摘要:export root nodeNode : RootNodeNode : RootNodeNode : construction_workerNode : Bip001Node : Bip001 PelvisNode : Bip001 SpineNode : Bip001 Spine1Node :
阅读全文
摘要:使用osg加载fbx模型,需要自己编译fbx插件,编译流程与插件使用案例如下 代码地址:https://github.com/shelltdf/osgFBX CMake Error: The following variables are used in this project, but they
阅读全文
摘要:#ifdef _WIN32 #include #endif // _WIN32 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #in...
阅读全文