[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. 安装腾讯QQ问题记录

    安装腾讯QQ的时候遇到两个错误,记录一些解决方法 1.安装文件失败,请尝试手动卸载QQ或更改安装目录,再执行安装程序,错误码:0x00008013 问题原因:卸载QQ没有完全卸载,导致文件残留. 如果 ...

  2. 3星|路骋《用得上的商学院》:100个MBA知识点的简单介绍

    作者在序言中说,放弃了上亿的股票期权去念了两年全脱产的清华-MIT Global MBA.念完后认为课程不错,考虑到这种课本科毕业不能直接念,工作几年后又很难脱产来念,因此办了一个音频课程来讲这个MB ...

  3. WebStorm 安装

    官方下载地址:https://www.jetbrains.com/webstorm/ 下载 安装 等待.......... 安装完成........................  开始使用(第一次 ...

  4. STM32F10XX学习笔记的石墨连接

    https://shimo.im/docs/QHGRrWxbeb0NiBm9/ <STM32F10X系列笔记>,可复制链接后用石墨文档 App 打开

  5. ServletRequest、 HttpServletRequest、Request的联系与区别

    一. servlet理论上可以处理多种形式的请求响应形式 http只是其中之一 所以HttpServletRequest HttpServletResponse分别是ServletRequest和Se ...

  6. Linux centOS 6 和 centOS 7一些简单的区别

    最明显的是,获取网络端口的命令和IP信息的命令不同了 所以刚安装的centos 7 使用ifconfig查看ip时有可能出现-bash: ifconfig: 未找到命令

  7. TDOA基础之 delayed tx 实现说明

    不论是在TWR 还是TDOA定位算法中,delayed tx 都会用到,这篇博文主要解析delayed tx 实现. 何为delayed tx? delayed tx 是延时发送,为何要延时?因为这个 ...

  8. [Angular] Lazy Load CSS at runtime with the Angular CLI

    Ever had the need for multiple "app themes", or even to completely dynamically load CSS ba ...

  9. 验证账号密码是否为空 if格式

    当前台页面是否提示有没有输入账号密码时 这时需要验证 //验证账号是否为空 if(string.IsNullOrEmpty(zh)) { //为空 则提示输入账号 ObjToJsin.msg = &q ...

  10. PostgreSQL10.5 - 创建索引的思考

    总体感觉整个索引创建的比较慢,PostgreSQL10没有并行创建索引的功能,所以执行过程中,仅用到了服务器的一个核心来执行计算.索引创建是一个高CPU消耗的工作,CPU基本会跑满,会用到backen ...