Index: /branches/camera/src/world_entities/blackscreen.cc
===================================================================
--- /branches/camera/src/world_entities/blackscreen.cc	(revision 10235)
+++ /branches/camera/src/world_entities/blackscreen.cc	(revision 10236)
@@ -108,5 +108,9 @@
 glEnable(GL_BLEND);	// Turn Blending On
 
-
+//
+//  Coord schould depend on CameraTarget
+//
+//
+//
 
 glColor4f(0, 0, 0, i);
Index: /branches/camera/src/world_entities/camera.cc
===================================================================
--- /branches/camera/src/world_entities/camera.cc	(revision 10235)
+++ /branches/camera/src/world_entities/camera.cc	(revision 10236)
@@ -22,5 +22,5 @@
 #include "shell_command.h"
 #include "targets.h"
-#include <iostream.h>
+
 
 
@@ -324,11 +324,6 @@
 void CameraTarget::detach()
 {
-  glLoadIdentity();
-
-//Movemet
-  State::getCameraNode()->setParentSoft(PNode::getNullParent());
-
-//LookAt
- // State::getCameraTargetNode()->setParentSoft(PNode::getNullParent());
+  State::getCameraNode()->setParentSoft(target);
+  State::getCameraTargetNode()->setParentSoft(target);
 }
 
@@ -344,4 +339,6 @@
   State::getCameraTargetNode()->setParentSoft(object);
 }
+
+
 
 
@@ -366,5 +363,4 @@
     glLoadIdentity();
     target->shiftCoor(speed*tmpVec.x, speed*tmpVec.y, speed*tmpVec.z);
-    // cout << "%%" << tmpVec.x << "%%";
 
   }
@@ -403,17 +399,8 @@
 void CameraTarget::test()
 {
-  glLoadIdentity();
+glLoadIdentity();
 
 atach(target);
 
-//tar->setRelCoorSoft(1000,1000,1000);
-
-
-  //Vector* vec=new Vector(5000,5000,5000);
-  //translateNow(vec);
-  //glMatrixMode (GL_MODELVIEW);
-  //glLoadIdentity();
-  //glTranslatef(100, 100, 100);
- // State::getCamera()->getTargetNode()->setRelCoor(100,100,100);
 }
 
@@ -422,6 +409,5 @@
 {
   trans(-200, 0, 0);
-  //target->setAbsCoor(target->getAbsCoorX()-200, target->getAbsCoorY(), target->getAbsCoorZ());
-}
-
-
+}
+
+
Index: /branches/camera/src/world_entities/camera.h
===================================================================
--- /branches/camera/src/world_entities/camera.h	(revision 10235)
+++ /branches/camera/src/world_entities/camera.h	(revision 10236)
@@ -95,4 +95,5 @@
   float speed;
   PNode* target;
+  PNode* freeTarget;
 
 public:
Index: /branches/camera/src/world_entities/cameraman.cc
===================================================================
--- /branches/camera/src/world_entities/cameraman.cc	(revision 10235)
+++ /branches/camera/src/world_entities/cameraman.cc	(revision 10236)
@@ -26,4 +26,5 @@
   currentCam=State::getCamera();
   this->cameras.push_back(currentCam);
+  currentCam->target->detach();
 
 }
@@ -34,6 +35,5 @@
   Camera* newCamera=new Camera();
   this->cameras.push_back(newCamera);
-  //cameraList.size();
-  //cameraList[4]
+  newCamera->target->detach();
 }
 
@@ -64,9 +64,14 @@
 void cameraman::changeTarget(int camNo, PNode* target)
 {
-  cameras[camNo]->target->atach(target);
+  cameras[camNo]->lookAt(target);
 }
 
 
 void cameraman::changeCurrTarget(PNode* target)
+{
+  currentCam->lookAt(target);
+}
+
+void cameraman::atachCurrTarget(PNode* target)
 {
   currentCam->target->atach(target);
Index: /branches/camera/src/world_entities/cameraman.h
===================================================================
--- /branches/camera/src/world_entities/cameraman.h	(revision 10235)
+++ /branches/camera/src/world_entities/cameraman.h	(revision 10236)
@@ -22,4 +22,5 @@
     void changeTarget(int camNo, PNode* target);
     void changeCurrTarget(PNode* target);
+    void atachCurrTarget(PNode* target);
     void jumpCam(int x, int y, int z, int camNo);
     void jumpCurrCam(int x, int y, int z);
Index: /branches/camera/src/world_entities/test_entity.cc
===================================================================
--- /branches/camera/src/world_entities/test_entity.cc	(revision 10235)
+++ /branches/camera/src/world_entities/test_entity.cc	(revision 10236)
@@ -25,6 +25,4 @@
 
 
-#include "material.h"
-
 #include "state.h"
 
@@ -35,6 +33,5 @@
 CREATE_FACTORY(TestEntity);
 
-float i=0;
-bool state=1;
+
 
 /**
@@ -73,12 +70,15 @@
   this->registerObject(this, TestEntity::_objectList);
   this->toList(OM_GROUP_00);
+  CM= new cameraman();
+  test();
+}
 
-  /*this->material = new Material();
-  this->material->setIllum(3);
-  this->material->setDiffuse(1.0,1.0,1.0);
-  this->material->setSpecular(0.0,0.0,0.0);
-  this->material->setAmbient(1.0, 1.0, 1.0);
-  this->material->setDiffuseMap("maps/TE2.tga");*/
+void TestEntity::test()
+{
+  CM->moveCurrCam(-200, 0, 0);
+  CM->createCam();
+  CM->moveCam(0, -200, 0, 1);
 }
+
 
 
@@ -94,40 +94,5 @@
 void TestEntity::draw() const
 {
-//   if(!mediaLoaded)
-//     false;
 
-//  glPushAttrib(GL_ENABLE_BIT);
-//  glDisable(GL_LIGHTING);
-//   glDisable(GL_BLEND);
-//
-//   glEnable(GL_TEXTURE_2D);
-//   glBindTexture(GL_TEXTURE_2D, media_container->getFrameTexture(counter));
-
-//  glPushMatrix();
- /* glTranslatef (this->getAbsCoor ().x,
-                this->getAbsCoor ().y,
-                this->getAbsCoor ().z);
-  glRotatef(axis, 0.0f, 1.0f, 0.0f);*/
-//PRINTF(0)("axis: %f\n", axis);
-//glEnable(GL_BLEND);	// Turn Blending On
-
-
-
-//glColor4f(0, 0, 0, i);
-
-//  glBegin(GL_QUADS);
-//    glVertex3f(-1.0f, -100.0f, -100.0f);
-//     glTexCoord2f(1.0f, 1.0f);
-//    glVertex3f(-1.0f, -100.0f, 100.0f);
-//     glTexCoord2f(0.0f, 1.0f);
-//    glVertex3f(-1.0f, 100.0f, 100.0f);
-//     glTexCoord2f(0.0f, 0.0f);
-//    glVertex3f(-1.0f, 100.0f, -100.0f);
-//     glTexCoord2f(1.0f, 0.0f);
-
-//  glEnd();
-
-//  glPopMatrix();
-//  glPopAttrib();
 }
 
@@ -137,8 +102,5 @@
 void TestEntity::tick (float time)
 {
-//  if (state==0 && i==1)
-//    i=0;
-//  if (state==1 && i<=1)
-//    i=i+0.005;
+
 }
 
@@ -146,4 +108,4 @@
 void  TestEntity::changeState (bool sta)
 {
-  state=sta;
+
 }
Index: /branches/camera/src/world_entities/test_entity.h
===================================================================
--- /branches/camera/src/world_entities/test_entity.h	(revision 10235)
+++ /branches/camera/src/world_entities/test_entity.h	(revision 10236)
@@ -3,4 +3,5 @@
 
 #include "world_entity.h"
+#include "cameraman.h"
 
 class TiXmlElement;
@@ -13,5 +14,5 @@
   private:
 
-    Material*       material;
+  cameraman* CM;
 
   public:
@@ -22,5 +23,5 @@
     void init();
     virtual void loadParams(const TiXmlElement* root);
-
+    void test();
     void changeState (bool);
     virtual void tick (float time);
