15 #ifndef OSGPARTICLE_BOX_PLACER
16 #define OSGPARTICLE_BOX_PLACER 1
18 #include <osgParticle/CenteredPlacer>
19 #include <osgParticle/Particle>
20 #include <osgParticle/range>
48 inline void setXRange(
float r1,
float r2);
57 inline void setYRange(
float r1,
float r2);
66 inline void setZRange(
float r1,
float r2);
74 inline float volume()
const;
92 :
CenteredPlacer(), _x_range(-1, 1), _y_range(-1, 1), _z_range(-1, 1)
98 _x_range(copy._x_range), _y_range(copy._y_range), _z_range(copy._z_range)
void setPosition(const osg::Vec3 &p)
Set the position vector.
ValueType maximum
Higher bound.
const rangef & getYRange() const
Get the range of possible values along the Y axis.
const rangef & getZRange() const
Get the range of possible values along the Z axis.
BoxPlacer & operator=(const BoxPlacer &)
void setXRange(const rangef &r)
Set the range of possible values along the X axis.
ValueType get_random() const
Get a random value between min and max.
void place(Particle *P) const
Place a particle. Do not call it manually.
void setZRange(const rangef &r)
Set the range of possible values along the Z axis.
META_Object(osgParticle, BoxPlacer)
const osg::Vec3 & getCenter() const
Get the center point.
const rangef & getXRange() const
Get the range of possible values along the X axis.
osg::Vec3 getControlPosition() const
return the control position
ValueType minimum
Lower bound.
float volume() const
return the volume of the box
void setYRange(const rangef &r)
Set the range of possible values along the Y axis.