From c5ec6927b38bc29febd2811a743d3916aa7836b3 Mon Sep 17 00:00:00 2001 From: "Cutis L. Olson" Date: Fri, 23 Jul 2010 09:01:49 -0500 Subject: [PATCH] Add a method to set particle wind using from heading (deg) and speed (kt) --- simgear/scene/model/particles.cxx | 6 ++++-- simgear/scene/model/particles.hxx | 7 +++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/simgear/scene/model/particles.cxx b/simgear/scene/model/particles.cxx index 08037900..acac7dfc 100644 --- a/simgear/scene/model/particles.cxx +++ b/simgear/scene/model/particles.cxx @@ -62,11 +62,13 @@ void GlobalParticleCallback::operator()(osg::Node* node, osg::NodeVisitor* nv) osg::Matrix om(toOsg(q)); osg::Vec3 v(0,0,9.81); gravity = om.preMult(v); + // NOTE: THIS WIND COMPUTATION DOESN'T SEEM TO AFFECT PARTICLES const osg::Vec3& zUpWind = Particles::getWindVector(); - osg::Vec3 w(zUpWind.y(), zUpWind.x(), - zUpWind.z()); + osg::Vec3 w(zUpWind.y(), zUpWind.x(), -zUpWind.z()); wind = om.preMult(w); - //SG_LOG(SG_GENERAL, SG_ALERT, "wind vector:"<