osg::NodeVisitor example
[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的更多相关文章
- osg::NodeVisitor中计算一个节点对应的世界变换矩阵、法向量、顶点坐标
class MyNodeVisitor:public osg::NodeVisitor { pulic: MyNodeVisitor():osg::NodeVisitor(osg::NodeVisit ...
- osg::NodeVisitor
[1]osg::Group [2]osg::PositionAttitudeTransform [2]osg::MatrixTransform [3]osg::Geode [2]osg::Matrix ...
- 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 ...
- OSG程序设计之osg::NodeVisitor
本文所有内容来自<OpenSceneGraph三维渲染引擎设计与实践>一书. 本文主要讨论的是OSG中节点的访问. 对于节点的访问是从节点接收一个访问器开始的,用户执行某个节点的accep ...
- OSG计时器与时间戳
static osg::Timer* sendMsgTimer = new osg::Timer; if (sendMsgTimer->time_m()>100)//100ms {// d ...
- OSG消息机制之事件处理概述
OSG的消息机制包括好多个头文件预定义及多个类. 首先,消息接收相关的类当属osgGA::GUIEventHandler和osgGA::GUIEventAdapter这两个类了.前者处理OSG程序与用 ...
- OSG中找到特定节点的方法
OSG中找到特定节点的方法 转自:http://38288890.blog.163.com/blog/static/19612845320072721549504/ 为了在OSG中找到需要的节点并对节 ...
- NodeVisitor的使用-遍历Geode节点下的Geometry并获取顶点、法向量等数据
struct Subset { std::vector<float> vertexs;//位置 std::vector<float> normals;//法向 std::vec ...
- NodeVisitor的使用-遍历Geode节点并在它与父节点之间添加一个LOD节点
#include <osg\NodeVisitor>#include <osg\MatrixTransform>#include <osg\PagedLOD>#in ...
随机推荐
- SecureCRT进行端口转发
总共3台机器:my电脑.跳转机器(外网).内网服务器. 首先配置至跳板机(150.236.223.72:22)的连接: 配置完成后选择Connect连接至跳板机,输入密码后可选择“Save p ...
- xld特征
halcon中什么是xld? xld(eXtended Line Descriptions) 扩展的线性描述,它不是基于像素的,人们称它是亚像素,只不过比像素更精确罢了,可以精确到像素内部的一种描述. ...
- Selenium常用API的使用java语言之11-设置元素等待
WebDriver提供了两种类型的等待:显式等待和隐式等待. 1.显示等待 WebDriver提供了显式等待方法,专门针对某个元素进行等待判断. import org.openqa.selenium. ...
- Spark机器学习MLlib系列1(for python)--数据类型,向量,分布式矩阵,API
Spark机器学习MLlib系列1(for python)--数据类型,向量,分布式矩阵,API 关键词:Local vector,Labeled point,Local matrix,Distrib ...
- h5css3弹性盒子
弹性盒子: 老:display:box: 新:display:flex: 方向:flex-direction: 横向正方向 row/横向反方向 row-reverse/纵向正方向 column/纵向反 ...
- 第三章 基本的bash shell命令
1.硬链接:等同于引用了原文件,并未产生新的文件,不同的硬链接共用一个inode 2.符号链接:创建的是一个新文件,新文件指向原文件,因为是不同的文件,所以有不同的inode
- python 比较运算符和逻辑运算符
<1> 比较(即关系)运算符 python中的比较运算符如下表 运算符 描述 示例 == 检查两个操作数的值是否相等,如果是则条件变为真. 如a=3,b=3则(a == b) 为 true ...
- 2019暑期金华集训 Day1 组合计数
自闭集训 Day1 组合计数 T1 \(n\le 10\):直接暴力枚举. \(n\le 32\):meet in the middle,如果左边选了\(x\),右边选了\(y\)(且\(x+y\le ...
- ckeditor自定义工具栏
/** * 获取编辑器工具栏自定义参数 * @param type 类型 simple=极简版 basic=基本版 full=完整版 */ function get_ckeditor_toolbar( ...
- 1.OC类
一.基础语法 1.在OC中,一般用2个文件来描述一个类: 1> .h:类的声明文件,用于声明成员变量.方法.类的声明使用关键字@interface和@end. 注意:.h中的方法只是做一个声明, ...