[osg-users] [osgPlugins] Problem with Collada-dom

2009-11-11 Thread Felipe Lemus
Hi guys,

Thanks for your help. I am having some problems with the installation of 
Collada-dom. I am trying to install in my computer with Linux. When I execute 
this line make -f Makefile.linux, it starts to compile but at the end it 
generates the next error:

make[1]: Entering directory `/home/caba/collada-dom/rt'
Compiling src/Crt/1.4/CrtSceneRead.cpp to build/linux-1.4/obj/CrtSceneRead.o
In file included from include/1.4/Crt/CrtScene.h:11,
 from src/Crt/1.4/CrtSceneRead.cpp:15:
include/Crt/CrtAnimation.h:23: error: ‘string’ was not declared in this scope
include/Crt/CrtAnimation.h:23: error: template argument 1 is invalid
include/Crt/CrtAnimation.h:23: error: template argument 3 is invalid
include/Crt/CrtAnimation.h:23: error: template argument 4 is invalid
include/Crt/CrtAnimation.h:231: error: ‘string’ was not declared in this scope
include/Crt/CrtAnimation.h:231: error: template argument 1 is invalid
include/Crt/CrtAnimation.h:231: error: template argument 3 is invalid
include/Crt/CrtAnimation.h:231: error: template argument 4 is invalid
include/Crt/CrtAnimation.h:232: error: ‘string’ was not declared in this scope
include/Crt/CrtAnimation.h:232: error: template argument 1 is invalid
include/Crt/CrtAnimation.h:232: error: template argument 3 is invalid
include/Crt/CrtAnimation.h:232: error: template argument 4 is invalid
In file included from include/Crt/CrtSkin.h:16,
 from include/Crt/CrtGeometry.h:11,
 from include/1.4/Crt/CrtScene.h:15,
 from src/Crt/1.4/CrtSceneRead.cpp:15:
include/Crt/CrtController.h:45: error: ‘string’ was not declared in this scope
include/Crt/CrtController.h:45: error: template argument 1 is invalid
include/Crt/CrtController.h:45: error: template argument 2 is invalid
In file included from ../fx/include/cfxPlatform.h:17,
 from ../fx/include/cfxSurface.h:15,
 from ../fx/include/cfxEffect.h:26,
 from ../fx/include/cfxLoader.h:25,
 from include/Crt/CrtGeometry.h:16,
 from include/1.4/Crt/CrtScene.h:15,
 from src/Crt/1.4/CrtSceneRead.cpp:15:
../fx/include/cfxLinux.h: In function ‘void cfxPrint(const char*, ...)’:
../fx/include/cfxLinux.h:39: warning: format not a string literal and no format 
arguments
In file included from external-libs/bullet/include/btBulletCollisionCommon.h:26,
 from external-libs/bullet/include/btBulletDynamicsCommon.h:20,
 from include/Crt/CrtPhysics.h:20,
 from include/1.4/Crt/CrtScene.h:24,
 from src/Crt/1.4/CrtSceneRead.cpp:15:
external-libs/bullet/include/BulletCollision/CollisionShapes/btBoxShape.h: In 
member function ‘virtual char* btBoxShape::getName() const’:
external-libs/bullet/include/BulletCollision/CollisionShapes/btBoxShape.h:255: 
warning: deprecated conversion from string constant to ‘char*’
In file included from external-libs/bullet/include/btBulletCollisionCommon.h:27,
 from external-libs/bullet/include/btBulletDynamicsCommon.h:20,
 from include/Crt/CrtPhysics.h:20,
 from include/1.4/Crt/CrtScene.h:24,
 from src/Crt/1.4/CrtSceneRead.cpp:15:
external-libs/bullet/include/BulletCollision/CollisionShapes/btSphereShape.h: 
In member function ‘virtual char* btSphereShape::getName() const’:
external-libs/bullet/include/BulletCollision/CollisionShapes/btSphereShape.h:46:
 warning: deprecated conversion from string constant to ‘char*’
In file included from external-libs/bullet/include/btBulletCollisionCommon.h:28,
 from external-libs/bullet/include/btBulletDynamicsCommon.h:20,
 from include/Crt/CrtPhysics.h:20,
 from include/1.4/Crt/CrtScene.h:24,
 from src/Crt/1.4/CrtSceneRead.cpp:15:
external-libs/bullet/include/BulletCollision/CollisionShapes/btCapsuleShape.h: 
In member function ‘virtual char* btCapsuleShape::getName() const’:
external-libs/bullet/include/BulletCollision/CollisionShapes/btCapsuleShape.h:43:
 warning: deprecated conversion from string constant to ‘char*’
In file included from external-libs/bullet/include/btBulletCollisionCommon.h:29,
 from external-libs/bullet/include/btBulletDynamicsCommon.h:20,
 from include/Crt/CrtPhysics.h:20,
 from include/1.4/Crt/CrtScene.h:24,
 from src/Crt/1.4/CrtSceneRead.cpp:15:
external-libs/bullet/include/BulletCollision/CollisionShapes/btCylinderShape.h: 
In member function ‘virtual char* btCylinderShape::getName() const’:
external-libs/bullet/include/BulletCollision/CollisionShapes/btCylinderShape.h:83:
 warning: deprecated conversion from string constant to ‘char*’
external-libs/bullet/include/BulletCollision/CollisionShapes/btCylinderShape.h: 
In member function ‘virtual char* btCylinderShapeX::getName() const’:

Re: [osg-users] Problem with DOF Nodes

2009-11-11 Thread Felipe Lemus
Hi Robert,

I could make it with Callbacks. Thank you very much for your help. 

Cheers,
Felipe

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=19478#19478





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Problem with DOF Nodes

2009-10-28 Thread Felipe Lemus
Hi,

first of all, thank you very much for your answer. But there is something that 
I do not understand, for example if I load a .3DS model in a osg Node, how I 
can transform it to a DOF Node to translate or rotate in real time? I thought 
that with a dynamic cast I could get it.

Thank you!

Cheers,
Felipe

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=18791#18791





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Problem with DOF Nodes

2009-10-28 Thread Felipe Lemus
Hi Robert,

thank you very much for your answer. My problem is that I need to translate an 
Helicopter (.3DS model), with a camera, in a scene and I need to  can change 
its course or even stop it in real time pressing a key of the keyboard or 
something like that. If I use animationpath I can not control the movement of 
the helicopter, it is a loop loaded in the beginning of the execution. I saw 
tutorial 8 and I thought that it will resolve my problem.

I will look for another way to do that, any idea is welcome...

Thank you!

Cheers,
Felipe

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=18794#18794





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Problem with DOF Nodes

2009-10-27 Thread Felipe Lemus
Hi,
I am trying to make a scene with a Helicopter flying over a terrain and with 
the option to change its course or stop it in real time. I have been looking 
tutorial 8, and I have tried to do a modification to rotate tank instead the 
two DOF nodes. Here is the code, i have GTKviewer but it is possible to do with 
classic viewer.

Tuto_8.cpp

#include  osg/Group 
#include  osg/Node
#include  osgDB/ReadFile
#include  osgViewer/Viewer
#include  osgSim/DOFTransform
#include  osgSim/MultiSwitch 
#include  osgGA/TrackballManipulator
 
#include tankDataType.h
#include tankNodeCallback.h
#include  gtk/gtk.h
#include  ViewerGtk.h

int main()
{

osg::Node* tankNode = NULL;
osg::Group* root = new osg::Group();
osgViewer::ViewerGtk viewer;
tankNode = osgDB::readNodeFile(./models/t72-tank_des.flt);
root-addChild(tankNode);

tankDataType* tankData = new tankDataType(tankNode);
tankNode-setUserData( tankData );
tankNode-setUpdateCallback(new tankNodeCallback);

osgGA::TrackballManipulator *Tman = new osgGA::TrackballManipulator();
viewer.setUpViewInWindow( 100, 100, 800, 650 );
viewer.setSceneData( root );
viewer.realize();
viewer.setCameraManipulator( Tman );

while( !viewer.done() )
{ 
viewer.frame();
}
}

tankDataType.cpp

#include tankDataType.h
  
tankDataType::tankDataType(osg::Node* n)
  {
 rotation=  0;
  tank =  dynamic_cast osgSim::DOFTransform* (n);
}
 
void tankDataType::updateTurretRotation()
{
 rotation -= 0.01;
 tank-setCurrentHPR( osg::Vec3(rotation,0,0) );
}

tankDataType.h

#ifndef _TANKDATATYPE_H_
#include  osgSim/DOFTransform
#include  osgSim/MultiSwitch 

 class tankDataType : public osg::Referenced
 {
 public:
tankDataType(osg::Node* n);
   
void updateTurretRotation();

protected:
osgSim::DOFTransform* tank;
double rotation;

 };
 
 #endif

tankNodeCallBack.h

#ifndef _TANKNODECALLBACK_H_
 
 class tankNodeCallback : public osg::NodeCallback
 {
  public:
  virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
  {
  osg::ref_ptrtankDataType tankData = dynamic_casttankDataType* 
(node-getUserData() );
 
 if(tankData != NULL)
 {
 tankData-updateTurretRotation(); 
 }
 traverse(node, nv);
 }
 };
 #endif



The code compiles but when run it gives the following error:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb5ae2a60 (LWP 502)]
tankDataType::updateTurretRotation (this=0x962b410) at 
/usr/local/include/osgSim/DOFTransform:48
48void setCurrentHPR(const osg::Vec3 hpr) {_currentHPR = hpr; 
dirtyBound(); }

Any help is welcome!!!

Thank you!

Cheers,
Felipe

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=18779#18779





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Real-time motion in OSG

2009-10-15 Thread Felipe Lemus
Thanks for your answer Vincent. I am looking the examples and tutorials to do 
that, but the code that I have found does not run. Somebody can show me a code 
to move a loaded model in a scene using CallBacks?. 
Thank you!

Cheers,
Felipe

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=18291#18291





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Real-time motion in OSG

2009-10-14 Thread Felipe Lemus
Hi,

I have been looking for some information about real-time motion in the forum 
but I have not found what I want. I want to do a scene with an helicopter 
flying over a terrain, but I want to change its motion in real-time. First, I 
did it with Animationpath like the example osganimate.cpp, but I can not change 
the movement because it load the animationpath at the beginning of the 
implementation and it repeats periodically.

Would you give me some advices?

Thank you!

Cheers,
Felipe

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=18252#18252





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Import models from 3DS

2009-10-06 Thread Felipe Lemus
Hi Sukender,

Thank you very much for your answer, but that is not the problem. Textures 
associated to the model are loaded, I can see sticks and letters in the model, 
but is the colour which is white. Moreover, I can load with succes the model in 
my notebook computer with the same version of OSG but in the computer which I 
need to run the app do not. I do not understand why it is happening that.

Excuse my English, I am from Spain.

All help is welcome!!
... 

Thank you very much!

Cheers,
Felipe

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=17976#17976





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Terrain generator compatible with OSG

2009-09-28 Thread Felipe Lemus
Hi,

Thanks both for your answers. Sorry, but I have been disconnected the last 
week. I am doing my final year project. I have designed a multimodal interface 
for control and monitor UAVs (Unmanned Aerial Vehicles). I have many tools: 
Head Tracking, Touch screens, 3D sound, etc... 

But I want to design with OGS a scenario with a plane with a mobile camera 
following a road in a 3D space and simulate a real situation for the station. 
So I only need a 3D scenario with a road, and I will add models imported form 
3D studio like cars, trucks, etc...

I am trying to install the programs that you recommended me, Jason. Thanks for 
the help. All new ideas are welcome!!!

Thank you!

Cheers,
Felipe

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=17687#17687





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Terrain generator compatible with OSG

2009-09-22 Thread Felipe Lemus
Hi,

I am looking for a terrain generator that was compatible with OSG and if it was 
possible easy to use. Do you know some one?
I try it with Terragen 2 and Geocontrol2 but without succes.
I have Autodesk 3ds MAX 2010, could I save my projects in the old format .3ds 
to do that?

Thank you!

Cheers,
Felipe

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=17544#17544





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Problems with camera default views

2009-09-14 Thread Felipe Lemus
Hi,

I am new with OSG. I am trying to do an scene with a plane flying over a 
terrain. I want to use two cameras, one with the plane and looking at the floor 
and with freedom to rotate it. And another camera placed well above the plane 
looking to it. I use NodetrackerManipulator to do that, but the default view is 
not what I want. 

Here is the code to define the NodetrackerManipulator of the camera placed 
above the plane:

osg::PositionAttitudeTransform * Superiorcamera =
  new osg::PositionAttitudeTransform();
   Superiorcamera-setPosition( osg::Vec3(0.0,0.0,500.0) );
   Superiorcamera-setAttitude(
  osg::Quat( osg::DegreesToRadians(-90.0), osg::Vec3(1,0,0) ));
   
   ownTank.get()-addChild(Superiorcamera);
   osgGA::NodeTrackerManipulator* tm2 = new osgGA::NodeTrackerManipulator;
tm2-setTrackerMode( osgGA::NodeTrackerManipulator::NODE_CENTER);
tm2-setRotationMode( osgGA::NodeTrackerManipulator::ELEVATION_AZIM);
tm2-setTrackNode(Superiorcamera);


Then I have changed createview to take a NodetrackerManipultor instead of 
TrackballManipulator.

I am looking for solutions in the forum but I have not find what I need. I 
think that sethomeposition() is not valid in this case because my cameras are 
on the move and i have two views in the same viewer.

Thanks for your help and excuse my English.
... 

Thank you!

Cheers,
Felipe

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=17334#17334





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Problems with camera default views

2009-09-14 Thread Felipe Lemus
Hi,

I have found the solution!!
... 

Thank you!

Cheers,
Felipe

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=17344#17344





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org