Introduce osgParticle::ParticleSystem::s/getParticleScaleReferenceFrame() to

help manage the scaling of particles, whether they should be relative to the
local coordiante frame of the particle system, or be in world coordinates.
This commit is contained in:
Robert Osfield
2008-03-17 12:09:05 +00:00
parent 7ec5673a7e
commit 00f161ca35
4 changed files with 68 additions and 15 deletions

View File

@@ -75,6 +75,19 @@ namespace osgParticle
/// Set the alignment vectors.
inline void setAlignVectors(const osg::Vec3& X, const osg::Vec3& Y);
enum ParticleScaleReferenceFrame
{
LOCAL_COORDINATES,
WORLD_COORDINATES
};
void setParticleScaleReferenceFrame(ParticleScaleReferenceFrame rf) { _particleScaleReferenceFrame = rf; }
ParticleScaleReferenceFrame getParticleScaleReferenceFrame() const { return _particleScaleReferenceFrame; }
/// Get the default bounding box
inline const osg::BoundingBox& getDefaultBoundingBox() const;
@@ -188,7 +201,8 @@ namespace osgParticle
Alignment _alignment;
osg::Vec3 _align_X_axis;
osg::Vec3 _align_Y_axis;
ParticleScaleReferenceFrame _particleScaleReferenceFrame;
bool _doublepass;
bool _frozen;