Panda3D
Loading...
Searching...
No Matches
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
15
16#include "bulletWorld.h"
17
18/**
19 *
20 */
21BulletSoftBodyMaterial::
22BulletSoftBodyMaterial(btSoftBody::Material &material) : _material(material) {
23
24}
25
26/**
27 * Getter for the property m_kLST.
28 */
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 */
40set_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 */
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 */
60set_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 */
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 */
80set_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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
get_angular_stiffness
Getter for the property m_kAST.
get_linear_stiffness
Getter for the property m_kLST.
set_linear_stiffness
Setter for the property m_kLST.
set_angular_stiffness
Setter for the property m_kAST.
get_volume_preservation
Getter for the property m_kVST.
set_volume_preservation
Setter for the property m_kVST.
Similar to MutexHolder, but for a light mutex.