Panda3D
linearVectorForce.I
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 linearVectorForce.I
10  * @author charles
11  * @date 2000-06-21
12  */
13 
14 /**
15  * encapsulating wrapper
16  */
17 INLINE void LinearVectorForce::
18 set_vector(const LVector3& v) {
19  _fvec = v;
20 }
21 
22 /**
23  * piecewise encapsulating wrapper
24  */
25 INLINE void LinearVectorForce::
26 set_vector(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z) {
27  _fvec.set(x, y, z);
28 }
29 
30 /**
31  *
32  */
33 INLINE LVector3 LinearVectorForce::
34 get_local_vector() const {
35  return _fvec;
36 }
37 
38 /**
39  * Performs a memberwise addition between two LinearVectorForces.
40  */
43  _fvec+=other._fvec;
44  // Should something happen with _amplitude?
45  return *this;
46 }
Simple directed vector force.
LinearVectorForce & operator+=(const LinearVectorForce &other)
Performs a memberwise addition between two LinearVectorForces.
void set_vector(const LVector3 &v)
encapsulating wrapper