Panda3D

Loading...
Searching...
No Matches
ringEmitter.h
Go to the documentation of this file.
1/**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file ringEmitter.h
10 * @author charles
11 * @date 2000-06-22
12 */
13
14#ifndef RINGEMITTER_H
15#define RINGEMITTER_H
16
17#include "baseParticleEmitter.h"
18
19/**
20 * Describes a planar ring region in which particles are generated.
21 */
22 class EXPCL_PANDA_PARTICLESYSTEM RingEmitter : public BaseParticleEmitter {
23PUBLISHED:
24 RingEmitter();
25 RingEmitter(const RingEmitter &copy);
26 virtual ~RingEmitter();
27
28 virtual BaseParticleEmitter *make_copy();
29
30 INLINE void set_radius(PN_stdfloat r);
31 INLINE void set_angle(PN_stdfloat angle);
32 INLINE void set_radius_spread(PN_stdfloat spread);
33 INLINE void set_uniform_emission(int uniform_emission);
34
35 INLINE PN_stdfloat get_radius() const;
36 INLINE PN_stdfloat get_angle() const;
37 INLINE PN_stdfloat get_radius_spread() const;
38 INLINE int get_uniform_emission() const;
39
40 virtual void output(std::ostream &out) const;
41 virtual void write(std::ostream &out, int indent=0) const;
42
43 protected:
44 PN_stdfloat _radius;
45 PN_stdfloat _radius_spread;
46
47 // CUSTOM EMISSION PARAMETERS
48 PN_stdfloat _aoe; // angle of elevation
49
50 // viariables used for uniform particle emission
51 int _uniform_emission;
52 PN_stdfloat _theta;
53
54 // scratch variables that carry over from position calc to velocity calc
55 PN_stdfloat _sin_theta;
56 PN_stdfloat _cos_theta;
57
58 private:
59 virtual void assign_initial_position(LPoint3& pos);
60 virtual void assign_initial_velocity(LVector3& vel);
61};
62
63#include "ringEmitter.I"
64
65#endif // RINGEMITTER_H
baseParticleEmitter.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
BaseParticleEmitter::write
virtual void write(std::ostream &out, int indent=0) const
Write a string representation of this instance to <out>.
Definition baseParticleEmitter.cxx:92
BaseParticleEmitter::output
virtual void output(std::ostream &out) const
Write a string representation of this instance to <out>.
Definition baseParticleEmitter.cxx:82
RingEmitter::set_radius
void set_radius(PN_stdfloat r)
radius set
Definition ringEmitter.I:19
RingEmitter::get_radius
PN_stdfloat get_radius() const
radius get
Definition ringEmitter.I:55
RingEmitter::set_uniform_emission
void set_uniform_emission(int uniform_emission)
uniform_emission set
Definition ringEmitter.I:46
RingEmitter::get_angle
PN_stdfloat get_angle() const
angle of elevation get
Definition ringEmitter.I:64
RingEmitter::get_radius_spread
PN_stdfloat get_radius_spread() const
radius_spread get
Definition ringEmitter.I:73
RingEmitter::set_angle
void set_angle(PN_stdfloat angle)
angle of elevation set
Definition ringEmitter.I:28
RingEmitter::set_radius_spread
void set_radius_spread(PN_stdfloat spread)
radius_spread set
Definition ringEmitter.I:37
RingEmitter::get_uniform_emission
int get_uniform_emission() const
uniform_emission get
Definition ringEmitter.I:82
RingEmitter::make_copy
virtual BaseParticleEmitter * make_copy()
copier
Definition ringEmitter.cxx:52
RingEmitter::RingEmitter
RingEmitter()
constructor
Definition ringEmitter.cxx:20
indent
std::ostream & indent(std::ostream &out, int indent_level)
A handy function for doing text formatting.
Definition indent.cxx:20
ringEmitter.I
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.