Panda3D
linearControlForce.I
1 // Filename: linearControlForce.I
2 // Created by: Dave Schuyler (2006)
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 : clear_physics_object
17 // Access : Public
18 // Description : encapsulating wrapper
19 ////////////////////////////////////////////////////////////////////
20 INLINE void LinearControlForce::
22  _physics_object = (const PhysicsObject*)NULL;
23 }
24 
25 ////////////////////////////////////////////////////////////////////
26 // Function : set_physics_object
27 // Access : Public
28 // Description : encapsulating wrapper
29 ////////////////////////////////////////////////////////////////////
30 INLINE void LinearControlForce::
32  _physics_object = po;
33 }
34 
35 ////////////////////////////////////////////////////////////////////
36 // Function : get_physics_object
37 // Access : Public
38 // Description : piecewise encapsulating wrapper
39 ////////////////////////////////////////////////////////////////////
40 INLINE CPT(PhysicsObject) LinearControlForce::
41 get_physics_object() const {
42  return _physics_object;
43 }
44 
45 ////////////////////////////////////////////////////////////////////
46 // Function : set_vector
47 // Access : Public
48 // Description : encapsulating wrapper
49 ////////////////////////////////////////////////////////////////////
50 INLINE void LinearControlForce::
51 set_vector(const LVector3& v) {
52  _fvec = v;
53 }
54 
55 ////////////////////////////////////////////////////////////////////
56 // Function : set_vector
57 // Access : Public
58 // Description : piecewise encapsulating wrapper
59 ////////////////////////////////////////////////////////////////////
60 INLINE void LinearControlForce::
61 set_vector(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z) {
62  _fvec.set(x, y, z);
63 }
64 
65 ////////////////////////////////////////////////////////////////////
66 // Function : get_local_vector
67 // Access : Public
68 // Description :
69 ////////////////////////////////////////////////////////////////////
70 INLINE LVector3 LinearControlForce::
71 get_local_vector() const {
72  return _fvec;
73 }
A body on which physics will be applied.
Definition: physicsObject.h:29
This is a three-component vector distance (as opposed to a three-component point, which represents a ...
Definition: lvector3.h:100
void set_physics_object(const PhysicsObject *po)
encapsulating wrapper
void clear_physics_object()
encapsulating wrapper