addAMotor() more complete
git-svn-id: svn://anubis/anaglym/trunk@230 99a6e188-d820-4881-8870-2d33a10e2619
This commit is contained in:
parent
044e088b2a
commit
5f859d9101
@ -96,6 +96,7 @@ Engine::Engine(const string & path, Video & video)
|
|||||||
: m_video(video)
|
: m_video(video)
|
||||||
{
|
{
|
||||||
m_next_object_index = 1;
|
m_next_object_index = 1;
|
||||||
|
m_next_joint_index = 1;
|
||||||
m_next_text_index = 1;
|
m_next_text_index = 1;
|
||||||
m_eye[0] = 0;
|
m_eye[0] = 0;
|
||||||
m_eye[1] = -1;
|
m_eye[1] = -1;
|
||||||
@ -306,7 +307,9 @@ int Engine::addAMotor(Object * o1, Object * o2)
|
|||||||
if (o2 != NULL)
|
if (o2 != NULL)
|
||||||
b2 = o2->getBody();
|
b2 = o2->getBody();
|
||||||
dJointID j = dJointCreateAMotor(m_world.getWorldID(), 0);
|
dJointID j = dJointCreateAMotor(m_world.getWorldID(), 0);
|
||||||
/* TODO: finish */
|
int id = m_next_joint_index++;
|
||||||
|
m_joints[id] = j;
|
||||||
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Engine::removeObject(int id)
|
void Engine::removeObject(int id)
|
||||||
|
1
Engine.h
1
Engine.h
@ -213,6 +213,7 @@ class Engine
|
|||||||
std::map<int, Object *> m_objects;
|
std::map<int, Object *> m_objects;
|
||||||
std::map<int, dJointID> m_joints;
|
std::map<int, dJointID> m_joints;
|
||||||
int m_next_object_index;
|
int m_next_object_index;
|
||||||
|
int m_next_joint_index;
|
||||||
int m_next_text_index;
|
int m_next_text_index;
|
||||||
GLdouble m_eye[3];
|
GLdouble m_eye[3];
|
||||||
GLdouble m_center[3];
|
GLdouble m_center[3];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user