Panda3D
 All Classes Functions Variables Enumerations
physxMotorDesc.cxx
1 // Filename: physxMotorDesc.cxx
2 // Created by: enn0x (28Sep09)
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 #include "physxMotorDesc.h"
16 
17 ////////////////////////////////////////////////////////////////////
18 // Function: PhysxMotorDesc::set_vel_target
19 // Access: Published
20 // Description:
21 ////////////////////////////////////////////////////////////////////
22 void PhysxMotorDesc::
23 set_vel_target(float velTarget) {
24 
25  _desc.velTarget = velTarget;
26 }
27 
28 ////////////////////////////////////////////////////////////////////
29 // Function: PhysxMotorDesc::set_max_force
30 // Access: Published
31 // Description:
32 ////////////////////////////////////////////////////////////////////
33 void PhysxMotorDesc::
34 set_max_force(float maxForce) {
35 
36  _desc.maxForce = maxForce;
37 }
38 
39 ////////////////////////////////////////////////////////////////////
40 // Function: PhysxMotorDesc::set_free_spin
41 // Access: Published
42 // Description:
43 ////////////////////////////////////////////////////////////////////
44 void PhysxMotorDesc::
45 set_free_spin(bool freeSpin) {
46 
47  _desc.freeSpin = (NX_BOOL)freeSpin;
48 }
49 
50 ////////////////////////////////////////////////////////////////////
51 // Function: PhysxMotorDesc::get_vel_target
52 // Access: Published
53 // Description:
54 ////////////////////////////////////////////////////////////////////
55 float PhysxMotorDesc::
56 get_vel_target() const {
57 
58  return _desc.velTarget;
59 }
60 
61 ////////////////////////////////////////////////////////////////////
62 // Function: PhysxMotorDesc::get_max_force
63 // Access: Published
64 // Description:
65 ////////////////////////////////////////////////////////////////////
66 float PhysxMotorDesc::
67 get_max_force() const {
68 
69  return _desc.maxForce;
70 }
71 
72 ////////////////////////////////////////////////////////////////////
73 // Function: PhysxMotorDesc::get_free_spin
74 // Access: Published
75 // Description:
76 ////////////////////////////////////////////////////////////////////
77 bool PhysxMotorDesc::
78 get_free_spin() const {
79 
80  return (_desc.freeSpin) ? true : false;
81 }
82