Panda3D
 All Classes Functions Variables Enumerations
linearVectorForce.I
1 // Filename: linearVectorForce.I
2 // Created by: charles (21Jun00)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 ////////////////////////////////////////////////////////////////////
16 // Function : set_vector
17 // Access : Public
18 // Description : encapsulating wrapper
19 ////////////////////////////////////////////////////////////////////
20 INLINE void LinearVectorForce::
21 set_vector(const LVector3& v) {
22  _fvec = v;
23 }
24 
25 ////////////////////////////////////////////////////////////////////
26 // Function : set_vector
27 // Access : Public
28 // Description : piecewise encapsulating wrapper
29 ////////////////////////////////////////////////////////////////////
30 INLINE void LinearVectorForce::
31 set_vector(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z) {
32  _fvec.set(x, y, z);
33 }
34 
35 ////////////////////////////////////////////////////////////////////
36 // Function : get_local_vector
37 // Access : Public
38 // Description :
39 ////////////////////////////////////////////////////////////////////
40 INLINE LVector3 LinearVectorForce::
41 get_local_vector() const {
42  return _fvec;
43 }
44 
45 ////////////////////////////////////////////////////////////////////
46 // Function: LinearVectorForce::LinearVectorForce += LinearVectorForce
47 // Access: Public
48 // Description: Performs a memberwise addition between two LinearVectorForces.
49 ////////////////////////////////////////////////////////////////////
52  _fvec+=other._fvec;
53  // Should something happen with _amplitude?
54  return *this;
55 }
Simple directed vector force.
LinearVectorForce & operator+=(const LinearVectorForce &other)
Performs a memberwise addition between two LinearVectorForces.
This is a three-component vector distance (as opposed to a three-component point, which represents a ...
Definition: lvector3.h:100
void set_vector(const LVector3 &v)
encapsulating wrapper