15#ifndef OSGPARTICLE_BOX_PLACER
16#define OSGPARTICLE_BOX_PLACER 1
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)
115 _x_range.maximum = r2;
131 _y_range.maximum = r2;
147 _z_range.maximum = r2;
155 getCenter().z() + _z_range.get_random());
162 return (_x_range.maximum - _x_range.minimum) *
163 (_y_range.maximum - _y_range.minimum) *
164 (_z_range.maximum - _z_range.minimum);
Vec3f Vec3
Definition Vec3:21
The osgParticle library is a NodeKit that extends the core scene graph to support particle effects.
Definition AccelOperator:27
range< float > rangef
Range of floats.
Definition range:76
Copy Op(erator) used to control whether shallow or deep copy is used during copy construction and clo...
Definition CopyOp:41
@ SHALLOW_COPY
Definition CopyOp:47
const rangef & getYRange() const
Get the range of possible values along the Y axis.
Definition BoxPlacer:118
const rangef & getZRange() const
Get the range of possible values along the Z axis.
Definition BoxPlacer:134
META_Object(osgParticle, BoxPlacer)
BoxPlacer()
Definition BoxPlacer:91
const rangef & getXRange() const
Get the range of possible values along the X axis.
Definition BoxPlacer:102
BoxPlacer & operator=(const BoxPlacer &)
Definition BoxPlacer:81
void setXRange(const rangef &r)
Set the range of possible values along the X axis.
Definition BoxPlacer:107
virtual ~BoxPlacer()
Definition BoxPlacer:80
float volume() const
return the volume of the box
Definition BoxPlacer:160
void place(Particle *P) const
Place a particle. Do not call it manually.
Definition BoxPlacer:150
osg::Vec3 getControlPosition() const
return the control position
Definition BoxPlacer:167
void setYRange(const rangef &r)
Set the range of possible values along the Y axis.
Definition BoxPlacer:123
void setZRange(const rangef &r)
Set the range of possible values along the Z axis.
Definition BoxPlacer:139
CenteredPlacer()
Definition CenteredPlacer:56
const osg::Vec3 & getCenter() const
Get the center point.
Definition CenteredPlacer:66
Implementation of a particle.
Definition Particle:47
void setPosition(const osg::Vec3 &p)
Set the position vector.
Definition Particle:483
ValueType minimum
Lower bound.
Definition range:42