Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/extern
diff options
context:
space:
mode:
authorErwin Coumans <blender@erwincoumans.com>2006-02-13 09:37:34 +0300
committerErwin Coumans <blender@erwincoumans.com>2006-02-13 09:37:34 +0300
commit11d253594faca7fb8d26e5e2ce33a61a2cd00092 (patch)
tree41c0f76e776b5f7bf5090226a8de556023cb8715 /extern
parentf55e45f855250a5693455fe0f7e13fe0f35c7814 (diff)
allow typed constraints (for future hinge/vehicles etc)
Diffstat (limited to 'extern')
-rwxr-xr-xextern/bullet/BulletDynamics/ConstraintSolver/TypedConstraint.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/extern/bullet/BulletDynamics/ConstraintSolver/TypedConstraint.h b/extern/bullet/BulletDynamics/ConstraintSolver/TypedConstraint.h
new file mode 100755
index 00000000000..a774af6d73a
--- /dev/null
+++ b/extern/bullet/BulletDynamics/ConstraintSolver/TypedConstraint.h
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2006 Erwin Coumans http://continuousphysics.com/Bullet/
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies.
+ * Erwin Coumans makes no representations about the suitability
+ * of this software for any purpose.
+ * It is provided "as is" without express or implied warranty.
+*/
+
+#ifndef TYPED_CONSTRAINT_H
+#define TYPED_CONSTRAINT_H
+
+
+
+//TypedConstraint is the baseclass for Bullet constraints and vehicles
+class TypedConstraint
+{
+ int m_userConstraintType;
+ int m_userConstraintId;
+
+public:
+
+ TypedConstraint()
+ : m_userConstraintId(-1),
+m_userConstraintType(-1)
+ {
+
+ }
+
+ int GetUserConstraintType() const
+ {
+ return m_userConstraintType ;
+ }
+
+ void SetUserConstraintType(int userConstraintType)
+ {
+ m_userConstraintType = userConstraintType;
+ };
+
+ void SetUserConstraintId(int uid)
+ {
+ m_userConstraintId = uid;
+ }
+
+ int GetUserConstraintId()
+ {
+ return m_userConstraintId;
+ }
+};
+
+#endif //TYPED_CONSTRAINT_H \ No newline at end of file