~robot3d-team/robot3d/trunk

« back to all changes in this revision

Viewing changes to inc/srCore/actuator/wheelActuator.h

  • Committer: Anne van Rossum
  • Date: 2010-08-10 15:58:55 UTC
  • Revision ID: anne@gamix-20100810155855-kve7x2vwouagdij9
Initial import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//! Basic wheel class.
 
2
 
 
3
/*!
 
4
 *
 
5
 * This class simulates a steerable wheel. It uses the ode Hinge2 joint.
 
6
 *
 
7
 * Note: Currently this class is not in use and therefore not up-to-date or even valid.
 
8
 *
 
9
 * @author Lutz Winkler
 
10
 *
 
11
 */
 
12
 
 
13
#ifndef WHEELACTOR_H_
 
14
#define WHEELACTOR_H_
 
15
 
 
16
#include <dtCore/dt.h>
 
17
#include <dtCore/object.h>
 
18
#include <dtCore/globals.h>
 
19
#include <dtCore/transform.h>
 
20
#include <dtGame/gameactor.h>
 
21
#include <dtCore/refptr.h>
 
22
 
 
23
 
 
24
#include <osg/Node>
 
25
#include <osgDB/ReadFile>
 
26
 
 
27
#include <ode/ode.h>
 
28
 
 
29
#include "actuatorBase.h"
 
30
 
 
31
namespace srCore {
 
32
 
 
33
class WheelActuator : public ActuatorBase
 
34
{
 
35
public:
 
36
        WheelActuator(const std::string name,  const std::string type);
 
37
        virtual ~WheelActuator();
 
38
 
 
39
        //! initializes the connector. Needs to be called before using the wheel.
 
40
        void init(      dtCore::RefPtr<BodyBase> myBody1, dtCore::RefPtr<BodyBase> myBody2,
 
41
                                float anchorX, float anchorY, float anchorZ,
 
42
                                float axis1_X, float axis1_Y, float axis1_Z,
 
43
                                float axis2_X, float axis2_Y, float axis2_Z);
 
44
 
 
45
        //Todo: one time there should not be the need anymore to access the joint directly:
 
46
        dJointID getWheel();
 
47
 
 
48
        void registerActuator();
 
49
 
 
50
        //! Sets ode parameters for the joint. For more Information, see www.ode.org/ode-latest-user-guide.org.
 
51
        void setODEParameter(int parameter, float value);
 
52
 
 
53
protected:
 
54
        dJointID joint;
 
55
};
 
56
 
 
57
}
 
58
 
 
59
#endif /*WHEELACTOR_H_*/