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 ...
随机推荐
- Spring Aop织入点语法
Aspectj织入点语法: 1.execution(public * *(..)) 任何类的任何返回值的任何方法 2.execution(* set*(..)) 任何类的set开头的方 ...
- 读入 并查集 gcd/exgcd 高精度 快速幂
ios_base::sync_with_stdio(); cin.tie(); ], nxt[MAXM << ], Head[MAXN], ed = ; inline void added ...
- Spring Security 流程
首先创建4个类 流程大致如下: 1.容器启动 加载系统资源与权限列表(HashMap) MyInvocationSecurityMetadataSourceService中的loadResourceD ...
- python easygui用法
一个简单的例子 在 EasyGui 中,所有的 GUI 互动均是通过简单的函数调用,下边一个简单的例子告诉你 EasyGui 确实很 Easy! import easygui as g import ...
- stm32 HardFault_Handler调试及问题查找方法——飞思卡尔
看到有朋友遇到Hard Fault 异常错误,特地找到一篇飞思卡尔工程师写的一片经验帖,定位Hard Fault 异常. Kinetis MCU 采用 Cortex-M4 的内核,该内核的 Fault ...
- redis危险命令
KEYS 单行遍历,速度很慢很占执行时间,对单核来说,极有可能导致执行完后处理不过来这段时间堆积的任务量,导致雪崩. FLUSHALL FLUSHDB CONFIG 今晚搜索kombu用的key,用了 ...
- Oracle 控制文件损坏解决方案
Oracle 控制文件损坏解决方案 故障一:丢失(损坏)一个控制文件 前台报错:ORA-00205:error in identifying control file,check alert log ...
- Bzoj 2588 Spoj 10628. Count on a tree(树链剖分LCA+主席树)
2588: Spoj 10628. Count on a tree Time Limit: 12 Sec Memory Limit: 128 MB Description 给定一棵N个节点的树,每个点 ...
- 全栈开发工程师微信小程序-下
app.json { "pages": ["pages/index/index"] } index.wxml <text>Hello World&l ...
- bootstrap中tab切换的使用
文档地址:https://v3.bootcss.com/javascript/#tabs 简单实例: <!DOCTYPE html> <html lang="en" ...