Panda3D

Loading...
Searching...
No Matches
bulletSoftBodyConfig.h
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 bulletSoftBodyConfig.h
10 * @author enn0x
11 * @date 2010-04-12
12 */
13
14#ifndef __BULLET_SOFT_BODY_CONFIG_H__
15#define __BULLET_SOFT_BODY_CONFIG_H__
16
17#include "pandabase.h"
18
19#include "bullet_includes.h"
20
21#include "numeric_types.h"
22
23/**
24 *
25 */
26 class EXPCL_PANDABULLET BulletSoftBodyConfig {
27
28PUBLISHED:
29 INLINE ~BulletSoftBodyConfig();
30
31 enum CollisionFlag {
32 CF_rigid_vs_soft_mask = 0x000f, // RVSmask: Rigid versus soft mask
33 CF_sdf_rigid_soft = 0x0001, // SDF_RS: SDF based rigid vs soft
34 CF_cluster_rigid_soft = 0x0002, // CL_RS: Cluster vs convex rigid vs soft
35 CF_soft_vs_soft_mask = 0x0030, // SVSmask: Soft versus soft mask
36 CF_vertex_face_soft_soft = 0x0010, // VF_SS: Vertex vs face soft vs soft handling
37 CF_cluster_soft_soft = 0x0020, // CL_SS: Cluster vs cluster soft vs soft handling
38 CF_cluster_self = 0x0040, // CL_SELF: Cluster soft body self collision
39 };
40
41 enum AeroModel {
42 AM_vertex_point, // V_Point: Vertex normals are oriented toward velocity
43 AM_vertex_two_sided, // V_TwoSided: Vertex normals are fliped to match velocity
44 AM_vertex_one_sided, // V_OneSided: Vertex normals are taken as it is
45 AM_face_two_sided, // F_TwoSided: Face normals are fliped to match velocity
46 AM_face_one_sided, // F_OneSided: Face normals are taken as it is
47 };
48
49 void clear_all_collision_flags();
50 void set_collision_flag(CollisionFlag flag, bool value);
51 bool get_collision_flag(CollisionFlag flag) const;
52
53 void set_aero_model(AeroModel value);
54 AeroModel get_aero_model() const;
55
56 void set_velocities_correction_factor(PN_stdfloat value);
57 void set_damping_coefficient(PN_stdfloat value);
58 void set_drag_coefficient(PN_stdfloat value);
59 void set_lift_coefficient(PN_stdfloat value);
60 void set_pressure_coefficient(PN_stdfloat value);
61 void set_volume_conservation_coefficient(PN_stdfloat value);
62 void set_dynamic_friction_coefficient(PN_stdfloat value);
63 void set_pose_matching_coefficient(PN_stdfloat value);
64 void set_rigid_contacts_hardness(PN_stdfloat value);
65 void set_kinetic_contacts_hardness(PN_stdfloat value);
66 void set_soft_contacts_hardness(PN_stdfloat value);
67 void set_anchors_hardness(PN_stdfloat value);
68 void set_soft_vs_rigid_hardness(PN_stdfloat value);
69 void set_soft_vs_kinetic_hardness(PN_stdfloat value);
70 void set_soft_vs_soft_hardness(PN_stdfloat value);
71 void set_soft_vs_rigid_impulse_split(PN_stdfloat value);
72 void set_soft_vs_kinetic_impulse_split(PN_stdfloat value);
73 void set_soft_vs_soft_impulse_split(PN_stdfloat value);
74 void set_maxvolume(PN_stdfloat value);
75 void set_timescale(PN_stdfloat value);
76 void set_positions_solver_iterations(int value);
77 void set_velocities_solver_iterations(int value);
78 void set_drift_solver_iterations( int value);
79 void set_cluster_solver_iterations(int value);
80
81 PN_stdfloat get_velocities_correction_factor() const;
82 PN_stdfloat get_damping_coefficient() const;
83 PN_stdfloat get_drag_coefficient() const;
84 PN_stdfloat get_lift_coefficient() const;
85 PN_stdfloat get_pressure_coefficient() const;
86 PN_stdfloat get_volume_conservation_coefficient() const;
87 PN_stdfloat get_dynamic_friction_coefficient() const;
88 PN_stdfloat get_pose_matching_coefficient() const;
89 PN_stdfloat get_rigid_contacts_hardness() const;
90 PN_stdfloat get_kinetic_contacts_hardness() const;
91 PN_stdfloat get_soft_contacts_hardness() const;
92 PN_stdfloat get_anchors_hardness() const;
93 PN_stdfloat get_soft_vs_rigid_hardness() const;
94 PN_stdfloat get_soft_vs_kinetic_hardness() const;
95 PN_stdfloat get_soft_vs_soft_hardness() const;
96 PN_stdfloat get_soft_vs_rigid_impulse_split() const;
97 PN_stdfloat get_soft_vs_kinetic_impulse_split() const;
98 PN_stdfloat get_soft_vs_soft_impulse_split() const;
99 PN_stdfloat get_maxvolume() const;
100 PN_stdfloat get_timescale() const;
101 int get_positions_solver_iterations() const;
102 int get_velocities_solver_iterations() const;
103 int get_drift_solver_iterations() const;
104 int get_cluster_solver_iterations() const;
105
106 MAKE_PROPERTY(aero_model, get_aero_model, set_aero_model);
107 MAKE_PROPERTY(velocities_correction_factor, get_velocities_correction_factor, set_velocities_correction_factor);
108 MAKE_PROPERTY(damping_coefficient, get_damping_coefficient, set_damping_coefficient);
109 MAKE_PROPERTY(drag_coefficient, get_drag_coefficient, set_drag_coefficient);
110 MAKE_PROPERTY(lift_coefficient, get_lift_coefficient, set_lift_coefficient);
111 MAKE_PROPERTY(pressure_coefficient, get_pressure_coefficient, set_pressure_coefficient);
112 MAKE_PROPERTY(volume_conservation_coefficient, get_volume_conservation_coefficient, set_volume_conservation_coefficient);
113 MAKE_PROPERTY(dynamic_friction_coefficient, get_dynamic_friction_coefficient, set_dynamic_friction_coefficient);
114 MAKE_PROPERTY(pose_matching_coefficient, get_pose_matching_coefficient, set_pose_matching_coefficient);
115 MAKE_PROPERTY(rigid_contacts_hardness, get_rigid_contacts_hardness, set_rigid_contacts_hardness);
116 MAKE_PROPERTY(kinetic_contacts_hardness, get_kinetic_contacts_hardness, set_kinetic_contacts_hardness);
117 MAKE_PROPERTY(soft_contacts_hardness, get_soft_contacts_hardness, set_soft_contacts_hardness);
118 MAKE_PROPERTY(anchors_hardness, get_anchors_hardness, set_anchors_hardness);
119 MAKE_PROPERTY(soft_vs_rigid_hardness, get_soft_vs_rigid_hardness, set_soft_vs_rigid_hardness);
120 MAKE_PROPERTY(soft_vs_kinetic_hardness, get_soft_vs_kinetic_hardness, set_soft_vs_kinetic_hardness);
121 MAKE_PROPERTY(soft_vs_soft_hardness, get_soft_vs_soft_hardness, set_soft_vs_soft_hardness);
122 MAKE_PROPERTY(soft_vs_rigid_impulse_split, get_soft_vs_rigid_impulse_split, set_soft_vs_rigid_impulse_split);
123 MAKE_PROPERTY(soft_vs_kinetic_impulse_split, get_soft_vs_kinetic_impulse_split, set_soft_vs_kinetic_impulse_split);
124 MAKE_PROPERTY(soft_vs_soft_impulse_split, get_soft_vs_soft_impulse_split, set_soft_vs_soft_impulse_split);
125 MAKE_PROPERTY(maxvolume, get_maxvolume, set_maxvolume);
126 MAKE_PROPERTY(timescale, get_timescale, set_timescale);
127 MAKE_PROPERTY(positions_solver_iterations, get_positions_solver_iterations, set_positions_solver_iterations);
128 MAKE_PROPERTY(velocities_solver_iterations, get_velocities_solver_iterations, set_velocities_solver_iterations);
129 MAKE_PROPERTY(drift_solver_iterations, get_drift_solver_iterations, set_drift_solver_iterations);
130 MAKE_PROPERTY(cluster_solver_iterations, get_cluster_solver_iterations, set_cluster_solver_iterations);
131
132 public:
133 BulletSoftBodyConfig(btSoftBody::Config &cfg);
134
135 private:
136 btSoftBody::Config &_cfg;
137};
138
139#include "bulletSoftBodyConfig.I"
140
141#endif // __BULLET_SOFT_BODY_CONFIG_H__
bulletSoftBodyConfig.I
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
bullet_includes.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
BulletSoftBodyConfig::set_dynamic_friction_coefficient
set_dynamic_friction_coefficient
Setter for property kDF.
Definition bulletSoftBodyConfig.h:113
BulletSoftBodyConfig::get_soft_vs_rigid_impulse_split
get_soft_vs_rigid_impulse_split
Getter for property kSR_SPLT_CL.
Definition bulletSoftBodyConfig.h:122
BulletSoftBodyConfig::set_anchors_hardness
set_anchors_hardness
Setter for property kAHR.
Definition bulletSoftBodyConfig.h:118
BulletSoftBodyConfig::get_volume_conservation_coefficient
get_volume_conservation_coefficient
Getter for property kVC.
Definition bulletSoftBodyConfig.h:112
BulletSoftBodyConfig::get_soft_vs_kinetic_hardness
get_soft_vs_kinetic_hardness
Getter for property kSKHR_CL.
Definition bulletSoftBodyConfig.h:120
BulletSoftBodyConfig::get_rigid_contacts_hardness
get_rigid_contacts_hardness
Getter for property kCHR.
Definition bulletSoftBodyConfig.h:115
BulletSoftBodyConfig::set_kinetic_contacts_hardness
set_kinetic_contacts_hardness
Setter for property kKHR.
Definition bulletSoftBodyConfig.h:116
BulletSoftBodyConfig::get_lift_coefficient
get_lift_coefficient
Getter for property kLF.
Definition bulletSoftBodyConfig.h:110
BulletSoftBodyConfig::set_maxvolume
set_maxvolume
Setter for property maxvolume.
Definition bulletSoftBodyConfig.h:125
BulletSoftBodyConfig::set_lift_coefficient
set_lift_coefficient
Setter for property kLF.
Definition bulletSoftBodyConfig.h:110
BulletSoftBodyConfig::set_soft_vs_soft_impulse_split
set_soft_vs_soft_impulse_split
Setter for property kSS_SPLT_CL.
Definition bulletSoftBodyConfig.h:124
BulletSoftBodyConfig::get_drag_coefficient
get_drag_coefficient
Getter for property kDG.
Definition bulletSoftBodyConfig.h:109
BulletSoftBodyConfig::set_cluster_solver_iterations
set_cluster_solver_iterations
Setter for property citerations.
Definition bulletSoftBodyConfig.h:130
BulletSoftBodyConfig::set_soft_contacts_hardness
set_soft_contacts_hardness
Setter for property kSHR.
Definition bulletSoftBodyConfig.h:117
BulletSoftBodyConfig::get_kinetic_contacts_hardness
get_kinetic_contacts_hardness
Getter for property kKHR.
Definition bulletSoftBodyConfig.h:116
BulletSoftBodyConfig::get_cluster_solver_iterations
get_cluster_solver_iterations
Getter for property citerations.
Definition bulletSoftBodyConfig.h:130
BulletSoftBodyConfig::set_drift_solver_iterations
set_drift_solver_iterations
Setter for property diterations.
Definition bulletSoftBodyConfig.h:129
BulletSoftBodyConfig::set_soft_vs_kinetic_impulse_split
set_soft_vs_kinetic_impulse_split
Setter for property kSK_SPLT_CL.
Definition bulletSoftBodyConfig.h:123
BulletSoftBodyConfig::get_drift_solver_iterations
get_drift_solver_iterations
Getter for property diterations.
Definition bulletSoftBodyConfig.h:129
BulletSoftBodyConfig::get_soft_contacts_hardness
get_soft_contacts_hardness
Getter for property kSHR.
Definition bulletSoftBodyConfig.h:117
BulletSoftBodyConfig::get_soft_vs_kinetic_impulse_split
get_soft_vs_kinetic_impulse_split
Getter for property kSK_SPLT_CL.
Definition bulletSoftBodyConfig.h:123
BulletSoftBodyConfig::get_anchors_hardness
get_anchors_hardness
Getter for property kAHR.
Definition bulletSoftBodyConfig.h:118
BulletSoftBodyConfig::get_soft_vs_soft_hardness
get_soft_vs_soft_hardness
Getter for property kSSHR_CL.
Definition bulletSoftBodyConfig.h:121
BulletSoftBodyConfig::set_timescale
set_timescale
Setter for property timescale.
Definition bulletSoftBodyConfig.h:126
BulletSoftBodyConfig::set_damping_coefficient
set_damping_coefficient
Setter for property kDP.
Definition bulletSoftBodyConfig.h:108
BulletSoftBodyConfig::get_positions_solver_iterations
get_positions_solver_iterations
Getter for property piterations.
Definition bulletSoftBodyConfig.h:127
BulletSoftBodyConfig::set_soft_vs_rigid_impulse_split
set_soft_vs_rigid_impulse_split
Setter for property kSR_SPLT_CL.
Definition bulletSoftBodyConfig.h:122
BulletSoftBodyConfig::get_dynamic_friction_coefficient
get_dynamic_friction_coefficient
Getter for property kDF.
Definition bulletSoftBodyConfig.h:113
BulletSoftBodyConfig::set_soft_vs_rigid_hardness
set_soft_vs_rigid_hardness
Setter for property kSRHR_CL.
Definition bulletSoftBodyConfig.h:119
BulletSoftBodyConfig::set_drag_coefficient
set_drag_coefficient
Setter for property kDG.
Definition bulletSoftBodyConfig.h:109
BulletSoftBodyConfig::get_velocities_correction_factor
get_velocities_correction_factor
Getter for property kVCF.
Definition bulletSoftBodyConfig.h:107
BulletSoftBodyConfig::set_volume_conservation_coefficient
set_volume_conservation_coefficient
Setter for property kVC.
Definition bulletSoftBodyConfig.h:112
BulletSoftBodyConfig::set_pose_matching_coefficient
set_pose_matching_coefficient
Setter for property kMT.
Definition bulletSoftBodyConfig.h:114
BulletSoftBodyConfig::get_soft_vs_soft_impulse_split
get_soft_vs_soft_impulse_split
Getter for property kSS_SPLT_CL.
Definition bulletSoftBodyConfig.h:124
BulletSoftBodyConfig::set_pressure_coefficient
set_pressure_coefficient
Setter for property kPR.
Definition bulletSoftBodyConfig.h:111
BulletSoftBodyConfig::set_velocities_correction_factor
set_velocities_correction_factor
Setter for property kVCF.
Definition bulletSoftBodyConfig.h:107
BulletSoftBodyConfig::get_soft_vs_rigid_hardness
get_soft_vs_rigid_hardness
Getter for property kSRHR_CL.
Definition bulletSoftBodyConfig.h:119
BulletSoftBodyConfig::set_positions_solver_iterations
set_positions_solver_iterations
Setter for property piterations.
Definition bulletSoftBodyConfig.h:127
BulletSoftBodyConfig::get_timescale
get_timescale
Getter for property timescale.
Definition bulletSoftBodyConfig.h:126
BulletSoftBodyConfig::get_pose_matching_coefficient
get_pose_matching_coefficient
Getter for property kMT.
Definition bulletSoftBodyConfig.h:114
BulletSoftBodyConfig::get_pressure_coefficient
get_pressure_coefficient
Getter for property kPR.
Definition bulletSoftBodyConfig.h:111
BulletSoftBodyConfig::get_maxvolume
get_maxvolume
Getter for property maxvolume.
Definition bulletSoftBodyConfig.h:125
BulletSoftBodyConfig::get_velocities_solver_iterations
get_velocities_solver_iterations
Getter for property viterations.
Definition bulletSoftBodyConfig.h:128
BulletSoftBodyConfig::set_soft_vs_soft_hardness
set_soft_vs_soft_hardness
Setter for property kSSHR_CL.
Definition bulletSoftBodyConfig.h:121
BulletSoftBodyConfig::set_velocities_solver_iterations
set_velocities_solver_iterations
Setter for property viterations.
Definition bulletSoftBodyConfig.h:128
BulletSoftBodyConfig::get_damping_coefficient
get_damping_coefficient
Getter for property kDP.
Definition bulletSoftBodyConfig.h:108
BulletSoftBodyConfig::set_soft_vs_kinetic_hardness
set_soft_vs_kinetic_hardness
Setter for property kSKHR_CL.
Definition bulletSoftBodyConfig.h:120
BulletSoftBodyConfig::set_rigid_contacts_hardness
set_rigid_contacts_hardness
Setter for property kCHR.
Definition bulletSoftBodyConfig.h:115
numeric_types.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
pandabase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.