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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user