15#ifndef OSGPARTICLE_SECTOR_PLACER
16#define OSGPARTICLE_SECTOR_PLACER 1
65 inline float volume()
const;
87 :
CenteredPlacer(copy, copyop), _rad_range(copy._rad_range), _phi_range(copy._phi_range)
109 _rad_range.maximum = r2;
120 _phi_range.maximum = r2;
125 float rad = _rad_range.get_random_sqrtf();
126 float phi = _phi_range.get_random();
138 return 0.5f * (_phi_range.maximum - _phi_range.minimum) *
139 (_rad_range.maximum*_rad_range.maximum - _rad_range.minimum*_rad_range.minimum);
The core osg library provides the basic scene graph classes such as Nodes, State and Drawables,...
Definition AlphaFunc:19
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
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
virtual ~SectorPlacer()
Definition SectorPlacer:71
const rangef & getRadiusRange() const
Get the range of possible values for radius.
Definition SectorPlacer:91
void setPhiRange(const rangef &r)
Set the range of possible values for the central angle.
Definition SectorPlacer:112
void place(Particle *P) const
Place a particle. Do not call it manually.
Definition SectorPlacer:123
META_Object(osgParticle, SectorPlacer)
SectorPlacer()
Definition SectorPlacer:81
float volume() const
return the area of the sector
Definition SectorPlacer:136
SectorPlacer & operator=(const SectorPlacer &)
Definition SectorPlacer:72
osg::Vec3 getControlPosition() const
return the control position
Definition SectorPlacer:142
const rangef & getPhiRange() const
Get the range of possible values for the central angle.
Definition SectorPlacer:96
void setRadiusRange(const rangef &r)
Set the range of possible values for radius.
Definition SectorPlacer:101