Panda3D
Loading...
Searching...
No Matches
orientedParticle.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 orientedParticle.cxx
10 * @author charles
11 * @date 2000-06-19
12 */
13
14#include "orientedParticle.h"
15
16/**
17 * simple constructor
18 */
20OrientedParticle(int lifespan, bool alive) :
21 BaseParticle(lifespan, alive) {
22 set_oriented(true);
23}
24
25/**
26 * copy constructor
27 */
32
33/**
34 * simple destructor
35 */
39
40/**
41 * simple destructor
42 */
44make_copy() const {
45 return new OrientedParticle(*this);
46}
47
48/**
49 * particle init routine
50 */
52init() {
53}
54
55/**
56 * particle death routine
57 */
59die() {
60}
61
62/**
63 * particle update routine. This NEEDS to be filled in with quaternion slerp
64 * stuff, or oriented particles will not rotate.
65 */
69
70/**
71 * Write a string representation of this instance to <out>.
72 */
74output(std::ostream &out) const {
75 #ifndef NDEBUG //[
76 out<<"OrientedParticle";
77 #endif //] NDEBUG
78}
79
80/**
81 * Write a string representation of this instance to <out>.
82 */
84write(std::ostream &out, int indent) const {
85 #ifndef NDEBUG //[
86 out.width(indent); out<<""; out<<"OrientedParticle:\n";
88 #endif //] NDEBUG
89}
An individual, physically-modelable particle abstract base class.
virtual void write(std::ostream &out, int indent=0) const
Write a string representation of this instance to <out>.
Describes a particle that has angular characteristics (velocity, orientation).
virtual ~OrientedParticle()
simple destructor
OrientedParticle(int lifespan=0, bool alive=false)
simple constructor
virtual void update()
particle update routine.
virtual void init()
particle init routine
virtual PhysicsObject * make_copy() const
simple destructor
virtual void die()
particle death routine
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>.
A body on which physics will be applied.
set_oriented
Set flag to determine whether this object should do any rotation or orientation calculations.
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.