[osg-users] moving a 3d object with the mouse?

2007-03-02 Thread elekis

hi all,
I ty to move a object (x, y , z) with my mouse (x, y)  and I don't know how
to do that,

the more simple is find the plane witch pass by the xyz point and parallel
with the screen and after, move the object with the mousse on this plane?
but how to get the screen plane??

thanks.


a++
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

[osg-users] simulate f touch in osgProducer

2007-02-28 Thread elekis

hi all,
I try to simulate the f touch in osgProducer. (what I mean is toogling in
windows/fullscreen mode) but without press the f.

like the key space , I call home(), what is the function to toogleling?

thanks.


a++
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

[osg-users] OSGViewer and computeIntersections

2007-02-27 Thread elekis

hi all, always trying to pass to OSGViewer,
I try to use computeIntersections (as with osg::Producer)

in Producer I made that

osgUtil::IntersectVisitor::HitList hlist;
   if (
CGeneral::instance().viewer.computeIntersections(ea.getX(), ea.getY(),
hlist))
   {

for(osgUtil::IntersectVisitor::HitList::iterator hitr=hlist.begin();hitr!=
hlist.end(); ++hitr)
   {
   if (hitr-_geode.valid()){


with viewer, I tried the same thing, (execpt the ea changing with event)

but I have that error.

INTERFACE/Interface.cpp:44: error: no matching function for call to
'SimpleViewerQT::computeIntersections(float, float,
std::vectorosgUtil::Hit, std::allocatorosgUtil::Hit )'

/usr/local/include/osgViewer/View:117: note: candidates are: bool
osgViewer::View::computeIntersections(float, float,
std::multisetosgUtil::LineSegmentIntersector::Intersection,
std::lessosgUtil::LineSegmentIntersector::Intersection,
std::allocatorosgUtil::LineSegmentIntersector::Intersection , unsigned
int)

/usr/local/include/osgViewer/View:120: note: bool
osgViewer::View::computeIntersections(float, float, osg::NodePath,
std::multisetosgUtil::LineSegmentIntersector::Intersection,
std::lessosgUtil::LineSegmentIntersector::Intersection,
std::allocatorosgUtil::LineSegmentIntersector::Intersection , unsigned
int)


I ve tried google code search, and other search but all example are with
osgProducer. (event is the nme is not correct, I use viewer and not
simpleViewer.)

thanks

a+++
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Re: [osg-users] OSGViewer and computeIntersections

2007-02-27 Thread elekis

thanks, I found something.
but I raised a other trouble(it's not my month, all that for a teacher :-(
),

with QT, I can't use osgViewer , I have to use osgSimpleViewer . if I use
osgViewer -- core dumped (see code below) . (I duno if it's normal)

but in osgSimpleViewer I haven't  computeIntersection function.

so what I have to do make my own viewer?? or implement compute intersection
in my subclass of SimpleViewer.??

__
(for the impatient, I ve just changing that line)
class SimpleViewerQT : public osgViewer::Viewer, public GraphicsWindowQT
__


// C++ source file - (C) 2003 Robert Osfield, released under the OSGPL.
// (C) 2005 Mike Weiblen http://mew.cx/ released under the OSGPL.
// Simple example using GLUT to create an OpenGL window and OSG for
rendering.
// Derived from osgGLUTsimple.cpp and osgkeyboardmouse.cpp

#include osgViewer/Viewer
#include osgGA/TrackballManipulator
#include osgDB/ReadFile

#include QtCore/QTimer
#include QtGui/QKeyEvent
#include QtGui/QApplication
#include QtOpenGL/QGLWidget

#include iostream

class GraphicsWindowQT : public QGLWidget,  virtual
osgViewer::GraphicsWindow
{
public:

   GraphicsWindowQT( QWidget * parent = 0, const char * name = 0, const
QGLWidget * shareWidget = 0, Qt::WFlags f = 0 );
   virtual ~GraphicsWindowQT() {}

protected:

   virtual void resizeGL( int width, int height );
   virtual void keyPressEvent( QKeyEvent* event );
   virtual void keyReleaseEvent( QKeyEvent* event );
   virtual void mousePressEvent( QMouseEvent* event );
   virtual void mouseReleaseEvent( QMouseEvent* event );
   virtual void mouseMoveEvent( QMouseEvent* event );

   QTimer _timer;
};

GraphicsWindowQT::GraphicsWindowQT( QWidget * parent, const char * /*name*/,
const QGLWidget * shareWidget, Qt::WFlags f):
   QGLWidget(parent, shareWidget, f)
{
   connect(_timer, SIGNAL(timeout()), this, SLOT(updateGL()));
   _timer.start(10);
}

void GraphicsWindowQT::resizeGL( int width, int height )
{
   getEventQueue()-windowResize(0, 0, width, height );
}

void GraphicsWindowQT::keyPressEvent( QKeyEvent* event )
{
   getEventQueue()-keyPress( (osgGA::GUIEventAdapter::KeySymbol)
event-key() );
}

void GraphicsWindowQT::keyReleaseEvent( QKeyEvent* event )
{
   getEventQueue()-keyRelease( (osgGA::GUIEventAdapter::KeySymbol)
event-key() );
}

void GraphicsWindowQT::mousePressEvent( QMouseEvent* event )
{
   int button = 0;
   switch(event-button())
   {
   case(Qt::LeftButton): button = 1; break;
   case(Qt::MidButton): button = 2; break;
   case(Qt::RightButton): button = 3; break;
   case(Qt::NoButton): button = 0; break;
   default: button = 0; break;
   }
   getEventQueue()-mouseButtonPress(event-x(), event-y(), button);
}

void GraphicsWindowQT::mouseReleaseEvent( QMouseEvent* event )
{
   int button = 0;
   switch(event-button())
   {
   case(Qt::LeftButton): button = 1; break;
   case(Qt::MidButton): button = 2; break;
   case(Qt::RightButton): button = 3; break;
   case(Qt::NoButton): button = 0; break;
   default: button = 0; break;
   }
   getEventQueue()-mouseButtonRelease(event-x(), event-y(), button);
}

void GraphicsWindowQT::mouseMoveEvent( QMouseEvent* event )
{
   getEventQueue()-mouseMotion(event-x(), event-y());
}


class SimpleViewerQT : public osgViewer::Viewer, public GraphicsWindowQT
{
   public:

   SimpleViewerQT( QWidget * parent = 0, const char * name = 0, const
QGLWidget * shareWidget = 0, Qt::WFlags f = 0 ):
   GraphicsWindowQT(parent, name, shareWidget, f) {}

   virtual void initializeGL()
   {
   QGLWidget::initializeGL();
   }

   virtual void paintGL()
   {
   frame();
   }

};


int main( int argc, char **argv )
{
   QApplication a( argc, argv );

   if (argc2)
   {
   std::cout  argv[0] : requires filename argument.  std::endl;
   return 1;
   }

   // load the scene.
   osg::ref_ptrosg::Node loadedModel = osgDB::readNodeFile(argv[1]);
   if (!loadedModel)
   {
   std::cout  argv[0] : No data loaded.  std::endl;
   return 1;
   }


   SimpleViewerQT* viewerWindow = new SimpleViewerQT;

   viewerWindow-setSceneData(loadedModel.get());
   viewerWindow-setCameraManipulator(new osgGA::TrackballManipulator);

   viewerWindow-show();
   a.connect( a, SIGNAL(lastWindowClosed()), a, SLOT(quit()) );

   return a.exec();
}

/*EOF*/














On 2/27/07, Robert Osfield [EMAIL PROTECTED] wrote:


HI Elekis,

The difference is simply in the data structure used to store the
intersection hits.  The osgViewer is based on the new
IntersectionVisitor rather than the old IntersectVistor.  For the new
viewer you'll just need to use the LinerIntersector::Intersections
structure.  Have a look at the interface.  As check the picking code
in osgpick or osgmanipulator.

Robert.

On 2/27/07, elekis [EMAIL PROTECTED

Re: [osg-users] OSGViewer and computeIntersections

2007-02-27 Thread elekis

hi

sorry but,
...
I m totally lost,

What I trying to do is is using QT with OSG.

like I said before, I try to get the geode that I ve just clicked (x, y).

like you said, I m now using Intersections. like that I suppose

osgUtil::LineSegmentIntersector::Intersections inter;

if(CGeneral::instance().viewer-computeIntersections((float)event-x(),
(float)event-y(), inter))
   {

for(osgUtil::LineSegmentIntersector::Intersections::iterator hitr=
inter.begin();hitr!=inter.end(); ++hitr)
   {

but I have an error

Interface.cpp:66: error: 'class SimpleViewerQT' has no member named
'computeIntersections'
SimpleViewerQT are like that declared like that

class SimpleViewerQT : public osgViewer::SimpleViewer, public
GraphicsWindowQT


I looked 
http://www.openscenegraph.net/documentation/OpenSceneGraph/examples/osgpick/osgpick.cpp

and on osgCamera

but he use osgProducer (exacly like that I used too)

is it possible do get intersections with osgSimpleViewer??

there certainly something wrong with me but I don't know what


thanks for all


On 2/27/07, Robert Osfield [EMAIL PROTECTED]  wrote:


Hi Elekis,

 class SimpleViewerQT : public osgViewer::Viewer, public GraphicsWindowQT


osgViewer::Viewer isn't meant to be used like these, one attaches
GraphicsWindow's to the Camera's that the Viewer maintains.  See the
osgcamera example if you want to know how.


Robert.


On 2/27/07, elekis [EMAIL PROTECTED] wrote:
 thanks, I found something.
 but I raised a other trouble(it's not my month, all that for a teacher
:-(
 ),

 with QT, I can't use osgViewer , I have to use osgSimpleViewer . if I
use
 osgViewer -- core dumped (see code below) . (I duno if it's normal)

 but in osgSimpleViewer I haven't  computeIntersection function.

 so what I have to do make my own viewer?? or implement compute
intersection
 in my subclass of SimpleViewer.??


__

 (for the impatient, I ve just changing that line)
 class SimpleViewerQT : public osgViewer::Viewer, public GraphicsWindowQT

__



  // C++ source file - (C) 2003 Robert Osfield, released under the OSGPL.
 // (C) 2005 Mike Weiblen http://mew.cx/ released under the OSGPL.
 // Simple example using GLUT to create an OpenGL window and OSG for
 rendering.
 // Derived from osgGLUTsimple.cpp and osgkeyboardmouse.cpp

 #include osgViewer/Viewer
 #include osgGA/TrackballManipulator
 #include osgDB/ReadFile

 #include QtCore/QTimer
 #include QtGui/QKeyEvent
 #include QtGui/QApplication
 #include QtOpenGL/QGLWidget

 #include iostream

 class GraphicsWindowQT : public QGLWidget,  virtual
 osgViewer::GraphicsWindow
 {
 public:

 GraphicsWindowQT( QWidget * parent = 0, const char * name = 0, const
 QGLWidget * shareWidget = 0, Qt::WFlags f = 0 );
 virtual ~GraphicsWindowQT() {}

 protected:

 virtual void resizeGL( int width, int height );
 virtual void keyPressEvent( QKeyEvent* event );
 virtual void keyReleaseEvent( QKeyEvent* event );
 virtual void mousePressEvent( QMouseEvent* event );
 virtual void mouseReleaseEvent( QMouseEvent* event );
 virtual void mouseMoveEvent( QMouseEvent* event );

 QTimer _timer;
 };

 GraphicsWindowQT::GraphicsWindowQT( QWidget * parent, const
 char * /*name*/, const QGLWidget * shareWidget, Qt::WFlags f):
  QGLWidget(parent, shareWidget, f)
 {
 connect(_timer, SIGNAL(timeout()), this, SLOT(updateGL()));
 _timer.start(10);
 }

 void GraphicsWindowQT::resizeGL( int width, int height )
 {
 getEventQueue()-windowResize(0, 0, width, height );
 }

 void GraphicsWindowQT::keyPressEvent( QKeyEvent* event )
 {
 getEventQueue()-keyPress(
 (osgGA::GUIEventAdapter::KeySymbol) event-key() );
 }

 void GraphicsWindowQT::keyReleaseEvent( QKeyEvent* event )
 {
 getEventQueue()-keyRelease(
 (osgGA::GUIEventAdapter::KeySymbol) event-key() );
 }

 void GraphicsWindowQT::mousePressEvent( QMouseEvent* event
 )
 {
 int button = 0;
 switch(event-button())
 {
 case(Qt::LeftButton): button = 1; break;
 case(Qt::MidButton): button = 2; break;
 case(Qt::RightButton): button = 3; break;
 case(Qt::NoButton): button = 0; break;
 default: button = 0; break;
 }
 getEventQueue()-mouseButtonPress(event-x(),
 event-y(), button);
 }

 void GraphicsWindowQT::mouseReleaseEvent( QMouseEvent*
 event )
 {
 int button = 0;
 switch(event-button())
 {
 case(Qt::LeftButton): button = 1; break;
 case(Qt::MidButton): button = 2; break;
 case(Qt::RightButton): button = 3; break;
 case(Qt::NoButton): button = 0; break;
 default: button = 0; break;
 }
 getEventQueue()-mouseButtonRelease(event-x(),
 event-y(), button);
 }

 void GraphicsWindowQT::mouseMoveEvent( QMouseEvent* event )
 {
 getEventQueue()-mouseMotion(event-x(), event-y

Re: [osg-users] compil svn source (undefined reference to `OpenThreads::SetProcessorAffinityOfCurrentThread)

2007-02-26 Thread elekis

sniff

that's change nothing,

[EMAIL PROTECTED]:~/SVN_OSG/trunk$ cat /etc/ld.so.conf
include /etc/ld.so.conf.d/*.conf
/usr/local/lib
[EMAIL PROTECTED]:~/SVN_OSG/trunk$

I made sudo ldconfig (and even re svn co sources) but nothing change.

g++ -M -I../../../include  -I/usr/X11R6/include  ../osgconv.cpp  pipeto
.depend/osgconv.cpp
make[3]: quittant le répertoire «
/home/elekis/SVN_OSG/trunk/applications/osgconv/Linux32.Opt »
make[3]: entrant dans le répertoire «
/home/elekis/SVN_OSG/trunk/applications/osgconv/Linux32.Opt »
g++  -O2 -W -Wall -fPIC -pipe -I../../../include  -I/usr/X11R6/include  -c
../OrientationConverter.cpp
g++  -O2 -W -Wall -fPIC -pipe -I../../../include  -I/usr/X11R6/include  -c
../osgconv.cpp
g++  -O2 -L/usr/X11R6/lib -L../../../lib/Linux32   OrientationConverter.o
osgconv.o   -lstdc++ -losgViewer -losgText -losg -losgUtil -losgGA -losgDB
-lGLU -lGL  -lOpenThreads   -o osgconv
../../../lib/Linux32/libosgViewer.so: undefined reference to
`OpenThreads::SetProcessorAffinityOfCurrentThread(unsigned int)'
collect2: ld returned 1 exit status
make[3]: *** [osgconv] Erreur 1
make[3]: quittant le répertoire «
/home/elekis/SVN_OSG/trunk/applications/osgconv/Linux32.Opt »
make[2]: *** [osgconv.opt] Erreur 2
make[2]: quittant le répertoire «
/home/elekis/SVN_OSG/trunk/applications/osgconv »
make[1]: *** [default] Erreur 1
make[1]: quittant le répertoire « /home/elekis/SVN_OSG/trunk/applications »
make: *** [default] Erreur 1



On 2/26/07, Thibault Genessay [EMAIL PROTECTED] wrote:


Hi

On 2/25/07, elekis [EMAIL PROTECTED] wrote:

 hi

 [...]
 [EMAIL PROTECTED]:~/OSGSVN/trunk$ cat /etc/ld.so.conf
 include /etc/ld.so.conf.d/*.conf
 /usr/local/include/OpenThreads




Your /etc/ld.so.conf looks weird, you must not have C/C++ include paths in
it!
My OpenThreads libraries were installed in /usr/local/lib - and I did not
change any setting - so I expect yours to get installed in the same place.
Try to replace the line
/usr/local/include/OpenThreads
by
/usr/local/lib
And then run ldconfig as root
It should do it

--
Thibault




___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Re: [osg-users] compil svn source (undefined reference to `OpenThreads::SetProcessorAffinityOfCurrentThread)

2007-02-26 Thread elekis

yes that was that but
now I have a other error .

first thing , effectively I had lots of pakage (osg producer and and
openTrheads ) it's bizarre that when I desinstalled openscenegraph he didnt
installed all independency package.

I delete producer and openTread.
but now I have that

is there ant other package I have to remove . (excepting reinstalling all my
system)???

thanks a lot for all.

make[2]: entrant dans le répertoire «
/home/elekis/SVN_OSG/OSG/src/osgProducer »
make[3]: entrant dans le répertoire «
/home/elekis/SVN_OSG/OSG/src/osgProducer/Linux32.Opt »
g++  -O2 -W -Wall -fPIC -pipe -DOSGPRODUCER_LIBRARY -I../../../include
-I/usr/X11R6/include -c ../KeyboardMouseCallback.cpp
In file included from ../KeyboardMouseCallback.cpp:1:
../../../include/osgProducer/KeyboardMouseCallback:21:65: error:
Producer/RenderSurface: Aucun fichier ou répertoire de ce type
../../../include/osgProducer/KeyboardMouseCallback:22:34: error:
Producer/KeyboardMouse: Aucun fichier ou répertoire de ce type
../../../include/osgProducer/KeyboardMouseCallback:31: error: 'Producer' has
not been declared
../../../include/osgProducer/KeyboardMouseCallback:31: error: expected `{'
before 'KeyboardMouseCallback'
../../../include/osgProducer/KeyboardMouseCallback:31: error: invalid
function declaration
../KeyboardMouseCallback.cpp:10: error: expected constructor, destructor, or
type conversion before '(' token
../KeyboardMouseCallback.cpp:20: error: invalid use of undefined type 'class
osgProducer::KeyboardMouseCallback'
../../../include/osgProducer/KeyboardMouseCallback:31: error: forward
declaration of 'class osgProducer::KeyboardMouseCallback'
../KeyboardMouseCallback.cpp:20: error: 'Producer' has not been declared
../KeyboardMouseCallback.cpp:37: error: invalid use of undefined type 'class
osgProducer::KeyboardMouseCallback'
../../../include/osgProducer/KeyboardMouseCallback:31: error: forward
declaration of 'class osgProducer::KeyboardMouseCallback'
../KeyboardMouseCallback.cpp: In member function 'void
osgProducer::KeyboardMouseCallback::mouseScroll2D(float, float)':
../KeyboardMouseCallback.cpp:39: error: 'updateWindowSize' was not declared
in this scope
../KeyboardMouseCallback.cpp:40: error: '_eventQueue' was not declared in
this scope
../KeyboardMouseCallback.cpp: At global scope:
../KeyboardMouseCallback.cpp:43: error: invalid use of undefined type 'class
osgProducer::KeyboardMouseCallback'
../../../include/osgProducer/KeyboardMouseCallback:31: error: forward
declaration of 'class osgProducer::KeyboardMouseCallback'
../KeyboardMouseCallback.cpp: In member function 'void
osgProducer::KeyboardMouseCallback::penPressure(float)':
../KeyboardMouseCallback.cpp:45: error: 'updateWindowSize' was not declared
in this scope
../KeyboardMouseCallback.cpp:46: error: '_eventQueue' was not declared in
this scope
../KeyboardMouseCallback.cpp: At global scope:
../KeyboardMouseCallback.cpp:49: error: invalid use of undefined type 'class
osgProducer::KeyboardMouseCallback'
../../../include/osgProducer/KeyboardMouseCallback:31: error: forward
declaration of 'class osgProducer::KeyboardMouseCallback'
../KeyboardMouseCallback.cpp:49: error: 'Producer' has not been declared
../KeyboardMouseCallback.cpp:49: error: expected primary-expression before
'bool'
../KeyboardMouseCallback.cpp:55: error: invalid use of undefined type 'class
osgProducer::KeyboardMouseCallback'
../../../include/osgProducer/KeyboardMouseCallback:31: error: forward
declaration of 'class osgProducer::KeyboardMouseCallback'
../KeyboardMouseCallback.cpp: In member function 'void
osgProducer::KeyboardMouseCallback::buttonPress(float, float, unsigned
int)':
../KeyboardMouseCallback.cpp:57: error: 'updateWindowSize' was not declared
in this scope
../KeyboardMouseCallback.cpp:58: error: '_eventQueue' was not declared in
this scope
../KeyboardMouseCallback.cpp: At global scope:
../KeyboardMouseCallback.cpp:61: error: invalid use of undefined type 'class
osgProducer::KeyboardMouseCallback'
../../../include/osgProducer/KeyboardMouseCallback:31: error: forward
declaration of 'class osgProducer::KeyboardMouseCallback'
../KeyboardMouseCallback.cpp: In member function 'void
osgProducer::KeyboardMouseCallback::buttonRelease(float, float, unsigned
int)':
../KeyboardMouseCallback.cpp:63: error: 'updateWindowSize' was not declared
in this scope
../KeyboardMouseCallback.cpp:64: error: '_eventQueue' was not declared in
this scope
../KeyboardMouseCallback.cpp: At global scope:
../KeyboardMouseCallback.cpp:67: error: invalid use of undefined type 'class
osgProducer::KeyboardMouseCallback'
../../../include/osgProducer/KeyboardMouseCallback:31: error: forward
declaration of 'class osgProducer::KeyboardMouseCallback'
../KeyboardMouseCallback.cpp: In member function 'void
osgProducer::KeyboardMouseCallback::doubleButtonPress(float, float, unsigned
int)':
../KeyboardMouseCallback.cpp:69: error: 'updateWindowSize' was not declared
in this scope
../KeyboardMouseCallback.cpp:70: error: '_eventQueue

Re: [osg-users] compil svn source (undefined reference to `OpenThreads::SetProcessorAffinityOfCurrentThread)

2007-02-26 Thread elekis

everything work perfecly.

thanks all for your help.

for osgProducer. the fact is in a first time I used osgProducer cause he is
in tutorial http://www.nps.navy.mil/cs/sullivan/osgtutorials/ (I really
thing it's a bad tutorial cause he has no osg_ptr and use osgProducer)

Now I have to use a other osg::viewer cause I wanna use an other framework a
little more powerful (GTK or QT, better GTK , but more complicate to use I
thing)

that 's why I try to install the svn version.

thanks for all again (and thanks for make -j 2, it's very usefull).
a++

On 2/26/07, Robert Osfield [EMAIL PROTECTED] wrote:


On 2/26/07, Alberto Luaces [EMAIL PROTECTED] wrote:
 El Lunes, 26 de Febrero de 2007 15:28, elekis escribió:
  of caurse osgProducer going to desepeart in few time(it's the main
goal of
  that installation) but now I try make work out my work.

 The SVN version of OSG doesn't require Producer to build, uninstall
 that dev package (that should be useless anyway because your
distribution
 almost surely brings and ancient version of Producer) and rebuild, or
better,
 build OSG from scratch (OSG only, not OpenThreads).

OSG in SVN still has osgProducer and osgproduceviewer application, so
if you wish to build these you will need Producer.

Robert.
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Re: [osg-users] compil svn source (undefined reference to `OpenThreads::SetProcessorAffinityOfCurrentThread)

2007-02-26 Thread elekis

On 2/26/07, Robert Osfield [EMAIL PROTECTED] wrote:


On 2/26/07, elekis [EMAIL PROTECTED] wrote:
 everything work perfecly.

 thanks all for your help.

 for osgProducer. the fact is in a first time I used osgProducer cause he
is
 in tutorial
 http://www.nps.navy.mil/cs/sullivan/osgtutorials/ (I really
 thing it's a bad tutorial cause he has no osg_ptr and use osgProducer)

This a rather old tutorials I'm afraid.



it will really usefull when the wiki will be open to update this tutorial(or
an other).

but http://openscenegraph.com/  are in test period (like we can read :-D)

a++



Now I have to use a other osg::viewer cause I wanna use an other framework
a
 little more powerful (GTK or QT, better GTK , but more complicate to use
I
 thing)

osgViewer should never be more complicated than the equivilant in
osgProducer, and often will be more straight forward.

Integration with the likes ot GTK or QT has been done with
osgViewer::SimpleViewer but not full integration with the more
powerful osgViewer::Viewer and CompositeViewer classes yet, this will
come soon though.  If only I could clone myself they'd be here
already...

Robert.
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

[osg-users] helping compiling QT4 example

2007-02-25 Thread elekis

hi all
I try to compil the QT4 example
like here
http://openscenegraph.org/viewcvs/*checkout*/examples/osgsimpleviewerQT4/osgsimpleviewerQT4.cpp

with
g++ osgsimpleviewerQT4.cpp -losgViewer -losgText -losgGA -losgDB -losgUtil
-losg -lQtOpenGL -lQtGui -lQtCore

but the first error line are

[EMAIL PROTECTED]:~/Desktop$
[EMAIL PROTECTED]:~/Desktop$ g++ osgsimpleviewerQT4.cpp -losgViewer -losgText
-losgGA -losgDB -losgUtil -losg -lQtOpenGL -lQtGui -lQtCore
osgsimpleviewerQT4.cpp:6:34: error: osgViewer/SimpleViewer: Aucun fichier ou
répertoire de ce type
osgsimpleviewerQT4.cpp:10:25: error: QtCore/QTimer: Aucun fichier ou
répertoire de ce type
osgsimpleviewerQT4.cpp:11:27: error: QtGui/QKeyEvent: Aucun fichier ou
répertoire de ce type
osgsimpleviewerQT4.cpp:12:30: error: QtGui/QApplication: Aucun fichier ou
répertoire de ce type
osgsimpleviewerQT4.cpp:13:30: error: QtOpenGL/QGLWidget: Aucun fichier ou
répertoire de ce type
osgsimpleviewerQT4.cpp:17: error: expected class-name before ',' token
osgsimpleviewerQT4.cpp:17: error: 'osgViewer' has not been declared
osgsimpleviewerQT4.cpp:17: error: expected `{' before 'GraphicsWindow'
osgsimpleviewerQT4.cpp:17: error: invalid function declaration


I don't understand is viewer not in osg package??(ubuntu fiesty fawn).

thanks
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Re: [osg-users] helping compiling QT4 example

2007-02-25 Thread elekis

thanks, but, the fact is I haven't osgViewer


[EMAIL PROTECTED]:~$ ls /usr/include/osg
osg/  osgFX/osgParticle/  osgTerrain/
osgAL/osgGA/osgProducer/  osgText/
osgDB/osgIntrospection/ osgSim/   osgUtil/

and I don't know where I can find it
I try the build on osg site

http://www.openscenegraph.org/downloads/snapshots/OSG_OP_OT-1.2.zip

but there nothing in the source,

so I tried a night tarball (the 25 february) on
http://openscenegraph.org/downloads/developer/

but he say

g++ -M -I../../../include  ../Viewer.cpp  pipeto .depend/Viewer.cpp
g++ -M -I../../../include  ../GraphicsWindowX11.cpp  pipeto
.depend/GraphicsWindowX11.cpp
make[3]: quittant le répertoire « /home/elekis/Desktop/OpenSceneGraph-
1.2.0-200702251107/src/osgViewer/Linux32.Opt »
make[3]: entrant dans le répertoire « /home/elekis/Desktop/OpenSceneGraph-
1.2.0-200702251107/src/osgViewer/Linux32.Opt »
g++  -O2 -W -Wall -fPIC -pipe -DOSGVIEWER_LIBRARY -I../../../include  -c
../CompositeViewer.cpp
../CompositeViewer.cpp: In member function 'void
osgViewer::CompositeViewer::startThreading()':
../CompositeViewer.cpp:379: error: 'SetProcessorAffinityOfCurrentThread' is
not a member of 'OpenThreads'
make[3]: *** [CompositeViewer.o] Erreur 1
make[3]: quittant le répertoire « /home/elekis/Desktop/OpenSceneGraph-
1.2.0-200702251107/src/osgViewer/Linux32.Opt »
make[2]: *** [libosgViewer.so.opt] Erreur 2
make[2]: quittant le répertoire « /home/elekis/Desktop/OpenSceneGraph-
1.2.0-200702251107/src/osgViewer »
make[1]: *** [default] Erreur 1
make[1]: quittant le répertoire « /home/elekis/Desktop/OpenSceneGraph-
1.2.0-200702251107/src »
make: *** [default] Erreur 1
[EMAIL PROTECTED]:~/Desktop/OpenSceneGraph-1.2.0-200702251107$

at the compilation

where can I found osgViewer???

thanks

a+++

On 2/25/07, Antoine Hue [EMAIL PROTECTED] wrote:


GNUMakefile provided with osgsimpleviewerQT4 is not very well suited for
any QT install.
Try attached .pro file:
qmake-qt4 osgsimpleviewer.pro
make -f Makefile
./your ARCH/osgsimpleviewerQT4/osgsimpleviewerQT4

Robert, feel free to add this contribution to the OSG.

Antoine

elekis wrote:
 hi all
 I try to compil the QT4 example
 like here

http://openscenegraph.org/viewcvs/*checkout*/examples/osgsimpleviewerQT4/osgsimpleviewerQT4.cpp
 
http://openscenegraph.org/viewcvs/*checkout*/examples/osgsimpleviewerQT4/osgsimpleviewerQT4.cpp


 with
 g++ osgsimpleviewerQT4.cpp -losgViewer -losgText -losgGA -losgDB
 -losgUtil -losg -lQtOpenGL -lQtGui -lQtCore

 but the first error line are

 [EMAIL PROTECTED]:~/Desktop$
 [EMAIL PROTECTED]:~/Desktop$ g++ osgsimpleviewerQT4.cpp -losgViewer
 -losgText -losgGA -losgDB -losgUtil -losg -lQtOpenGL -lQtGui -lQtCore
 osgsimpleviewerQT4.cpp:6:34: error: osgViewer/SimpleViewer: Aucun
 fichier ou répertoire de ce type
 osgsimpleviewerQT4.cpp :10:25: error: QtCore/QTimer: Aucun fichier ou
 répertoire de ce type
 osgsimpleviewerQT4.cpp:11:27: error: QtGui/QKeyEvent: Aucun fichier ou
 répertoire de ce type
 osgsimpleviewerQT4.cpp:12:30: error: QtGui/QApplication: Aucun fichier
 ou répertoire de ce type
 osgsimpleviewerQT4.cpp:13:30: error: QtOpenGL/QGLWidget: Aucun fichier
 ou répertoire de ce type
 osgsimpleviewerQT4.cpp:17: error: expected class-name before ',' token
 osgsimpleviewerQT4.cpp:17: error: 'osgViewer' has not been declared
 osgsimpleviewerQT4.cpp:17: error: expected `{' before 'GraphicsWindow'
 osgsimpleviewerQT4.cpp:17: error: invalid function declaration


 I don't understand is viewer not in osg package??(ubuntu fiesty fawn).

 thanks


 

 ___
 osg-users mailing list
 osg-users@openscenegraph.net
 http://openscenegraph.net/mailman/listinfo/osg-users
 http://www.openscenegraph.org/


QT += opengl

UNAME= $$system(uname -s)
MACHINE= $$system(uname -m)
contains(MACHINE, x86_64){
ARCH=$${UNAME}64
}else{
ARCH=$${UNAME}32
}

LIBS += -L../../lib/$${ARCH}
LIB_DIRS= $(OPENTHREADS_LIB_DIR)
for(dir, LIB_DIRS) {
 exists($$dir){
LIBS += -L$$dir
 }
}

LIBS += -losgDB -losgGA -losg -lOpenThreads  \
-losgViewer -losgText -losgFX -losgUtil


TEMPLATE = app

TARGET = ./$$ARCH/osgsimpleviewerQT4

CONFIG +=
# debug
#  warn_on

FORMS +=

RESOURCES=

HEADERS +=

SOURCES += osgsimpleviewerQT4.cpp

INCLUDEPATH += ../../include $(OPENTHREADS_INC_DIR)


OBJECTS_DIR=$${ARCH}


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Re: [osg-users] helping compiling QT4 example

2007-02-25 Thread elekis

ok I understand he is in application directory

is it possible to install only osg viewer??


thanks a lot for all


On 2/25/07, elekis [EMAIL PROTECTED] wrote:


thanks, but, the fact is I haven't osgViewer


[EMAIL PROTECTED]:~$ ls /usr/include/osg
osg/  osgFX/osgParticle/  osgTerrain/
osgAL/osgGA/osgProducer/  osgText/
osgDB/osgIntrospection/ osgSim/   osgUtil/

and I don't know where I can find it
I try the build on osg site

http://www.openscenegraph.org/downloads/snapshots/OSG_OP_OT-1.2.zip

but there nothing in the source,

so I tried a night tarball (the 25 february) on
http://openscenegraph.org/downloads/developer/

but he say

g++ -M -I../../../include  ../Viewer.cpp  pipeto .depend/Viewer.cpp
g++ -M -I../../../include  ../GraphicsWindowX11.cpp  pipeto
.depend/GraphicsWindowX11.cpp
make[3]: quittant le répertoire « /home/elekis/Desktop/OpenSceneGraph-
1.2.0-200702251107/src/osgViewer/Linux32.Opt »
make[3]: entrant dans le répertoire « /home/elekis/Desktop/OpenSceneGraph-
1.2.0-200702251107/src/osgViewer/Linux32.Opt »
g++  -O2 -W -Wall -fPIC -pipe -DOSGVIEWER_LIBRARY -I../../../include  -c
../CompositeViewer.cpp
../CompositeViewer.cpp: In member function 'void osgViewer
::CompositeViewer::startThreading()':
../CompositeViewer.cpp:379: error: 'SetProcessorAffinityOfCurrentThread'
is not a member of 'OpenThreads'
make[3]: *** [CompositeViewer.o] Erreur 1
make[3]: quittant le répertoire « /home/elekis/Desktop/OpenSceneGraph-
1.2.0-200702251107/src/osgViewer/Linux32.Opt »
make[2]: *** [libosgViewer.so.opt] Erreur 2
make[2]: quittant le répertoire « /home/elekis/Desktop/OpenSceneGraph-
1.2.0-200702251107/src/osgViewer »
make[1]: *** [default] Erreur 1
make[1]: quittant le répertoire « /home/elekis/Desktop/OpenSceneGraph-
1.2.0-200702251107/src »
make: *** [default] Erreur 1
[EMAIL PROTECTED]:~/Desktop/OpenSceneGraph- 1.2.0-200702251107$

at the compilation

where can I found osgViewer???

thanks

a+++

On 2/25/07, Antoine Hue  [EMAIL PROTECTED] wrote:

 GNUMakefile provided with osgsimpleviewerQT4 is not very well suited for

 any QT install.
 Try attached .pro file:
 qmake-qt4 osgsimpleviewer.pro
 make -f Makefile
 ./your ARCH/osgsimpleviewerQT4/osgsimpleviewerQT4

 Robert, feel free to add this contribution to the OSG.

 Antoine

 elekis wrote:
  hi all
  I try to compil the QT4 example
  like here
 
 
http://openscenegraph.org/viewcvs/*checkout*/examples/osgsimpleviewerQT4/osgsimpleviewerQT4.cpp
  
http://openscenegraph.org/viewcvs/*checkout*/examples/osgsimpleviewerQT4/osgsimpleviewerQT4.cpp
 
 
  with
  g++ osgsimpleviewerQT4.cpp -losgViewer -losgText -losgGA -losgDB
  -losgUtil -losg -lQtOpenGL -lQtGui -lQtCore
 
  but the first error line are
 
  [EMAIL PROTECTED] :~/Desktop$
  [EMAIL PROTECTED]:~/Desktop$ g++ osgsimpleviewerQT4.cpp -losgViewer
  -losgText -losgGA -losgDB -losgUtil -losg -lQtOpenGL -lQtGui -lQtCore
  osgsimpleviewerQT4.cpp:6:34: error: osgViewer/SimpleViewer: Aucun
  fichier ou répertoire de ce type
  osgsimpleviewerQT4.cpp :10:25: error: QtCore/QTimer: Aucun fichier ou
  répertoire de ce type
  osgsimpleviewerQT4.cpp:11:27: error: QtGui/QKeyEvent: Aucun fichier ou

  répertoire de ce type
  osgsimpleviewerQT4.cpp:12:30: error: QtGui/QApplication: Aucun fichier
  ou répertoire de ce type
  osgsimpleviewerQT4.cpp:13:30: error: QtOpenGL/QGLWidget: Aucun fichier

  ou répertoire de ce type
  osgsimpleviewerQT4.cpp:17: error: expected class-name before ',' token
  osgsimpleviewerQT4.cpp:17: error: 'osgViewer' has not been declared
  osgsimpleviewerQT4.cpp :17: error: expected `{' before
 'GraphicsWindow'
  osgsimpleviewerQT4.cpp:17: error: invalid function declaration
 
 
  I don't understand is viewer not in osg package??(ubuntu fiesty fawn).

 
  thanks
 
 
 
 
 
  ___
  osg-users mailing list
  osg-users@openscenegraph.net
  http://openscenegraph.net/mailman/listinfo/osg-users
  http://www.openscenegraph.org/


 QT += opengl

 UNAME= $$system(uname -s)
 MACHINE= $$system(uname -m)
 contains(MACHINE, x86_64){
 ARCH=$${UNAME}64
 }else{
 ARCH=$${UNAME}32
 }

 LIBS += -L../../lib/$${ARCH}
 LIB_DIRS= $(OPENTHREADS_LIB_DIR)
 for(dir, LIB_DIRS) {
  exists($$dir){
 LIBS += -L$$dir
  }
 }

 LIBS += -losgDB -losgGA -losg -lOpenThreads  \
 -losgViewer -losgText -losgFX -losgUtil


 TEMPLATE = app

 TARGET = ./$$ARCH/osgsimpleviewerQT4

 CONFIG +=
 # debug
 #  warn_on

 FORMS +=

 RESOURCES=

 HEADERS +=

 SOURCES += osgsimpleviewerQT4.cpp

 INCLUDEPATH += ../../include $(OPENTHREADS_INC_DIR)


 OBJECTS_DIR=$${ARCH}


 ___
 osg-users mailing list
 osg-users@openscenegraph.net
 http://openscenegraph.net/mailman/listinfo/osg-users
 http://www.openscenegraph.org

[osg-users] compil svn source (undefined reference to `OpenThreads::SetProcessorAffinityOfCurrentThread)

2007-02-25 Thread elekis

hi

like said before I try to compil source from svn. after

svn co http://www.openscenegraph.com/svn/osg/OpenThreads/trunk/ OpenThreads
svn co http://www.openscenegraph.com/svn/osg/OpenSceneGraph/trunk/

I compil and install (make , sudo make install) OpenTreads .
I have a /usr/local/lilb/libOpenThreads.so.
I try to compil osg
and after 23 minuts , I have that

make[2]: entrant dans le répertoire «
/home/elekis/OSGSVN/trunk/applications/osgconv »
make[3]: entrant dans le répertoire «
/home/elekis/OSGSVN/trunk/applications/osgconv/Linux32.Opt »
g++ -M -I../../../include  -I/usr/X11R6/include
../OrientationConverter.cpp  pipeto .depend/OrientationConverter.cpp
g++ -M -I../../../include  -I/usr/X11R6/include  ../osgconv.cpp  pipeto
.depend/osgconv.cpp
make[3]: quittant le répertoire «
/home/elekis/OSGSVN/trunk/applications/osgconv/Linux32.Opt »
make[3]: entrant dans le répertoire «
/home/elekis/OSGSVN/trunk/applications/osgconv/Linux32.Opt »
g++  -O2 -W -Wall -fPIC -pipe -I../../../include  -I/usr/X11R6/include  -c
../OrientationConverter.cpp
g++  -O2 -W -Wall -fPIC -pipe -I../../../include  -I/usr/X11R6/include  -c
../osgconv.cpp
g++  -O2 -L/usr/X11R6/lib -L../../../lib/Linux32   OrientationConverter.o
osgconv.o   -lstdc++ -losgViewer -losgText -losg -losgUtil -losgGA -losgDB
-lGLU -lGL  -lOpenThreads   -o osgconv
../../../lib/Linux32/libosgViewer.so: undefined reference to
`OpenThreads::SetProcessorAffinityOfCurrentThread(unsigned int)'
collect2: ld returned 1 exit status
make[3]: *** [osgconv] Erreur 1
make[3]: quittant le répertoire «
/home/elekis/OSGSVN/trunk/applications/osgconv/Linux32.Opt »
make[2]: *** [osgconv.opt] Erreur 2
make[2]: quittant le répertoire «
/home/elekis/OSGSVN/trunk/applications/osgconv »
make[1]: *** [default] Erreur 1
make[1]: quittant le répertoire « /home/elekis/OSGSVN/trunk/applications »
make: *** [default] Erreur 1
[EMAIL PROTECTED]:~/OSGSVN/trunk$


I tried like said on a other mailing list to put

[EMAIL PROTECTED]:~/OSGSVN/trunk$ cat /etc/ld.so.conf
include /etc/ld.so.conf.d/*.conf
/usr/local/include/OpenThreads

but nothing change.

any idea??

thanks

a++
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

[osg-users] Re: pysosg trouble to install

2007-02-23 Thread elekis
::python::class_T, X1, X2, X3::class_(const char*,
boost::python::no_init_t) [with W = Producer::Camera, X1 =
held_ptrProducer::Camera, X2 = boost::python::basesProducer::Referenced,
OpenThreads::Thread, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_,
mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, X3 =
boost::noncopyable_::noncopyable]'
Producer/Camera.cpp:34:   instantiated from here
/usr/include/boost/python/object/make_ptr_instance.hpp:30: error: no
matching function for call to 'get_pointer(const
held_ptrProducer::Camera)'
/usr/include/boost/python/object/pointer_holder.hpp: In member function
'void* boost::python::objects::pointer_holderPointer,
Value::holds(boost::python::type_info, bool) [with Pointer =
held_ptrProducer::Camera, Value = Producer::Camera]':
Producer/Camera.cpp:204:   instantiated from here
/usr/include/boost/python/object/pointer_holder.hpp:125: error: no matching
function for call to 'get_pointer(held_ptrProducer::Camera)'
/usr/include/boost/python/object/pointer_holder.hpp:130: error: no matching
function for call to 'get_pointer(held_ptrProducer::Camera)'
scons: *** [Producer/Camera.os] Error 1
scons: building terminated because of errors.
[EMAIL PROTECTED]:~/Desktop/pyosg_devel$



any idea


thanks

a++




On 2/22/07, elekis [EMAIL PROTECTED] wrote:


hi all,
I try to install pyosg, but I have that error after  have made scons

[EMAIL PROTECTED]:~/Desktop/pyosg_devel$ scons
scons: Reading SConscript files ...
WARNING: no OSG_ROOT env var set, defaulting to /usr/local/lib

scons: *** Path for option PYTHON_INCLUDES does not exist:
/usr/include/python2.3
File /home/elekis/Desktop/pyosg_devel/SConstruct, line 78, in module
[EMAIL PROTECTED]:~/Desktop/pyosg_devel$


I ve tried export PYTHON_INCLUDES /usr/include/python2.5 but nothing
change
and I don't no where OSG_ROOT is it.

any idea ?

thanks

a++

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

[osg-users] pysosg trouble to install

2007-02-22 Thread elekis

hi all,
I try to install pyosg, but I have that error after  have made scons

[EMAIL PROTECTED]:~/Desktop/pyosg_devel$ scons
scons: Reading SConscript files ...
WARNING: no OSG_ROOT env var set, defaulting to /usr/local/lib

scons: *** Path for option PYTHON_INCLUDES does not exist:
/usr/include/python2.3
File /home/elekis/Desktop/pyosg_devel/SConstruct, line 78, in module
[EMAIL PROTECTED]:~/Desktop/pyosg_devel$


I ve tried export PYTHON_INCLUDES /usr/include/python2.5 but nothing change
and I don't no where OSG_ROOT is it.

any idea ?

thanks

a++
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Re: [osg-users] disable warning

2007-02-16 Thread elekis

thanks all


On 2/16/07, Robert Osfield [EMAIL PROTECTED] wrote:


Hi,

export OSG_NOTFIY_LEVEL=ALWAYS

Robert.


On 2/16/07, elekis [EMAIL PROTECTED] wrote:
 hi all,

 I don't remember witch sell variable I have to export to disable WARNING
 like that

 Warning:: Picked up error in TriangleIntersect
(-0.5 0.5 -0.5,  0.5 -0.5 -0.5,  -0.5 -0.5 -0.5)
(nan,nan,nan)


 is anybody can help me? thanks.

 and by the way where can I find the list of all export variable??

 thanks.


 a+++


 PS: I know I have Intersection it's a random simulation .

 thanks

 ___
 osg-users mailing list
 osg-users@openscenegraph.net
 http://openscenegraph.net/mailman/listinfo/osg-users
 http://www.openscenegraph.org/

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

[osg-users] disable warning

2007-02-15 Thread elekis

hi all,

I don't remember witch sell variable I have to export to disable WARNING
like that

Warning:: Picked up error in TriangleIntersect
  (-0.5 0.5 -0.5,  0.5 -0.5 -0.5,  -0.5 -0.5 -0.5)
  (nan,nan,nan)


is anybody can help me? thanks.

and by the way where can I find the list of all export variable??

thanks.


a+++


PS: I know I have Intersection it's a random simulation .

thanks
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Re: [osg-users] changing the node in viewer.setDataScene

2007-02-10 Thread elekis

On 2/8/07, Paul Speed [EMAIL PROTECTED] wrote:




elekis wrote:

 hi all

 I have a little probleme,

 I have two node who represent two differents things,

 and I would like to render one, and afer pushing a touch, changing on
 other

 something like that
 //init
 osg::Group* root = new osg::Group();
 osg::Group* root2 = new osg::Group();
 viewer.setSceneData( root );

 // after a action
 viewer.setSceneData( root2 );

 // after a other action
 viewer.setSceneData( root );

 I trying that, but that doesn't work.  (root 2 is accepted but core
 dumped just after)


 is it possible to do that??

Others have told you the better way to do this but in case you were
curious why it crashes the way you've done it, I'm pretty sure it's
because you aren't using ref_ptr's.  Once you set root2 then root is
removed from the scene and the reference count goes to zero.  This means
it is deleted.




No, I use  ref_ptr, here was just an example . thanks,
a++


Something like:

osg::ref_ptrosg::Group root = new osg::Group();
osg::ref_ptrosg::Group root2 = new osg::Group();

...would have made the rest work since you would then be holding your
own counted reference.

-Paul


 other thing
 I dunno if it's normal but

http://www.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/classosgProducer_1_1Viewer.html

 there are no getSceneData or my viewer is a osg::Producer


 thanks a+++




 

 ___
 osg-users mailing list
 osg-users@openscenegraph.net
 http://openscenegraph.net/mailman/listinfo/osg-users
 http://www.openscenegraph.org/
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

[osg-users] changing the node in viewer.setDataScene

2007-02-08 Thread elekis

hi all

I have a little probleme,

I have two node who represent two differents things,

and I would like to render one, and afer pushing a touch, changing on  other


something like that
//init
osg::Group* root = new osg::Group();
osg::Group* root2 = new osg::Group();
viewer.setSceneData( root );

// after a action
viewer.setSceneData( root2 );

// after a other action
viewer.setSceneData( root );

I trying that, but that doesn't work.  (root 2 is accepted but core dumped
just after)


is it possible to do that??

other thing
I dunno if it's normal but
http://www.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/classosgProducer_1_1Viewer.html

there are no getSceneData or my viewer is a osg::Producer


thanks a+++
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Re: [osg-users] changing the node in viewer.setDataScene

2007-02-08 Thread elekis

thnaks, thats works, except  in my code it's setSingleChildOn(0); (he didn't
recognize without On)


a++




On 2/8/07, Rafa Gaitan [EMAIL PROTECTED] wrote:


Hi elekis

You can use an osg::Switch node on top of your two scenes:

osg::Switch *switchRoot = new osg::Switch()
... your nodes...

switchRoot-addChild(root);
switchRoot-addChild(root2);
switchRoot-setSingleChild(0);

...

When you want change to the root2 scene only do:
http://www.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/classosg_1_1Switch.html#a17
switchRoot-setSingleChild(1);

Hope this helps to you.

Remember that you only can change the scene only after sync() and before
frame() calls.

--
Rafa.



On 2/8/07, elekis [EMAIL PROTECTED] wrote:

 hi all

 I have a little probleme,

 I have two node who represent two differents things,

 and I would like to render one, and afer pushing a touch, changing on
 other

 something like that
 //init
 osg::Group* root = new osg::Group();
 osg::Group* root2 = new osg::Group();
 viewer.setSceneData( root );

 // after a action
 viewer.setSceneData( root2 );

 // after a other action
 viewer.setSceneData( root );

 I trying that, but that doesn't work.  (root 2 is accepted but core
 dumped just after)


 is it possible to do that??

 other thing
 I dunno if it's normal but

 
http://www.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/classosgProducer_1_1Viewer.html

 there are no getSceneData or my viewer is a osg::Producer


 thanks a+++




 ___
 osg-users mailing list
 osg-users@openscenegraph.net
 http://openscenegraph.net/mailman/listinfo/osg-users
 http://www.openscenegraph.org/



___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Re: [osg-users] changing the node in viewer.setDataScene

2007-02-08 Thread elekis

On 2/8/07, Robert Osfield [EMAIL PROTECTED] wrote:


Hi,

With osgProducer::Viewer you'd be best toggling the using a Switch.

With osgViewer::Viewer it can handle a setSceneData/getSceneData()
without problems.



what is the difference between osgProducer and osgViewer?? whitch is the
best?

a£++



Robert.


On 2/8/07, elekis [EMAIL PROTECTED] wrote:
 hi all

 I have a little probleme,

 I have two node who represent two differents things,

 and I would like to render one, and afer pushing a touch, changing
on  other

 something like that
 //init
  osg::Group* root = new osg::Group();
 osg::Group* root2 = new osg::Group();
  viewer.setSceneData( root );

 // after a action
 viewer.setSceneData( root2 );

 // after a other action
 viewer.setSceneData( root );

 I trying that, but that doesn't work.  (root 2 is accepted but core
dumped
 just after)


 is it possible to do that??

 other thing
 I dunno if it's normal but

http://www.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/classosgProducer_1_1Viewer.html

 there are no getSceneData or my viewer is a osg::Producer


 thanks a+++




 ___
 osg-users mailing list
 osg-users@openscenegraph.net
 http://openscenegraph.net/mailman/listinfo/osg-users
 http://www.openscenegraph.org/

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

[osg-users] Re: My RemoveChild doesn't work

2007-02-07 Thread elekis

ok I found, I was a error in my code.

thanks a all

On 2/7/07, elekis [EMAIL PROTECTED] wrote:


hi all,

I made a class who have to draw a simple line (see below)
but I don't know why when I delete CLine class, the line is always visible
(but the class is well deleted)

I put the code of the class.

++
class CLine{


private:
osg::ref_ptrosg::Geode SegmentGeode;
osg::ref_ptrosg::Geometry SegmentGeometry;

   public:

CLine(  double x1,double y1,double z1, double x2,double
y2,double z2);

~CLine();

};
-



CLine::CLine(  double x1,double y1,double z1,
double x2,double y2,double z2){

SegmentGeode = new osg::Geode();   //
SegmentGeometry = new osg::Geometry();

SegmentGeode-addDrawable(SegmentGeometry.get());
CGeneral::instance().root-addChild(SegmentGeode.get());

osg::Vec3Array* SegmentVertices = new osg::Vec3Array;
SegmentVertices-push_back( osg::Vec3( x1, y1, z1) );
SegmentVertices-push_back( osg::Vec3( x2, y2, z2) );

SegmentGeometry-setVertexArray( SegmentVertices );
osg::DrawElementsUInt* SegmentBase = new
osg::DrawElementsUInt(osg::PrimitiveSet::LINES, 0);
SegmentBase-push_back(0);
SegmentBase-push_back(1);
SegmentGeometry-addPrimitiveSet(SegmentBase);

osg::Vec4Array* colors = new osg::Vec4Array;
colors-push_back(osg::Vec4(1.0f,1.0f,0.0f,1.0f));
SegmentGeometry-setColorArray(colors);
SegmentGeometry-setColorBinding(osg::Geometry::BIND_PER_VERTEX);

CGeneral::instance().root-addChild(SegmentGeode.get());
}

CLine::~CLine(){

CGeneral::instance().root-removeChild(SegmentGeode.get());
SegmentGeode = 0;

}




THANKS;

a

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

[osg-users] My RemoveChild doesn't work

2007-02-06 Thread elekis

hi all,

I made a class who have to draw a simple line (see below)
but I don't know why when I delete CLine class, the line is always visible
(but the class is well deleted)

I put the code of the class.

++
class CLine{


   private:
   osg::ref_ptrosg::Geode SegmentGeode;
   osg::ref_ptrosg::Geometry SegmentGeometry;

  public:

   CLine(  double x1,double y1,double z1, double x2,double
y2,double z2);

   ~CLine();

};
-


CLine::CLine(  double x1,double y1,double z1,
   double x2,double y2,double z2){

   SegmentGeode = new osg::Geode();   //
   SegmentGeometry = new osg::Geometry();

   SegmentGeode-addDrawable(SegmentGeometry.get());
   CGeneral::instance().root-addChild(SegmentGeode.get());

   osg::Vec3Array* SegmentVertices = new osg::Vec3Array;
   SegmentVertices-push_back( osg::Vec3( x1, y1, z1) );
   SegmentVertices-push_back( osg::Vec3( x2, y2, z2) );

   SegmentGeometry-setVertexArray( SegmentVertices );
   osg::DrawElementsUInt* SegmentBase = new
osg::DrawElementsUInt(osg::PrimitiveSet::LINES, 0);
   SegmentBase-push_back(0);
   SegmentBase-push_back(1);
   SegmentGeometry-addPrimitiveSet(SegmentBase);

   osg::Vec4Array* colors = new osg::Vec4Array;
   colors-push_back(osg::Vec4(1.0f,1.0f,0.0f,1.0f));
   SegmentGeometry-setColorArray(colors);
   SegmentGeometry-setColorBinding(osg::Geometry::BIND_PER_VERTEX);

   CGeneral::instance().root-addChild(SegmentGeode.get());
}

CLine::~CLine(){

   CGeneral::instance().root-removeChild(SegmentGeode.get());
   SegmentGeode = 0;

}




THANKS;

a
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Re: [osg-users] drawing a simple segment

2007-02-02 Thread elekis

thanks,

On 2/2/07, Robert Osfield [EMAIL PROTECTED] wrote:


Hi Elekis,

There isn't a convenience function for building a single line segment,
you'll need to build it up yourself. See the osggeometry example for
guidance.

Robert.

On 2/2/07, elekis [EMAIL PROTECTED] wrote:
 hi all,
 I have a little trouble,
 I try to draw a simple segment, but I have no idea witch is the best
idea.

 what I mean is I have a point A(a1,a2,a3) and a other point B(b1,b2,b3)
 and I want to draw the segment AB.

 is there any class who make that??or I have to construct that by
myself??


 thanks

 ___
 osg-users mailing list
 osg-users@openscenegraph.net
 http://openscenegraph.net/mailman/listinfo/osg-users
 http://www.openscenegraph.org/

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Re: [osg-users] reload the viewer

2007-01-31 Thread elekis

thanks a lot thats work, but I would like to do automaticly after a
call function
how to simulate the space touch??


thanks



On 1/30/07, Jeremy L. Moles [EMAIL PROTECTED] wrote:

On Tue, 2007-01-30 at 23:32 +0100, elekis wrote:
 hi, for a project, I use the default osgProducer like that:

   viewer.setUpViewer(osgProducer::Viewer::STANDARD_SETTINGS);
viewer.setSceneData( root );

viewer.realize();

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

 it's very perfect for what I need except for one thing. when I move
 some object they can go out of the vision of the camera.
 is it possible to recalculate the entiere box of the all the scene and
 say that to viewer ?? or for that it's a obligation to have a camera
 with a config, etc..Etc...

If you're really using the Producer viewer AND haven't changed any of
the event handling stuff (and you appear to be calling setUpViewer), I
think all you would need to do is press the SpaceBar. :)

 thanks a+++
 ___
 osg-users mailing list
 osg-users@openscenegraph.net
 http://openscenegraph.net/mailman/listinfo/osg-users
 http://www.openscenegraph.org/


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


[osg-users] reload the viewer

2007-01-30 Thread elekis

hi, for a project, I use the default osgProducer like that:

 viewer.setUpViewer(osgProducer::Viewer::STANDARD_SETTINGS);
  viewer.setSceneData( root );

  viewer.realize();

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

it's very perfect for what I need except for one thing. when I move
some object they can go out of the vision of the camera.
is it possible to recalculate the entiere box of the all the scene and
say that to viewer ?? or for that it's a obligation to have a camera
with a config, etc..Etc...

thanks a+++
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] How can I find objects in scene

2006-12-24 Thread elekis

http://www.nps.navy.mil/cs/sullivan/osgtutorials/osgDOF.html

On 12/23/06, Drew Whitehouse [EMAIL PROTECTED] wrote:

Take a look at examples/osgplanets/osgplanets.cpp. You use a Visitor
to traverse the scene graph. In this case the FindNamedNodeVisitor is
collecting the nodes that match a parcticular name eg
FindNamedNodeVisitor fnnv(Moon);.

-Drew

On 12/24/06, GMD GammerMaxyandex.ru [EMAIL PROTECTED] wrote:

 How can I find objects in scene by name(to the following change of
 position, turn and ranging)?
 Operation speed is very important.
 ___
 osg-users mailing list
 osg-users@openscenegraph.net
 http://openscenegraph.net/mailman/listinfo/osg-users
 http://www.openscenegraph.org/




--
Drew Whitehouse
ANU Supercomputer Facility Vizlab
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


[osg-users] number of side in cylinder and cone

2006-12-24 Thread elekis

hi all,

I have to use cylinder and cone shape, but osg represent that
spericaly (is it english??)
is it possible to say to osg the number of side of cylinder and cone.

and for example a cylinder with 4 side is a rectangle, and a cone with
4 sides is a pyramid.

if I ask that, is cause I need a form like that, but the number of
side represent something and so it's know at runtime.

is it possible.
thanks..
a++


Capture.png
Description: PNG image
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

[osg-users] [LONG] simple example about osg, gtkdrawingarea and glade

2006-12-21 Thread elekis

hi all,

I have to do some simulations in c++, and for the first time, I have
to use the gtk and osg.
I have to use osg in a gtk window(drawingarea I suppose)  and the
inteface is creating with libglade.

but I have lots of difficult.
is there any tutorial example or anything other  stuff who  can help
me to connect this three library ..???

for example. there is my glade file.

--
?xml version=1.0 encoding=UTF-8 standalone=no?
!DOCTYPE glade-interface SYSTEM glade-2.0.dtd
!--Generated with glade3 3.0.2 on Thu Dec 21 18:41:06 2006 by [EMAIL 
PROTECTED]
glade-interface
 widget class=GtkWindow id=window1
   child
 widget class=GtkDrawingArea id=drawingarea1
   property name=visibleTrue/property
 /widget
   /child
 /widget
/glade-interface


like you see it's just a simple window with a drawingarea.

and there is my c++ file.
--
#include gtk/gtk.h
#include glade/glade.h

int main (int argc, char **argv)
{
   GladeXML *xml;
   gtk_init(argc, argv);

   glade_init();
   xml = glade_xml_new(../ConfigFile/WindowsView.glade, window1, NULL);

   if (!xml) {
   g_warning(problem while loading the .glade file);
   return 1;
   }
   GtkWidget *window1 = glade_xml_get_widget (xml, window1);
   gtk_widget_show (window1);
   gtk_main();

   return 0;
}


like you see too, it's not so complicate but How to connect the osg
with the drawing area.
is a drawing area I have to use (that's what I read, but how to use
gtkmm with it??)

thanks a lot.
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


[osg-users] where is the delete operator??

2006-12-06 Thread elekis

hi all,

I have to use the osg for a work so I learn with

http://www.nps.navy.mil/cs/sullivan/osgtutorials/osgGeometry.htm


but I have some question about the code, there are a lot of new, where
are the delete?? is osg take in charge that??

second thing
after a thing like that
root-addChild(pyramidGeode);

how to remove a child?? or simply say do not draw it??



thanks a lot
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Fwd: [osg-users] where is the delete operator??

2006-12-06 Thread elekis

thanks a lot

-- Forwarded message --
From: Robert Osfield [EMAIL PROTECTED]
Date: Dec 6, 2006 4:00 PM
Subject: Re: [osg-users] where is the delete operator??
To: osg users osg-users@openscenegraph.net


On 12/6/06, elekis [EMAIL PROTECTED] wrote:

hi all,

I have to use the osg for a work so I learn with

http://www.nps.navy.mil/cs/sullivan/osgtutorials/osgGeometry.htm


but I have some question about the code, there are a lot of new, where
are the delete?? is osg take in charge that??

second thing
after a thing like that
root-addChild(pyramidGeode);

how to remove a child?? or simply say do not draw it??


root-removeChild(pyramidGeode) ;-)

The OSG uses ref counting of all scene graph objects, a consequence is
that most destructors are private to stop you from deleting objects
inappropriately.  Using ref_ptr's is the way to retain robust
pointers to scene graph objects, and this smart pointer will manage
the reference counting and automatic deletion for you.

See Don Burns' article on this topic:

 http://donburns.net/OSG/Articles/RefPointers/RefPointers.html

Robert.
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


[osg-users] [LONG]some questions about osg

2006-09-15 Thread elekis

hi all,
I need a little help to understand osg and other thing who turn
around(it's for a student work)

1) Studiing osg, I fallen on Colosseum3D. What's the link with osg ??
is it the same thing? must I use colo instead osg ???

2) I have to use physic law like gravitation, repulstion force and
spring force(hook's law).
reading the doc , I found more than one physic interface. ODE,
osgVortex, and Vortex. what's the big deal?? If I all understood , ODE
is openSource but instable and very difficult to use.
Vortex is complex and non-free and osg vortex is an interface for
Vortex?? is that true??


3) is exist a save format file in osg , I mean If I have a world
(creating dinamicly for exemple) is it possible to save him.
automaticly ??

4) what is osv format file. if I understood it's a vortex format but...

5)about animation , what osg can do , is there a key-frame system, md5
or other thing.

6) is there a posibility to export animation as avi file or other
stuff like that??


thanks a lot for all

a+++
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] [LONG]some questions about osg

2006-09-15 Thread elekis

thanks a lot

On 9/15/06, Robert Osfield [EMAIL PROTECTED] wrote:

Hi Elekis,


On 9/15/06, elekis [EMAIL PROTECTED] wrote:
 hi all,
 I need a little help to understand osg and other thing who turn
 around(it's for a student work)

 1) Studiing osg, I fallen on Colosseum3D. What's the link with osg ??
 is it the same thing? must I use colo instead osg ???


Colosseum3D is a VR framework built ontop of the OpenSceneGraph and a number
of other open source and closed source toolkits.

Delta3D is another open source framework/engine that similiarily sits upon
OpenSceneGraph for graphics, and then other open source toolkits for other
features.

There other frameworks/engines too that sit ontop of OpenSceneGraph, as to
what to use its all down to the type of app you are planning to develop.


 2) I have to use physic law like gravitation, repulstion force and
 spring force(hook's law).
 reading the doc , I found more than one physic interface. ODE,
 osgVortex, and Vortex. what's the big deal?? If I all understood , ODE
 is openSource but instable and very difficult to use.
 Vortex is complex and non-free and osg vortex is an interface for
 Vortex?? is that true??


osgVortex integrates OSG and Vortex, Vortex is developed as closed source by
CMLabs so you'll have to purchase a license.  It is well recongised as one
of the best physics engines in the business.



 3) is exist a save format file in osg , I mean If I have a world
 (creating dinamicly for exemple) is it possible to save him.
 automaticly ??

 4) what is osv format file. if I understood it's a vortex format but...


Can't comment on this, I'm not familiar at the code/usage level of
Colossem3D.

 5)about animation , what osg can do , is there a key-frame system, md5
 or other thing.


There are the osgCal, Replicant and osgCharacter projects sitting on the
community section of the website.


 6) is there a posibility to export animation as avi file or other
 stuff like that??


?  avi is for video is it not.

Robert.

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/



___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/