Panda3D
Main Page
Classes
Files
File List
All
Classes
Functions
Variables
Enumerations
panda
src
physics
linearFrictionForce.I
1
// Filename: linearFrictionForce.I
2
// Created by: charles (31Jul00)
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_coef
17
// Access : public
18
////////////////////////////////////////////////////////////////////
19
INLINE
void
LinearFrictionForce::
20
set_coef(PN_stdfloat coef) {
21
// friction shouldn't be outside of [0, 1]
22
if
(coef < 0.0f) {
23
coef = 0.0f;
24
}
else
if
(coef > 1.0f) {
25
coef = 1.0f;
26
}
27
_coef = coef;
28
}
29
30
////////////////////////////////////////////////////////////////////
31
// Function : get_coef
32
// Access : public
33
////////////////////////////////////////////////////////////////////
34
INLINE PN_stdfloat LinearFrictionForce::
35
get_coef()
const
{
36
return
_coef;
37
}
Generated on Mon Feb 1 2016 13:44:35 for Panda3D by
1.8.5