Panda3D
Loading...
Searching...
No Matches
orientedParticleFactory.cxx
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 orientedParticleFactory.cxx
10 * @author charles
11 * @date 2000-07-05
12 */
13
15#include "orientedParticle.h"
16
17/**
18 * Constructor
19 */
24
25/**
26 * copy Constructor
27 */
31 _initial_orientation = copy._initial_orientation;
32 _final_orientation = copy._final_orientation;
33}
34
35/**
36 * destructor
37 */
41
42/**
43 * child spawn
44 */
45void OrientedParticleFactory::
46populate_child_particle(BaseParticle *bp) const {
47 bp->set_orientation(_initial_orientation);
48}
49
50/**
51 * child particle generation function
52 */
53BaseParticle *OrientedParticleFactory::
54alloc_particle() const {
55 return new OrientedParticle;
56}
57
58/**
59 * Write a string representation of this instance to <out>.
60 */
62output(std::ostream &out) const {
63 #ifndef NDEBUG //[
64 out<<"OrientedParticleFactory";
65 #endif //] NDEBUG
66}
67
68/**
69 * Write a string representation of this instance to <out>.
70 */
72write(std::ostream &out, int indent) const {
73 #ifndef NDEBUG //[
74 out.width(indent); out<<""; out<<"OrientedParticleFactory:\n";
76 #endif //] NDEBUG
77}
Pure Virtual base class for creating particles.
virtual void write(std::ostream &out, int indent=0) const
Write a string representation of this instance to <out>.
An individual, physically-modelable particle abstract base class.
Creates particles that are affected by angular forces.
virtual ~OrientedParticleFactory()
destructor
virtual void write(std::ostream &out, int indent=0) const
Write a string representation of this instance to <out>.
virtual void output(std::ostream &out) const
Write a string representation of this instance to <out>.
Describes a particle that has angular characteristics (velocity, orientation).
std::ostream & indent(std::ostream &out, int indent_level)
A handy function for doing text formatting.
Definition indent.cxx:20
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.