Bullet Collision Detection & Physics Library: btMultiBodyJointMotor.h Source File

Bullet Collision Detection & Physics Library

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

btMultiBodyJointMotor.h
Go to the documentation of this file.
1 /*
2 Bullet Continuous Collision Detection and Physics Library
3 Copyright (c) 2013 Erwin Coumans http://bulletphysics.org
4
5 This software is provided 'as-is', without any express or implied warranty.
6 In no event will the authors be held liable for any damages arising from the use of this software.
7 Permission is granted to anyone to use this software for any purpose,
8 including commercial applications, and to alter it and redistribute it freely,
9 subject to the following restrictions:
10
11 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
12 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
13 3. This notice may not be removed or altered from any source distribution.
14 */
15
17
18 #ifndef BT_MULTIBODY_JOINT_MOTOR_H
19 #define BT_MULTIBODY_JOINT_MOTOR_H
20
21 #include "btMultiBodyConstraint.h"
22 struct btSolverInfo;
23
24 class btMultiBodyJointMotor : public btMultiBodyConstraint
25 {
26 protected:
27
28
29 btScalar m_desiredVelocity;
30
31 public:
32
33 btMultiBodyJointMotor(btMultiBody* body, int link, btScalar desiredVelocity, btScalar maxMotorImpulse);
34 btMultiBodyJointMotor(btMultiBody* body, int link, int linkDoF, btScalar desiredVelocity, btScalar maxMotorImpulse);
35 virtual ~btMultiBodyJointMotor();
36
37 virtual int getIslandIdA() const;
38 virtual int getIslandIdB() const;
39
40 virtual void createConstraintRows(btMultiBodyConstraintArray& constraintRows,
41 btMultiBodyJacobianData& data,
42 const btContactSolverInfo& infoGlobal);
43
44 virtual void setVelocityTarget(btScalar velTarget)
45 {
46 m_desiredVelocity = velTarget;
47 }
48
49 virtual void debugDraw(class btIDebugDraw* drawer)
50 {
51 //todo(erwincoumans)
52 }
53 };
54
55 #endif //BT_MULTIBODY_JOINT_MOTOR_H
56
btMultiBodyJointMotor::getIslandIdB
virtual int getIslandIdB() const
Definition: btMultiBodyJointMotor.cpp:82
btMultiBodyJointMotor::debugDraw
virtual void debugDraw(class btIDebugDraw *drawer)
Definition: btMultiBodyJointMotor.h:49
btMultiBodyJointMotor::~btMultiBodyJointMotor
virtual ~btMultiBodyJointMotor()
Definition: btMultiBodyJointMotor.cpp:65
btMultiBodyJointMotor::setVelocityTarget
virtual void setVelocityTarget(btScalar velTarget)
Definition: btMultiBodyJointMotor.h:44
btAlignedObjectArray< btMultiBodySolverConstraint >
btMultiBodyConstraint.h
btMultiBodyJointMotor::btMultiBodyJointMotor
btMultiBodyJointMotor(btMultiBody *body, int link, btScalar desiredVelocity, btScalar maxMotorImpulse)
This file was written by Erwin Coumans.
Definition: btMultiBodyJointMotor.cpp:24
btMultiBody
Definition: btMultiBody.h:37
btMultiBodyJointMotor
Definition: btMultiBodyJointMotor.h:24
btMultiBodyConstraint
Definition: btMultiBodyConstraint.h:42
btMultiBodyJointMotor::getIslandIdA
virtual int getIslandIdA() const
Definition: btMultiBodyJointMotor.cpp:69
btIDebugDraw
The btIDebugDraw interface class allows hooking up a debug renderer to visually debug simulations...
Definition: btIDebugDraw.h:28
btMultiBodyJacobianData
Definition: btMultiBodyConstraint.h:28
btMultiBodyJointMotor::createConstraintRows
virtual void createConstraintRows(btMultiBodyConstraintArray &constraintRows, btMultiBodyJacobianData &data, const btContactSolverInfo &infoGlobal)
Definition: btMultiBodyJointMotor.cpp:98
btContactSolverInfo
Definition: btContactSolverInfo.h:65
btScalar
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
Definition: btScalar.h:278
btMultiBodyJointMotor::m_desiredVelocity
btScalar m_desiredVelocity
Definition: btMultiBodyJointMotor.h:29