[osg-users] NodetrackerManipulator crashes on activation if no Node is tracked.

2011-02-11 Thread Torben Dannhauer
Hi,

My osgGa::NodeTrackerManipulator crashes if it is activated before 
setTrackNode(..) is called.

Do I make a mistake or is the NodeTrackerManipulator not secured against 
activation prior to a well defined node to track?



Thank you!

Cheers,
Torben

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





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


Re: [osg-users] NodetrackerManipulator crashes on activation if no Node is tracked.

2011-02-11 Thread Robert Osfield
Hi Torben,

The manipulator shouldn't crash so this will be bug due to an
assumption of having a valid nodepath somewhere in the code.

Do you have a stack trace for the crash?  Which version of the OSG are
you using?

Robert.

On Fri, Feb 11, 2011 at 8:28 AM, Torben Dannhauer tor...@dannhauer.info wrote:
 Hi,

 My osgGa::NodeTrackerManipulator crashes if it is activated before 
 setTrackNode(..) is called.

 Do I make a mistake or is the NodeTrackerManipulator not secured against 
 activation prior to a well defined node to track?



 Thank you!

 Cheers,
 Torben

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





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

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


[osg-users] WindowManager lifecycle

2011-02-11 Thread Gianni Ambrosio
Hi All,
I'm trying to understand osgWidget library and I have a basic question.

In the related examples I see an osgWidget::WindowManager instance is created 
on the heap but never deleted explicitly. Is the associated viewer responsible 
of the WindowManager deletion or should I delete it somewhere?

Regards
Gianni

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





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


Re: [osg-users] NodetrackerManipulator crashes on activation if no Node is tracked.

2011-02-11 Thread Torben Dannhauer
Hi Robert,

The stack trace is:

Code:

   osg71-osgGAd.dll!std::_Vector_const_iteratorosg::Node 
 *,std::allocatorosg::Node * ::operator+=(int _Off=-1)  Zeile 161 + 0x60 
 Bytes C++
osg71-osgGAd.dll!std::_Vector_iteratorosg::Node 
*,std::allocatorosg::Node * ::operator+=(int _Off=-1)  Zeile 376C++
osg71-osgGAd.dll!std::_Vector_iteratorosg::Node 
*,std::allocatorosg::Node * ::operator-=(int _Off=1)  Zeile 388 C++
osg71-osgGAd.dll!std::_Vector_iteratorosg::Node 
*,std::allocatorosg::Node * ::operator-(int _Off=1)  Zeile 393 + 0xc Bytes  
C++
osg71-osgGAd.dll!std::vectorosg::Node *,std::allocatorosg::Node * 
::back()  Zeile 800 + 0x2a Bytes  C++

osg71-osgGAd.dll!osgGA::NodeTrackerManipulator::computeNodeCenterAndRotation(osg::Vec3d
  nodeCenter={...}, osg::Quat  nodeRotation={...})  Zeile 171 + 0x12 Bytes
 C++




It is caused in NodeTrackerManipulator::computeNodeCenterAndRotation(..):

Code:

nodeCenter = osg::Vec3d(nodePath.back()-getBound().center())*localToWorld;




It Crashes because nodePath is empty, so nodePath.back does not work.

Where is the best place to ensure that nodepath is not empty?

Thank you!

Cheers,
Torben

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





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


Re: [osg-users] NodetrackerManipulator crashes on activation if no Node is tracked.

2011-02-11 Thread Robert Osfield
Hi Torben  Mourad,

I have added a check against the getNodePath() being empty() to
computeNodeCenterAndRotation() method and checked it into svn/trunk.
The relevant code now looks like:

osg::NodePath nodePath;
if (_trackNodePath.getNodePath(nodePath)  !nodePath.empty())
nodeCenter =
osg::Vec3d(nodePath.back()-getBound().center())*localToWorld;
else
nodeCenter = osg::Vec3d(0.0f,0.0f,0.0f)*localToWorld;

Could you let me know how you get on?

Robert.

On Fri, Feb 11, 2011 at 9:04 AM, Torben Dannhauer tor...@dannhauer.info wrote:
 Hi Robert,

 The stack trace is:

 Code:

       osg71-osgGAd.dll!std::_Vector_const_iteratorosg::Node 
 *,std::allocatorosg::Node * ::operator+=(int _Off=-1)  Zeile 161 + 0x60 
 Bytes C++
        osg71-osgGAd.dll!std::_Vector_iteratorosg::Node 
 *,std::allocatorosg::Node * ::operator+=(int _Off=-1)  Zeile 376    C++
        osg71-osgGAd.dll!std::_Vector_iteratorosg::Node 
 *,std::allocatorosg::Node * ::operator-=(int _Off=1)  Zeile 388     C++
        osg71-osgGAd.dll!std::_Vector_iteratorosg::Node 
 *,std::allocatorosg::Node * ::operator-(int _Off=1)  Zeile 393 + 0xc Bytes 
  C++
        osg71-osgGAd.dll!std::vectorosg::Node *,std::allocatorosg::Node * 
 ::back()  Zeile 800 + 0x2a Bytes  C++
        
 osg71-osgGAd.dll!osgGA::NodeTrackerManipulator::computeNodeCenterAndRotation(osg::Vec3d
   nodeCenter={...}, osg::Quat  nodeRotation={...})  Zeile 171 + 0x12 Bytes  
    C++




 It is caused in NodeTrackerManipulator::computeNodeCenterAndRotation(..):

 Code:

 nodeCenter = osg::Vec3d(nodePath.back()-getBound().center())*localToWorld;




 It Crashes because nodePath is empty, so nodePath.back does not work.

 Where is the best place to ensure that nodepath is not empty?

 Thank you!

 Cheers,
 Torben

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





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

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


Re: [osg-users] Using osgShadows I can't see widgets

2011-02-11 Thread daniele argiolas
ok, solved!

thank you!!!

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





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


Re: [osg-users] osgShadow texture problem

2011-02-11 Thread daniele argiolas
In attachment osg file that doesn't work. When I activate osgShadow, I can't 
see texture.

In osg file there's field textureUnit 0 {}. If I remove this and change, 
texture works.

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



PositionAttitudeTransform {
  name Collada visual scene group
  nodeMask 0x
  cullingActive TRUE
  StateSet {
DataVariance STATIC
rendering_hint DEFAULT_BIN
renderBinMode INHERIT
  }
  referenceFrame RELATIVE
  position 0 0 0
  attitude 0.707107 0 0 0.707107
  scale 1 1 1
  pivotPoint 0 0 0
  num_children 1
  MatrixTransform {
name Strada_Dritta_01
nodeMask 0x
cullingActive TRUE
referenceFrame RELATIVE
Matrix {
  1 0 0 0
  0 1 0 0
  0 0 1 0
  0 0 0 1
}
num_children 1
Geode {
  nodeMask 0x
  cullingActive TRUE
  num_drawables 1
  Geometry {
DataVariance STATIC
name lambert4SG
StateSet {
  DataVariance STATIC
  rendering_hint DEFAULT_BIN
  renderBinMode INHERIT
  GL_CULL_FACE ON
  Material {
ColorMode OFF
ambientColor 0 0 0 1
diffuseColor 1 1 1 1
specularColor 0 0 0 1
emissionColor 0 0 0 1
shininess 0
  }
  textureUnit 0 {
  }
  textureUnit 1 {
GL_TEXTURE_2D ON
Texture2D {
  file C:\\Documents and Settings\\All 
Users\\Documenti\\ARGame\\Texture_DEF\\Strada_Dritto.jpg
  wrap_s REPEAT
  wrap_t REPEAT
  wrap_r CLAMP
  min_filter LINEAR_MIPMAP_LINEAR
  mag_filter LINEAR
  maxAnisotropy 1
  borderColor 0 0 0 0
  borderWidth 0
  useHardwareMipMapGeneration TRUE
  unRefImageDataAfterApply TRUE
  internalFormatMode USE_IMAGE_DATA_FORMAT
  resizeNonPowerOfTwo TRUE
  shadowComparison FALSE
  shadowCompareFunc GL_LEQUAL
  shadowTextureMode GL_LUMINANCE
}
TexEnv {
  mode MODULATE
}
  }
}
useDisplayList TRUE
useVertexBufferObjects FALSE
PrimitiveSets 1
{
  DrawElementsUInt TRIANGLES 132
  {
0 3 6 6 3 8 40 43 49 49
43 46 10 12 14 14 12 17 36 38
1 1 38 4 5 39 9 9 39 30
37 2 33 33 2 7 55 52 61 61
52 58 15 26 11 11 26 23 16 18
27 27 18 28 20 29 13 13 29 19
34 31 24 24 31 21 26 37 23 23
37 33 27 28 36 36 28 38 30 39
20 20 39 29 6 8 41 41 8 44
9 30 45 45 30 47 32 35 48 48
35 50 33 7 51 51 7 42 25 22
56 56 22 53 20 13 54 54 13 59
12 10 60 60 10 62 11 23 63 63
23 57 
  }
}
VertexArray Vec3Array 64
{
  0.999613 0 0.999415
  0.999613 0 0.999415
  0.999613 0 0.999415
  0.999613 0 -0.999398
  0.999613 0 -0.999398
  0.999613 0 -0.999398
  0.999613 0.00739819 0.999415
  0.999613 0.00739819 0.999415
  0.999613 0.00739819 -0.999398
  0.999613 0.00739819 -0.999398
  -0.999199 0.00739819 0.999415
  -0.999199 0.00739819 0.999415
  -0.999199 0.00739819 -0.999398
  -0.999199 0.00739819 -0.999398
  -0.999199 0 0.999415
  -0.999199 0 0.999415
  -0.999199 0 0.999415
  -0.999199 0 -0.999398
  -0.999199 0 -0.999398
  -0.999199 0 -0.999398
  -0.807709 0.00739819 -0.999398
  -0.807709 0.00739819 -0.999398
  -0.807709 0.00739819 -0.999398
  -0.807709 0.00739819 0.999415
  -0.807709 0.00739819 0.999415
  -0.807709 0.00739819 0.999415
  -0.807709 0 0.999415
  -0.807709 0 0.999415
  -0.807709 0 -0.999398
  -0.807709 0 -0.999398
  0.807909 0.00739819 -0.999398
  0.807909 0.00739819 -0.999398
  0.807909 0.00739819 -0.999398
  0.807909 0.00739819 0.999415
  0.807909 0.00739819 0.999415
  0.807909 0.00739819 0.999415
  0.807909 0 0.999415
  0.807909 0 0.999415
  0.807909 0 -0.999398
  0.807909 0 -0.999398
  0.999613 0.0239958 0.999415
  0.999613 0.0239958 0.999415
  0.999613 0.0239958 0.999415
  0.999613 0.0239958 -0.999398
  0.999613 0.0239958 -0.999398
  0.999613 0.0239958 -0.999398
  0.807909 0.0239958 -0.999398
  0.807909 0.0239958 -0.999398
  0.807909 0.0239958 -0.999398
  0.807909 0.0239958 0.999415
  0.807909 0.0239958 0.999415
  0.807909 0.0239958 0.999415
  -0.807709 0.0239958 -0.999398
  -0.807709 0.0239958 -0.999398
  -0.807709 0.0239958 

[osg-users] WindowManager root

2011-02-11 Thread Gianni Ambrosio
Hi All,
is there a root node for all widgets inserted in a WindowManager?

I mean, I use a root node for 3D objects in my viewer and I would like to have 
the same feature for widgets. In fact in my scene manager I store a Group node 
to which I add all other nodes without using a viewer pointer again. I just add 
the group root node once to the viewer (on init) and the 3D scene is updated 
automatically just adding a child to that group root node.

I would like the same feature for widgets without having to add every new 
widget to the window manager explicitly. Is that possible? I tried to find a 
general widget in vain. The Box must specify the BoxType so it is not a nice 
solution. The Window class is virtual and can not be used directly as a root 
instance. Any idea?

Regards
Gianni

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





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


Re: [osg-users] WindowManager lifecycle

2011-02-11 Thread Jean-Sébastien Guay

Hello Gianni,


In the related examples I see an osgWidget::WindowManager instance is created 
on the heap but never deleted explicitly. Is the associated viewer responsible 
of the WindowManager deletion or should I delete it somewhere?


Like most objects in OSG, the WindowManager is reference-counted. As 
long as its reference count falls to 0 at some point, it will be deleted.


In the case of the osgWidget examples, for instance I took a look at 
osgwidgetwindow, the window manager is added as a child of a camera. any 
subclass of osg::Group manages its children in an std::vector of 
osg::ref_ptrs, so the window manager will be reference counted. When the 
camera is deleted, it will decrement the reference count of all its 
children, so the window manager will be deleted by cascade effect (if no 
other reference to it exists).


So the flow is:

int main(int argc, char** argv)
{

  osgWidget::WindowManager* wm = ...;
  // wm's reference count is 0, see ctor of osg::Referenced

  // ...

  camera-addChild(wm);
  // wm's reference count becomes 1

  // ...
  group-addChild(camera);
  // ...
  viewer.setSceneData(group);

  return viewer.run();
}

// At this point, the viewer goes out of scope (it's on the stack) so
// its destructor is called. Its destructor calls the destructor of all
// member variables, including its camera and its scene data which are
// stored in ref_ptrs. Since the scene (the group variable above) is
// deleted, all its children have their reference count decremented, so
// the WindowManager's reference count becomes 0, and it is deleted too.

Hope this helps,

J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [vpb] VPB Latest build

2011-02-11 Thread Vijeesh Theningaledathil
Hi,
Thanks. I'm getting the error Error: glGenBuffers not supported by OpenGL 
driver Also 
Error: glBindBuffer/glBufferData not supported by OpenGL driver. Is it the 
issue. I'll try on some other graphics card. 


Thank you!

Cheers,
Vijeesh

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





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


Re: [osg-users] LineSegmentIntersector which objects are returned?

2011-02-11 Thread Heiko Thiel
Hi Robert,


robertosfield wrote:
 Secondly the intersections you get returned return the leaf node and
 drawable that is intersected along with the node path from the root of
 the intersection traversal down to the leaf node that was intersected.


you found my problem: I forgot that the demo access only the leaf node, so I 
can solve may problem by searching right node on nodePath.

But I can't use nodePath like expected. To play a little bit with the nodePath 
I wanted to print all names of nodes

So my first try was:

Code:
bool nodeFound = false;
for(osgUtil::LineSegmentIntersector::Intersections::iterator hitr = 
intersections.begin(); hitr != intersections.end(); ++hitr)
{
  osg::NodePath path = hitr-nodePath;
  for(osg::NodePath::iterator hitNodeIt = path = hitr-nodePath.begin(); 
hitNodeIt != path = hitr-nodePath.end(); ++hitNodeIt)
  {
if (hitNodeIt-getName())
{
  nodeFound = true;
  std::cout  hitNodeIt-getName();
}
  }
  if (nodeFound) break;
}



Then I got:

 IntelliSense: Es ist keine passende benutzerdefinierte Konvertierung von  
 std::_Vector_const_iteratorstd::_Vector_valosg::Node *, 
 std::allocatorosg::Node * in 
 std::_Vector_iteratorstd::_Vector_valosg::Node *, 
 std::allocatorosg::Node * vorhanden.


So I tried this:

Code:
bool nodeFound = false;
for(osgUtil::LineSegmentIntersector::Intersections::iterator hitr = 
intersections.begin(); hitr != intersections.end(); ++hitr)
{
  for(osg::NodePath::const_iterator hitNodeIt = hitr-nodePath.begin(); 
hitNodeIt != hitr-nodePath.end(); ++hitNodeIt)
  {
if (hitNodeIt-getName())
{
  nodeFound = true;
  std::cout  hitNodeIt-getName();
}
  }
  if (nodeFound) break;
}


But this won't compile too:

 error C2039: 'getName': Ist kein Element von 
 'std::_Vector_const_iterator_Myvec'
 error C2839: Ungültiger Rückgabetyp 'osg::Node *const *' für überladenen 
 Operator '-'
 IntelliSense: Der Ausdruck muss den Typ pointer-to-class aufweisen.
 


Any idea?

Heiko

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





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


Re: [osg-users] [vpb] VPB Latest build

2011-02-11 Thread Robert Osfield
Hi Vijeesh,

I a bit surprised by these errors, is this still in the context of VPB
usage?  VPB shouldn't be touching glGenBuffers/glBindBuffers during
execution.

What drivers/hardware are you working with?

Robert.


On Fri, Feb 11, 2011 at 2:12 PM, Vijeesh Theningaledathil
vije...@nal.res.in wrote:
 Hi,
 Thanks. I'm getting the error Error: glGenBuffers not supported by OpenGL 
 driver Also
 Error: glBindBuffer/glBufferData not supported by OpenGL driver. Is it the 
 issue. I'll try on some other graphics card.


 Thank you!

 Cheers,
 Vijeesh

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





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

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


Re: [osg-users] Line-laser based, 3D point cloud capture from camera

2011-02-11 Thread ted morris
thats it... and interesting feedback- I see the green lasers cost
significantly more.

thanks all!

On Wed, Feb 9, 2011 at 1:35 PM, Ted Morris ted.mor...@gmail.com wrote:

 Hi,

 I accidentally submitted the last post with a horrible subject line. So
 this is a repost.

 I seem to recall recent a post perhaps about a month ago about sofware to
 capture 3D objects using a laser generated line and camera. Would anyone
 have recollection or info on that?

 I'm very sorry for the 'double-post'!,

 Cheers,
 Ted

 Thank you!

 Cheers,
 Ted

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





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

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


Re: [osg-users] LineSegmentIntersector which objects are returned?

2011-02-11 Thread Jean-Sébastien Guay

Hello Heiko,


But this won't compile too:


error C2039: 'getName': Ist kein Element von 
'std::_Vector_const_iterator_Myvec'
error C2839: Ungültiger Rückgabetyp 'osg::Node *const *' für überladenen Operator 
'-'
IntelliSense: Der Ausdruck muss den Typ pointer-to-class aufweisen.


Any idea?


I think you just need to check the types of what you're using... 
hitNodeIt is an osg::NodePath::iterator. This expands to 
std::vectorosg::Node*::iterator (you are in Visual Studio, so you can 
press F12 with the cursor on osg::NodePath to see what type it really 
is, you'll see it's a typedef of std::vectorosg::Node* or something 
similar). So to be able to call getName() you need to do:


(*hitNodeIt)-getName()

Hope this helps,

J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Z Buffer linearisation and DO_NOT_COMPUTE_NEAR_FAR

2011-02-11 Thread John Simpson
The algorithm I mentioned is correct but I'd forgotten to account for the fact 
that I was set up so that the far reported as 0 and the near as 1. My code now 
reads 

LinearDepth = 1.0 - ((2.0*near)/(far+near-(1.0-nonLinearDepth*(far-near)))

I can now select/deselect DO_NOT_COMPUTE_NEAR_FAR and get similar results. It's 
not tested yet and I'm not sure where the discrepancies occur but I'm in the 
right ball park at least.

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





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


Re: [osg-users] LineSegmentIntersector which objects are returned?

2011-02-11 Thread Heiko Thiel
Hi,

you are right :). I tried this myself before and saw that VS show me 
nevertheless an error. But didnt seen that the error message changed (I had 
forgot the .empty() on comparism) ;)

Thank you!

Cheers,
Heiko

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





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


[osg-users] Terrain paging for fast movers?

2011-02-11 Thread Duvan Cope
Hello OSGers!

I was wondering what kind of mechanisms OSG currently has, or if there is a
plugin, that would allow warping the ranges of predetermined LOD/Tiles from
a Terrapage database based on the velocity of the view.  So I can use the
velocity vector as a bias to allow paging in terrain or higher LOD geometry
that is in the path of motion sooner than would normally be done if strictly
following the Terrapage Database's data (the created PagedLOD nodes in
combination with the DatabasePager from the Txp reader writer).

As I see it, I would have to edit the Txp reader writer to incorporate
warping the range fields based on the velocity vector myself in its
TXPPagedLOD, along with adding the ability to query the view's velocity from
the TXPPagedLOD (Adding it to a new node visitor perhaps?).  I figure I pose
the question before I do anything rash... =P

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


[osg-users] unexecpted result with SetHomePosition

2011-02-11 Thread vincent sauvage
Hi,

my question concern setHomePosition of MatrixManipulator and subclasses.

Parameters are quite explicite and in therory first one indicate position of 
camera, the seond parametre = target of camera ? Am i wrong... i surely forget 
some detail since  :
in practice, position and direction of camera do not corespond to the parameter 
given to that method . 

I read old topic and some source example. .. but results are sometimes so 
strange when changing the parameters values, that make me think i should konw 
some important thing or tip about this method 

Thank you for your help !

Cheers,
vincent

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





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


Re: [osg-users] WindowManager lifecycle

2011-02-11 Thread Gianni Ambrosio

Skylark wrote:
 
 camera-addChild(wm);
 // wm's reference count becomes 1
 

OK, you are right. Thanks
Gianni

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





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


Re: [osg-users] OSG 2.9.10 on iOS

2011-02-11 Thread Alessandro Terenzi
I think I moved a step forward: I've built freetype lib for both armv6 and
armv7, built OSG 2.9.11 (with warnings, see below), and
osgviewerIPhoneExample without errors but when it starts I get the following
error:

   *Setting up osg::Camera::FRAME_BUFFER*

Program received signal:  “EXC_BAD_ACCESS”.

One thing I've noticed while building osgViewer is the following warning:

   src/osgViewer/GraphicsWindowIOS.mm:630: warning: incompatible Objective-C
types assigning 'UIWindow*', expected 'GraphicsWindowIOSWindow*'


The warning is related to a line in the
GraphicsWindowIOS::realizeImplementation() method.
Could this be related to the crash?

Thanks.
Alessandro

On Thu, Feb 10, 2011 at 6:32 PM, Alessandro Terenzi a.tere...@gmail.comwrote:

 Sorry, my mistake, actually I managed to build for iOS (having added
 CoreGraphics framework), but the viewer is still crashing with the same
 error related to freetype.

 I'm trying to figure out the differences with the project from the git
 repository...

 Cheers.
 Alessandro


 On Thu, Feb 10, 2011 at 5:52 PM, Alessandro Terenzi 
 a.tere...@gmail.comwrote:

 Thanks everybody,
 I finally managed to build fo iOS using the above instructions and the
 latest sources from svn.

 Cheers.
 Alessandro


 On Mon, Jan 31, 2011 at 1:52 PM, Stephan Maximilian Huber 
 ratzf...@digitalmind.de wrote:

 Hi Alessandro,

 Am 28.01.11 18:31, schrieb Alessandro Terenzi:

  but I was still getting linking errors. The linker complied because it
 could
  not find both the Cocoa and OpenGL frameworks (note: I wrote OpenGL not
  OpenGLES, even though I checked only the GLES1 option in CMake). So I
 tried
  to remove them from the Other Linker Flags, but I was getting other
 errors
  because of references not found by imageio (but in CMake it was set
  quicktime not imageio), so I also removed imageio from the linker's
 flags.

 Quicktime is not supported for IOS, please use only imageio. It's a
 known problem, that the xcode-project built by cmake for the
 SimplevieweriPhone-example is not working right out of the box.

 You'll have to add the CoreGraphics-framework for the imageio-plugin.

  After all the above steps, I managed to build the application, but it
  crashes while it is starting, in the console I get:
 
 Program received signal:  “EXC_BAD_ACCESS”.
 
  warning: Could not open fork matching current architecture for OSO
 archive
 
 /Users/alex/Desktop/Build/3rdParty-iOS/lib/libFreeType_iphone_universal.a
 
  warning: Could not open OSO file
 
 /Users/alex/Desktop/Build/3rdParty-iOS/lib/libFreeType_iphone_universal.a(ftinit.o)
  to scan for pubtypes for objfile
 
 /Users/alex/Desktop/Build/OpenSceneGraph-2.9.11-build-iOS/bin/osgViewerIPhone.app/osgViewerIPhone
  ...(and many copies of this last warning)...

 Sorry, can't comment that much about the freetype-issue. Try the
 simpleviewer-app without the freetype-plugin and -lib as a first step.

  The last thing I tried was to start from scratch but set CMake to use
  imageio and not quicktime but same runtime error (this solved some
 linking
  problems described above, but of course not the runtime crash).
 
  Am I suppose to use another version of freetype?

 AFAIK no, it's a universal-lib (i386 + arm) and had worked in the past.

 cheers,

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




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


Re: [osg-users] Help with screen capture

2011-02-11 Thread Roger James
Hi,

I got my new code working by adding


Code:
pCamera-setGraphicsContext(pViewer-getCamera()-getGraphicsContext());




For info it also seems to work without the calls to stop and start threading. 
The only strange thing is a white half circle that flashes up on the screen for 
one frame when the capture is done. I suspect I am not doing something before I 
call viewer-frame that I am doing in my main loop. Maybe something to do with 
the far plane on the main camera.

Roger

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





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


Re: [osg-users] WindowManager lifecycle

2011-02-11 Thread Gianni Ambrosio
Just one more consideration.

In other examples (i.e. osgwidgetlabel) the window manager is not added as 
child of the camera but createParentOrthoCamera() is used insted. Looking at 
that code the Window Manager is internally added to the returned camera.

Gianni

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





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


Re: [osg-users] Terrain paging for fast movers?

2011-02-11 Thread Guthrie, David A

You could probably do it by overriding the cullvisitor and accepting nodes 
farther out in front of your motion vector.

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org on behalf of Duvan Cope
Sent: Fri 2/11/2011 11:02 AM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Terrain paging for fast movers?
 
Hello OSGers!

I was wondering what kind of mechanisms OSG currently has, or if there is a
plugin, that would allow warping the ranges of predetermined LOD/Tiles from
a Terrapage database based on the velocity of the view.  So I can use the
velocity vector as a bias to allow paging in terrain or higher LOD geometry
that is in the path of motion sooner than would normally be done if strictly
following the Terrapage Database's data (the created PagedLOD nodes in
combination with the DatabasePager from the Txp reader writer).

As I see it, I would have to edit the Txp reader writer to incorporate
warping the range fields based on the velocity vector myself in its
TXPPagedLOD, along with adding the ability to query the view's velocity from
the TXPPagedLOD (Adding it to a new node visitor perhaps?).  I figure I pose
the question before I do anything rash... =P

Thanks in advance!

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


[osg-users] compiler errors

2011-02-11 Thread Gianni Ambrosio
Hi All,
I added #include Widget/Canvas in a header file and I have a bunch of compiler 
errors in every other header which includes it.

To solve the problem I have to include osgWidget/Canvas again in the second 
header file.

Example:

In ClassA.h I have
#include osgWidget/Canvas

In ClassB.h I use
#include ClassA.h

Compiling ClassB.h I get:

1x:\3rd_party\osg\OpenSceneGraph-2.8.3\include\osgDB/ReaderWriter(231) : error 
C2143: syntax error : missing '}' before 'string'
1x:\3rd_party\osg\OpenSceneGraph-2.8.3\include\osgDB/ReaderWriter(231) : error 
C2059: syntax error : 'string'
1x:\3rd_party\osg\OpenSceneGraph-2.8.3\include\osgDB/ReaderWriter(236) : error 
C2143: syntax error : missing ';' before '}'
1x:\3rd_party\osg\OpenSceneGraph-2.8.3\include\osgDB/ReaderWriter(236) : error 
C2238: unexpected token(s) preceding ';'
1x:\3rd_party\osg\OpenSceneGraph-2.8.3\include\osgDB/ReaderWriter(238) : error 
C2061: syntax error : identifier 'ReadStatus'
...

If I add
#include osgWidget/Canvas
to ClassB.h I don't have the errors compiling ClassB.

Any idea?

Regards
Gianni

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





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


Re: [osg-users] Intersection with a ray

2011-02-11 Thread Geoff Rhodes
Hi,

I know this is old, but I was wondering what your solution was? I need to do a 
similar task.

... 

Thank you!

Cheers,
Geoff

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





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


Re: [osg-users] WindowManager root

2011-02-11 Thread Jeremy Moles
On Fri, 2011-02-11 at 12:03 +0100, Gianni Ambrosio wrote:
 Hi All,
 is there a root node for all widgets inserted in a WindowManager?
 
 I mean, I use a root node for 3D objects in my viewer and I would like to 
 have the same feature for widgets. In fact in my scene manager I store a 
 Group node to which I add all other nodes without using a viewer pointer 
 again. I just add the group root node once to the viewer (on init) and the 3D 
 scene is updated automatically just adding a child to that group root node.
 
 I would like the same feature for widgets without having to add every new 
 widget to the window manager explicitly. Is that possible? I tried to find a 
 general widget in vain. The Box must specify the BoxType so it is not a nice 
 solution. The Window class is virtual and can not be used directly as a root 
 instance. Any idea?

This isn't possible in the current version of osgWidget. There is a
pretty significant distinction between Drawables and Nodes.

I'm curious why you want this? There might be a better way to get the
results you're seeking w/ existing codestuffs.

 Regards
 Gianni
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=36551#36551
 
 
 
 
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 


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


Re: [osg-users] WindowManager lifecycle

2011-02-11 Thread Jeremy Moles
On Fri, 2011-02-11 at 18:36 +0100, Gianni Ambrosio wrote:
 Just one more consideration.
 
 In other examples (i.e. osgwidgetlabel) the window manager is not added as 
 child of the camera but createParentOrthoCamera() is used insted. Looking at 
 that code the Window Manager is internally added to the returned camera.

It's add as a child to an orthographic camera, which is in turn added to
the viewer's default camera. That is pretty standard for 2D HUD. :)

 Gianni
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=36568#36568
 
 
 
 
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 


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


Re: [osg-users] Terrain paging for fast movers?

2011-02-11 Thread Robert Osfield
Hi Duvan,

One could use a ReadFileCallback to modify PagedLOD attaching custom
CullCallback as they are loaded and have this CullCallback provide
that overrides the default PagedLOD::traverse() method and provide a
different range that is used for the LOD tests.

However, this is all rather convoluted, perhaps just using multiple
paging threads and/or tweak rate at which new subgraphs are merged by
disabling the pre compile.  Please note that pre-compile is currently
off by default in recent versions of the OSG, but older versions it
was on by default.

Robert.

On Fri, Feb 11, 2011 at 4:02 PM, Duvan Cope duc...@gmail.com wrote:

 Hello OSGers!
 I was wondering what kind of mechanisms OSG currently has, or if there is a
 plugin, that would allow warping the ranges of predetermined LOD/Tiles from
 a Terrapage database based on the velocity of the view.  So I can use the
 velocity vector as a bias to allow paging in terrain or higher LOD geometry
 that is in the path of motion sooner than would normally be done if strictly
 following the Terrapage Database's data (the created PagedLOD nodes in
 combination with the DatabasePager from the Txp reader writer).
 As I see it, I would have to edit the Txp reader writer to incorporate
 warping the range fields based on the velocity vector myself in its
 TXPPagedLOD, along with adding the ability to query the view's velocity from
 the TXPPagedLOD (Adding it to a new node visitor perhaps?).  I figure I pose
 the question before I do anything rash... =P
 Thanks in advance!
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


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


Re: [osg-users] Website unreachable

2011-02-11 Thread Karen Anderson
Why is this happening??

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





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


[osg-users] Porting GraphicsWindowWin32 and PixelBufferWin32 from WGL to EGL

2011-02-11 Thread Eric Weitzman
I'd like to port GraphicsWindowWin32 and PixelBufferWin32 to work on EGL as 
well as WGL. I'd use the PVRVFrame EGL libraries as the target for the port.

There's a pending mini-milestone for this at the bottom of the   OpenGL-ES 
support page on the wiki (wiki/Community/OpenGL-ES) but this is pretty old 
information. I don't want to reinvent the wheel if this has already been done 
by someone else. Does anyone know the status of this?

Thanks,
- Eric

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





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