15#ifndef OSGPARTICLE_SEGMENT_PLACER
16#define OSGPARTICLE_SEGMENT_PLACER 1
46 inline void setVertexA(
float x,
float y,
float z);
55 inline void setVertexB(
float x,
float y,
float z);
64 inline float volume()
const;
81 :
Placer(), _vertexA(-1, 0, 0), _vertexB(1, 0, 0)
86 :
Placer(copy, copyop), _vertexA(copy._vertexA), _vertexB(copy._vertexB)
113 return (_vertexB - _vertexA).length();
123 _vertexA.
set(x, y, z);
133 _vertexB.
set(x, y, z);
138 return (_vertexA+_vertexB)*0.5f;
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< osg::Vec3 > rangev3
Range of osg::Vec3s.
Definition range:82
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
void set(value_type x, value_type y, value_type z)
Definition Vec3f:67
Implementation of a particle.
Definition Particle:47
void setPosition(const osg::Vec3 &p)
Set the position vector.
Definition Particle:483
Placer()
Definition Placer:56
const osg::Vec3 & getVertexA() const
get vertex A.
Definition SegmentPlacer:90
virtual ~SegmentPlacer()
Definition SegmentPlacer:70
osg::Vec3 getControlPosition() const
return the control position
Definition SegmentPlacer:136
const osg::Vec3 & getVertexB() const
get vertex B.
Definition SegmentPlacer:95
void setVertexA(const osg::Vec3 &v)
Set vertex A of the segment as a vector.
Definition SegmentPlacer:116
SegmentPlacer()
Definition SegmentPlacer:80
void place(Particle *P) const
Place a particle. This method is called by ModularEmitter, do not call it manually.
Definition SegmentPlacer:106
SegmentPlacer & operator=(const SegmentPlacer &)
Definition SegmentPlacer:71
void setVertexB(const osg::Vec3 &v)
Set vertex B of the segment as a vector.
Definition SegmentPlacer:126
float volume() const
return the length of the segment
Definition SegmentPlacer:111
void setSegment(const osg::Vec3 &A, const osg::Vec3 &B)
Set both vertices.
Definition SegmentPlacer:100
META_Object(osgParticle, SegmentPlacer)