深入浅出spark粒子特效连接:https://www.cnblogs.com/lyggqm/p/9956344.html group调用action的地方: 可以看到使用action的可以是出生一次,结束一次 action An abstract class that allows to perform an action on a single particle. actionset SpawnParticlesAction An action that allows particles t…
深入浅出spark粒子特效连接:https://www.cnblogs.com/lyggqm/p/9956344.html group添加emitter的方式: eimtter: 上图是spark源码中发射器emitter的框架 我们开始逐个分析: 1.NormalEmitter An emitter that emits particles following a Zone normals. 一个向另外一个zone(区域)方向发射粒子的喷射器. The Zone used to derive…
背景: 目前我使用的spark粒子特效库是2.0 这个库好像是原来鬼火引擎的一部分,需要从github上找 现在我要将其使用到我自己开发的基于osgearth开的三维地图引擎中 步骤: 1.编译spark库 2.编译osgspark库,由王锐写的源码,社区或者github上有源码和粒子 3.将从osgspark生成的粒子node放置到osgearth中(支持绝对位置和相对位置~难点) 4.制作spark的脚本化支持(将每一种独立的粒子做成xml文件单独保存) 5.粒子编辑器制作 6.写文档(目前…
深入浅出spark粒子特效连接:https://www.cnblogs.com/lyggqm/p/9956344.html group添加modifier的方式: modifier An abstract class that allows to modify the behaviour of a group of particles over time. 调节器是为了给粒子生命周期过程提供外力的功能,给粒子加上物理功能 它有以下几种: 碰撞弹力设置 Collider 附加喷射器 Emitter…
深入浅出spark粒子特效连接:https://www.cnblogs.com/lyggqm/p/9956344.html 插值器是体现粒子生命周期变化的功能 group使用到插值器的方式: 可以看到,再一个group中,我们可以插入的插值器有:颜色,大小,质量,角度,纹理索引(针对一张多图N*M),旋转速度 interpolator 插值器基类 A helper method that linearly interpolates a value The result is computed t…
深入浅出spark粒子特效连接:https://www.cnblogs.com/lyggqm/p/9956344.html system: A class defining a complete system of particles. 最重要的就两个函数: addController()//Adds a controller to the system. addGroup() 可见一个完整的粒子system可以有几个group和controller组成 group: The group is…
首先粒子在地球上位置摆放很简单: //传入的经纬度坐标 osg::Vec3d geoPoint; const SpatialReference* latLong = SpatialReference::get("wgs84"); //偏移在地球上的点 GeoPoint point(latLong, geoPoint.x(), geoPoint.y(), geoPoint.z(), eMode); osg::Matrix matrixGood; point.createLocalToWo…
//osg::Matrix offsetmatrix 计算出子节点在父节点下的绝对坐标 //osg::Matrix offposition 用来计算当前节点相对父节点的位置 osg::Matrix offsetmatrix; offsetmatrix.setTrans(newposition3); offsetmatrix.preMultRotate(fatherquat); offsetmatrix.preMultRotate(itr->_quatOffsetRotate); osg::Mat…
1.example_osganimate一)演示了路径动画的使用(AnimationPath.AnimationPathCallback),路径动画回调可以作用在Camera.CameraView.MatrixTransform.PositionAttitudeTransform等四种类型的节点上.二)演示了osgSim::OverlayNode的使用 2.example_osganimationeasemotion一)演示了osgAnimation::EaseMotion的使用,EaseMot…