osg中的MatrixTransform
来源:互联网 发布:淘宝企业店铺的要求 编辑:程序博客网 时间:2024/06/06 12:57
类说明:这是一个最常用的移动结点的类,可以随动,旋转控制结点。这些操作都是乘矩阵得到。 类继承图:
MatrixTransform () MatrixTransform (const MatrixTransform &, const CopyOp ©op=CopyOp::SHALLOW_COPY) MatrixTransform (const Matrix &matix)
说明:构造函数,第二个构造函数为从一个现有MatrixTransform来构造新的MatrixTransform。可以确定拷贝类型。而第三个构造函数为从一个matrix来构造一个MatrixTransform
matrix 已有的源Matrix,它将会被拷贝到新的Matrix
copyop 拷贝类型,默认为浅拷贝,可以为深拷贝:DEEP_COPY_OBJECTS
matix 从已知Matrix中构造MatrixTransform.
META_Node (osg, Switch)
说明:是一个宏,宏中定义了标准Clone,且具有isSameAs,ClassName,accept三个重要方法。目的是让从Node派生的子类方便的定义所需要的纯虚方法
virtual MatrixTransform * asMatrixTransform () virtual const MatrixTransform * asMatrixTransform () const
说明:返回一个MatrixTransform的指针,如果是对象是可以这样使用,或是其父类的其它类型
void setMatrix (const Matrix &mat)
说明:这个方法非常重要,是里面最重要的方法,里面有很多的惯用法。其中格式都是这样的:mat.setMatrix(osg::Matrix::Transform(x,y,z)),其中osg::Matrix::Scale以及osg::Matrix::Rotate也可以被用在其中,并且可以相乖叠加。这样就设置了mat的矩阵。然后把node加入到mat中,再把mat加入到Group中。如示例七。
mat 设置矩阵,示例mat.setMatrix(osg::Matrix::Transform(x,y,z))
const Matrix & getMatrix () const
说明:得到已经设置的矩阵值。返回一个矩阵的引用。
void preMult (const Matrix &mat)
void postMult (const Matrix &mat)
说明:preMult的意思为前乘矩阵,postMult的意思为后乘矩阵
mat 需要乘的矩阵
const Matrix & getInverseMatrix () const
说明:得到逆矩阵
virtual bool computeLocalToWorldMatrix (Matrix &matrix, NodeVisitor *) const
virtual bool computeWorldToLocalMatrix (Matrix &matrix, NodeVisitor *) const
matrix 得到转换后的矩阵值
visitor 结点访问器,指向需要转换的结点
- osg中的MatrixTransform
- osg::MatrixTransform和osg::Matrix
- osg::MatrixTransform和osg::Matrix
- 4、osg::Node,osg::Group,osg::Switch,osg::MatrixTransform类
- osg杂记一:osg::MatrixTransform和osg::PositionAttitudeTransform异同
- WPF中的MatrixTransform
- WPF中的MatrixTransform
- WPF中的MatrixTransform
- WPF中的MatrixTransform
- MatrixTransform
- 2.osg内置几何类型、osg::Geometry的类型与osg::MatrixTransform
- OSG中改变模型的位置,姿态, osg::MatrixTransform的使用
- osg中使用MatrixTransform来实现模型的平移/旋转/缩放
- OSG-OSG中的observer_ptr指针
- [osg]OSG中的图元控制
- osg场景中的树
- OSG中的相关词汇表
- OSG中的observer_ptr指针
- MySQL ERROR 1005: Can't create table (errno: 150)解决办法
- android开发之屏幕兼容
- 谷歌战神Jeff Dean
- es6中类和extends的本质
- MySQL创建数据表时设定引擎MyISAM/InnoDB
- osg中的MatrixTransform
- 版本控制的演变与Git基础知识
- osg中的Impostor
- telnet安装
- 使用CSDN-markdown编辑器
- 用js实现五子棋
- 对象的三大特性
- 数据库中视图的作用
- android tab点击后更换图片