[0]osg::Group
    [1]osg::MatrixTransform
    [1] osg::MatrixTransform
    [1]osg::MatrixTransform
        [2] osg::Geode
            [3]osg::Geometry
            [3]osg::Geometry
            [3] osg::Geometry
        [2]osg::Geode
    [1] osg::MatrixTransform
    [1]osg::MatrixTransform
        [2]osg::MatrixTransform
            [3] osg::Geode
                [4]osg::Geometry
                [4]osg::Geometry
                [4] osg::Geometry
            [3]osg::Geode
        [2] osg::MatrixTransform
    [1] osg::MatrixTransform
    [1]osg::MatrixTransform
        [2] osg::Geode
            [3]osg::Geometry
            [3]osg::Geometry
            [3]osg::Geometry
            [3] osg::Geometry
            [3]osg::Geometry
            [3] osg::Geometry
        [2]osg::Geode
    [1] osg::MatrixTransform
    [1]osg::MatrixTransform
        [2] osg::Geode
            [3]osg::Geometry
            [3]osg::Geometry
            [3] osg::Geometry
        [2]osg::Geode
    [1] osg::MatrixTransform
    [1]osg::MatrixTransform
        [2] osg::Geode
            [3]osg::Geometry
            [3]osg::Geometry
            [3] osg::Geometry
        [2]osg::Geode
    [1] osg::MatrixTransform
    [1]osg::MatrixTransform
        [2] osg::Geode
            [3]osg::Geometry
            [3]osg::Geometry
            [3]osg::Geometry
            [3] osg::Geometry
            [3]osg::Geometry
            [3] osg::Geometry
        [2]osg::Geode
    [1] osg::MatrixTransform
    [1]osg::MatrixTransform
        [2]osg::MatrixTransform
            [3] osg::Geode
                [4]osg::Geometry
                [4]osg::Geometry
                [4]osg::Geometry
                [4]osg::Geometry
                [4] osg::Geometry
                [4]osg::Geometry
                [4] osg::Geometry
                [4]osg::Geometry
                [4] osg::Geometry
            [3]osg::Geode
        [2] osg::MatrixTransform
    [1] osg::MatrixTransform
    [1]osg::MatrixTransform
        [2] osg::Geode
            [3]osg::Geometry
            [3]osg::Geometry
            [3] osg::Geometry
        [2]osg::Geode
    [1] osg::MatrixTransform
[0] osg::Group

class InfoVisitor : public osg::NodeVisitor
{
public:
InfoVisitor()
:osg::NodeVisitor(TRAVERSE_ALL_CHILDREN), _indent()
{} virtual void apply(osg::Node& node)
{
for (int i = ; i < _indent; i++) std::cout << " ";
std::cout << "[" << _indent << "]" << node.libraryName()
<< "::" << node.className() << std::endl; _indent++;
traverse(node);
_indent--; for (int i = ; i < _indent; i++) std::cout << " ";
std::cout << "[" << _indent << "] " << node.libraryName()
<< "::" << node.className() << std::endl;
} virtual void apply(osg::Geode& node)
{
for (int i = ; i < _indent; i++) std::cout << " ";
std::cout << "[" << _indent << "] " << node.libraryName()
<< "::" << node.className() << std::endl; _indent++; for (unsigned int n = ; n < node.getNumDrawables(); n++)
{
osg::Drawable* draw = node.getDrawable(n);
if (!draw)
continue;
for (int i = ; i < _indent; i++) std::cout << " ";
std::cout << "[" << _indent << "]" << draw->libraryName() << "::"
<< draw->className() << std::endl;
} traverse(node);
_indent--; for (int i = ; i < _indent; i++) std::cout << " ";
std::cout << "[" << _indent << "]" << node.libraryName()
<< "::" << node.className() << std::endl;
}
private:
int _indent;
};

该模型在unity3d中结构

该模型在3dmax中结构

osg::NodeVisitor example的更多相关文章

  1. osg::NodeVisitor中计算一个节点对应的世界变换矩阵、法向量、顶点坐标

    class MyNodeVisitor:public osg::NodeVisitor { pulic: MyNodeVisitor():osg::NodeVisitor(osg::NodeVisit ...

  2. osg::NodeVisitor

    [1]osg::Group [2]osg::PositionAttitudeTransform [2]osg::MatrixTransform [3]osg::Geode [2]osg::Matrix ...

  3. osg::NodeVisitor osg3.4.0

    x:-89.4588 y:-12.1245 z:-11.7807x:-89.4588 y:-6.44823 z:-11.7807x:-89.2164 y:-9.07239 z:-11.811x:-89 ...

  4. OSG程序设计之osg::NodeVisitor

    本文所有内容来自<OpenSceneGraph三维渲染引擎设计与实践>一书. 本文主要讨论的是OSG中节点的访问. 对于节点的访问是从节点接收一个访问器开始的,用户执行某个节点的accep ...

  5. OSG计时器与时间戳

    static osg::Timer* sendMsgTimer = new osg::Timer; if (sendMsgTimer->time_m()>100)//100ms {// d ...

  6. OSG消息机制之事件处理概述

    OSG的消息机制包括好多个头文件预定义及多个类. 首先,消息接收相关的类当属osgGA::GUIEventHandler和osgGA::GUIEventAdapter这两个类了.前者处理OSG程序与用 ...

  7. OSG中找到特定节点的方法

    OSG中找到特定节点的方法 转自:http://38288890.blog.163.com/blog/static/19612845320072721549504/ 为了在OSG中找到需要的节点并对节 ...

  8. NodeVisitor的使用-遍历Geode节点下的Geometry并获取顶点、法向量等数据

    struct Subset { std::vector<float> vertexs;//位置 std::vector<float> normals;//法向 std::vec ...

  9. NodeVisitor的使用-遍历Geode节点并在它与父节点之间添加一个LOD节点

    #include <osg\NodeVisitor>#include <osg\MatrixTransform>#include <osg\PagedLOD>#in ...

随机推荐

  1. Vue 前后端分离系统中遇到跨域问题

    https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Access_control_CORS I  Your application is running ...

  2. 如何理解MVVM

    说一下对MVVM的理解 MVC Model,View,Controller.   View是视图,界面,有输入框,有按钮,有列表等. Model是数据源,比如todolist里面等title,list ...

  3. js插件讲解_javascript原生日历插件讲解

    效果图如下: html代码 <div class="date-control" id="date-control"> <span id=&qu ...

  4. collection,random,os,sys,序列化模块

    一.collection 模块 python拥有一些内置的数据类型,比如 str,list.tuple.dict.set等 collection模块在这些内置的数据类型的基础上,提供了额外的数据类型: ...

  5. js原型模式和继承

    function SuperType() { this.property = true; //原型属性 } //基类方法 SuperType.prototype.getSuperValue = fun ...

  6. mysql语句实现年龄分布

    select nnd as '年龄段',count(*) as '人数' from( select case when age>= and age<= then '1-10' when a ...

  7. Ftp客户端需要TSL功能的文件上传

    Ftp客户端需要TSL功能 1.由于最近做了一个项目,需要把打包的文件传输到对方的FTP服务器上,但是用普通的java连接ftp客户端总是连接不上去,对方却说ftp客户端需要开通TSL功能. 直接上代 ...

  8. Laravel 中使用 Repository 模式

    在本文中,我会向你展示如何在 Laravel 中从头开始实现 repository 设计模式.我将使用 Laravel 5.8.3 版,但 Laravel 版本不是最重要的.在开始写代码之前,你需要了 ...

  9. leetcode解题报告(15):Third Maximum Number

    描述 Given a non-empty array of integers, return the third maximum number in this array. If it does no ...

  10. TensorFlow(一):准备

    我的环境:win10+python3.6.4(64位) 一:安装python 根据自己的电脑下载python(32位或者64位)-->安装教程 安装好python后记得配置pip源,使用官方的源 ...