Panda3D
bulletSoftBodyMaterial.cxx
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 bulletSoftBodyMaterial.cxx
10  * @author enn0x
11  * @date 2011-03-19
12  */
13 
14 #include "bulletSoftBodyMaterial.h"
15 
16 #include "bulletWorld.h"
17 
18 /**
19  *
20  */
21 BulletSoftBodyMaterial::
22 BulletSoftBodyMaterial(btSoftBody::Material &material) : _material(material) {
23 
24 }
25 
26 /**
27  * Getter for the property m_kLST.
28  */
29 PN_stdfloat BulletSoftBodyMaterial::
30 get_linear_stiffness() const {
31  LightMutexHolder holder(BulletWorld::get_global_lock());
32 
33  return (PN_stdfloat)_material.m_kLST;
34 }
35 
36 /**
37  * Setter for the property m_kLST.
38  */
40 set_linear_stiffness(PN_stdfloat value) {
41  LightMutexHolder holder(BulletWorld::get_global_lock());
42 
43  _material.m_kLST = (btScalar)value;
44 }
45 
46 /**
47  * Getter for the property m_kAST.
48  */
49 PN_stdfloat BulletSoftBodyMaterial::
50 get_angular_stiffness() const {
51  LightMutexHolder holder(BulletWorld::get_global_lock());
52 
53  return (PN_stdfloat)_material.m_kAST;
54 }
55 
56 /**
57  * Setter for the property m_kAST.
58  */
60 set_angular_stiffness(PN_stdfloat value) {
61  LightMutexHolder holder(BulletWorld::get_global_lock());
62 
63  _material.m_kAST = (btScalar)value;
64 }
65 
66 /**
67  * Getter for the property m_kVST.
68  */
69 PN_stdfloat BulletSoftBodyMaterial::
70 get_volume_preservation() const {
71  LightMutexHolder holder(BulletWorld::get_global_lock());
72 
73  return (PN_stdfloat)_material.m_kVST;
74 }
75 
76 /**
77  * Setter for the property m_kVST.
78  */
80 set_volume_preservation(PN_stdfloat value) {
81  LightMutexHolder holder(BulletWorld::get_global_lock());
82 
83  _material.m_kVST = (btScalar)value;
84 }
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
set_volume_preservation
Setter for the property m_kVST.
Similar to MutexHolder, but for a light mutex.
set_linear_stiffness
Setter for the property m_kLST.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
set_angular_stiffness
Setter for the property m_kAST.