Hello,

does anyone know how to rotate a SphereSegment such that it's oriented correctly in another "part of the world.?"

I do not and I really need the help.  I have tried using MatrixTransform and PositionAttitudeTransform as the transform to attach a SphereSegment to to get it to rotate correctly.

But all I get is a sphere in the middle of "no-where" when using the PositionAttitudeTransform - it simply translates the spehre to some unknow part of the universe

And with MatrixTransform, all it does is swing the SphereSegment around in a circle on the same axis.  I can not get it to perform a correct roll, pitch, yaw rotation.  Here is the code I'm using: (would someone be so kind as to tell what what I'm doing wrong?  Thank you.)

*****************************************************

osg::MatrixTransform  *DrawRadar(double x, double y, double z)
{
    osg::MatrixTransform  *radarXform = new osg::MatrixTransform();;

    // Intersect Radar with Terrain
    //
    osg::Vec3 v3(x,y,z);    // SPHERE  CENTER
    osg::ref_ptr<osgSim::SphereSegment> 
         radarSphere = new osgSim::SphereSegment(
                        v3,                           // position
                        510.f,                        // radius
                        osg::DegreesToRadians(0.0),   // azMin
                        osg::DegreesToRadians(360.0), // azMax
                        osg::DegreesToRadians(0.0f),  // eleMin
                        osg::DegreesToRadians(35.0f), // eleMax
                        60);                          // density

   
    if (radarSphere.valid())
    {
      radarSphere->setAllColors( osg::Vec4(1.0f, 1.0f, 1.0f, 0.5f) );
      radarSphere->setSideColor( osg::Vec4(0.0f, 1.0f, 1.0f, 0.1f) );
    }
    else
       std::cerr << "radarSphere is invalid" << std::endl;



    osg::Quat    orientation = defaultOrientation;
    std::ifstream  istream("C:\\projects\\cramOSG_console\\trunk\\radar_orientation.txt");
    if (istream.is_open())
    {
        double d1=0.0, d2=0.0, d3=0.0;

        while (!istream.eof())
        {
           istream >> d1;
           istream >> d2;
           istream >> d3;
        }

        osg::Matrixd  m;
        //makeRotate (value_type angle1, const Vec3d &axis1, value_type angle2, const Vec3d &axis2, value_type angle3, const Vec3d &axis3)
        m.makeRotate (d1, v3, d2, v3, d3, v3); // d1= -20.0,  d2=55.0, d3=0,     v3 is the center of the sphere.
        radarXform->setMatrix( m ) ;
    }
    else
    {
       osg::Matrixd  m;
       //makeRotate (value_type angle1, const Vec3d &axis1, value_type angle2, const Vec3d &axis2, value_type angle3, const Vec3d &axis3)
       m.makeRotate (-20.0, v3, 55.0, v3, 0.0, v3);
       radarXform->setMatrix( m ) ;
    } // if - else
    istream.close();
    istream.clear();


    radarXform->addChild ( radarSphere.get() );
    return radarXform;
} // DrawRadar


*****************************************************

[EMAIL PROTECTED] wrote:
Send osg-users mailing list submissions to
	[email protected]

To subscribe or unsubscribe via the World Wide Web, visit
	http://openscenegraph.net/mailman/listinfo/osg-users
or, via email, send a message with subject or body 'help' to
	[EMAIL PROTECTED]

You can reach the person managing the list at
	[EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of osg-users digest..."


Today's Topics:

   1. Re: CMake (Brandon J. Van Every)
   2. uniform-value, updated in vertexshader ? (Markus Hein)
   3. Re: osgCal or osgCal2, which one is best maintaned?
      (Raymond de Vries)
   4. Re: osgCal or osgCal2, which one is best maintaned? (Jan Ciger)
   5. RE: Paging performance on Windows (Zach Deedler)
   6. ClearNode (Kawicki, Ryan H)
   7. Custom node read/write (Eric Sokolowsky)
   8. New version of Blender exporter (Rub?n L?pez)
   9. Re: New version of Blender exporter (Jeremy Moles)
  10. Re: New version of Blender exporter (Jan Ciger)
  11. Re: Effect, Technique, OpenGL calls (Don Burns)
  12. Re: CMake (Chris Osborn)
  13. Re: Custom node read/write (Don Burns)
  14. Re: CMake (Brandon J. Van Every)
  15. Pipe Stats, please test on Windows (Don Burns)
  16. Re: uniform-value, updated in vertexshader ? (Mike Weiblen)
  17. ATI and OSGdem (Gert Maren)
  18. RE: New version of Blender exporter (Ben Discoe)
  19. Re: [build] vs2005 solution files / commandline build
      (Sascha Seewald)
  20. [build] vs2005 solution files / commandline build (Sascha Seewald)
  21. Re: [build] vs2005 solution files / commandline build
      (Luigi Calori)
  22. RE: New version of Blender exporter (Roger James)
  23. DDS - load problem (Heinrich Fink)
  24. Strange texture problem ([EMAIL PROTECTED])
  25. Re: 100% transparent textures or geometry (WAS: Optimizer
      applies wrong textures) (Joakim Simonsson)
  26. MinGW hosted on Windows (Mike Lynch)
  27. osg::ref_ptr (Christian Hilker)
  28. Re: osg::ref_ptr (Donald Tidrow)
  29. osg::Quat to (heading,pitch,roll) (jOan)
  30. Re: Paging performance on Windows (Robert Osfield)
  31. Re: 100% transparent textures or geometry (WAS: Optimizer
      applies wrong textures) (Robert Osfield)
  32. Re: osg::Quat to (heading,pitch,roll) (Philip Hahn)
  33. Re: osg::Quat to (heading,pitch,roll) (Martins D Innus)
  34. Re: DDS - load problem (Robert Osfield)
  35. RE: Strange texture problem (Holtz, Corbin L)
  36. Re: [build] vs2005 solution files / commandline build
      (Robert Osfield)
  37. Re: osg::Quat to (heading,pitch,roll) (jOan)
  38. Re: MinGW hosted on Windows (Robert Osfield)
  39. Re: DDS - load problem (Heinrich Fink)
  40. RE: Paging performance on Windows (Zach Deedler)
  41. Re: DDS - load problem (Heinrich Fink)
  42. Re: ATI and OSGdem (Chris Hanson)
  43. Re: DDS - load problem (Robert Osfield)
  44. RE: ATI and OSGdem (Zach Deedler)
  45. One frame shadow disparity (Dave Tuft)


----------------------------------------------------------------------

Message: 1
Date: Wed, 23 Aug 2006 12:13:18 -0700
From: "Brandon J. Van Every" <[EMAIL PROTECTED]>
Subject: Re: [osg-users] CMake
To: osg users <[email protected]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Luigi Calori wrote:
  
Sorry for the delay in response, but today I' ve been almost ot of 
office.

E. Wing wrote:


    
For example, a GIF library may not be installed on the system. We need
to know not to build the osgdb gif plugin.
      
almost done, the problem is wetehe ro notify the user or not: I' m not 
so proficient in CMake to know how to clean
build a configurationuser interface to both let user select the 
plugins to build and be notified to provide a needed dependency
    

Use MESSAGE(STATUS "blah") if you just want to see a status report on 
the command line as things are done.  Use MESSAGE("blah") if you want to 
pop up a dialog box, but you don't want it to be an error.  Use 
MESSAGE(SEND_ERROR "blah") if you want a dialog box + a build error, but 
not for the error to be fatal.  Use MESSAGE(FATAL_ERROR "blah") if you 
want a dialog box + terminate all further processing.

An example:

# check for windows.h
CHECK_INCLUDE_FILE(windows.h HAVE_WINDOWS_H)
IF(HAVE_WINDOWS_H)

  # NOTE: Don't assume we're on Windows.  We could be cross-compiling.
  CHECK_SYMBOL_EXISTS(LoadLibrary windows.h HAVE_LOADLIBRARY)
  CHECK_SYMBOL_EXISTS(GetProcAddress windows.h HAVE_GETPROCADDRESS)

  CHECK_INCLUDE_FILE(winsock2.h HAVE_WINSOCK2_H)
  IF (NOT HAVE_WINSOCK2_H)
    MESSAGE("You are missing winsock2.h.
      Correct this if you want full network functionality.")
  ENDIF(NOT HAVE_WINSOCK2_H)
  # ws2tcpip.h needs winsock2.h for various definitions
  SET(WS2FILES winsock2.h ws2tcpip.h)
  CHECK_INCLUDE_FILES("${WS2FILES}" HAVE_WS2TCPIP_H)
  IF (NOT HAVE_WS2TCPIP_H)
    MESSAGE("You are missing ws2tcpip.h.
      Correct this if you want full network functionality.")
  ENDIF(NOT HAVE_WS2TCPIP_H)

ENDIF(HAVE_WINDOWS_H)


Cheers,
Brandon Van Every




------------------------------

Message: 2
Date: Wed, 23 Aug 2006 21:11:21 +0200
From: "Markus Hein" <[EMAIL PROTECTED]>
Subject: [osg-users] uniform-value, updated in vertexshader ?
To: "osg users" <[email protected]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; format=flowed; charset="utf-8";
	reply-type=response

Hi All,

based on osgParametric-example i try to get a vertexshader to update a 
Uniform from a sum of perVertex-operations. I tried to read the result back 
into the application. While there is no problem to "feed" the VertexShader 
with updated values from a UniformCallback, i can't update a uniform inside 
a shader and use the value per frame in the osg-application.

Is it possible to assign/increment a Uniform-value inside of a vertex-shader 
and read the result per frame in the osg-application? Maybe there are some 
examples showing how to solve this ?

Thanks for infos.

Markus




------------------------------

Message: 3
Date: Wed, 23 Aug 2006 21:35:45 +0200 (CEST)
From: "Raymond de Vries" <[EMAIL PROTECTED]>
Subject: Re: [osg-users] osgCal or osgCal2, which one is best
	maintaned?
To: "osg users" <[email protected]>
Cc: "osg users" <[email protected]>
Message-ID:
	<[EMAIL PROTECTED]>
Content-Type: text/plain;charset=iso-8859-1

Hi Jan,

Thanks for telling that osgCal2 is mature. I've made my choice and use
osgCal2.

bye
Raymond

  
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Raymond de Vries wrote:
    
Hi everyone,

I have a simple question. While looking for an integration of cal3d into
osg I found 2 solutions: osglCal and osgCal2.

Which one is the best to use? Are they both as active in development?
For
instance, are they both using cal3d-0.11. I am pretty sure that osglCal
is
using 0.11 since it is being supported by Loic Dachary. Is this right?
      
Both are using 0.11. I do not know about osgCal, but osgCal2 is stable,
thus not much development is happening - the library does what we wanted.

The fundamental difference is that osgCal is licensed under GPL, osgCal2
is using LGPL, be careful about this if you are planning something
non-GPL with it.

There is a third solution as well - ReplicantBody which builds on top of
Cal3D.


Regards,

Jan


- --

Jan Ciger
GPG public key: http://www.keyserver.net/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org

iD8DBQFE7JtLn11XseNj94gRAkYoAJ0UVMG+QGF1hVDTGmJw48cJLtYIhACg2bKH
/dFAAJy+Ns1mSFCEe/5M84E=
=J+o3
-----END PGP SIGNATURE-----
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

    




------------------------------

Message: 4
Date: Wed, 23 Aug 2006 21:38:35 +0200
From: Jan Ciger <[EMAIL PROTECTED]>
Subject: Re: [osg-users] osgCal or osgCal2, which one is best
	maintaned?
To: osg users <[email protected]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Raymond de Vries wrote:
  
Hi Jan,

Thanks for telling that osgCal2 is mature. I've made my choice and use
osgCal2.

bye
Raymond
    

You are welcome,

Jan

- --

Jan Ciger
GPG public key: http://www.keyserver.net/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org

iD8DBQFE7K67n11XseNj94gRAsQcAKDouenZFCd8OlBKM8FiX+X05nc68wCfTIs0
Oeaa36aueIsXdqS74+WLPtU=
=00QU
-----END PGP SIGNATURE-----


------------------------------

Message: 5
Date: Wed, 23 Aug 2006 15:47:49 -0400
From: "Zach Deedler" <[EMAIL PROTECTED]>
Subject: RE: [osg-users] Paging performance on Windows
To: "'osg users'" <[email protected]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain;	charset="us-ascii"

Yeah, I've tested this database on many different computers (not every test
of course).  Nvidia, ATI, Intel, AMD, SLI, etc.

Does anyone know how textures are shared?  Say I have 4 files that all have
the same texture embedded in them: A.ive, B.ive, C.ive, D.ive.  Or I have
one file that contains all the geometry of A, B, C, and D with the one
texture embedded in it.

1) A.ive,B.ive,C.ive,D.ive -> 4 duplicate textures
2) E.ive contains A,B,C,D geometry -> 1 texture

This also will apply to shared geometry.  Say I have a light bulb model that
is in each of the A, B, C, D ive files.  Is the geometry for the light bulb
reloaded 4 times?

This may be a factor.  My paged database contains a lot of duplicate
textures, and geometry.  This is why I was asking if there is anyway to
create an ive file that doesn't contain embedded textures.


Zach

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Chris Hanson
Sent: Wednesday, August 23, 2006 12:00
To: osg users
Subject: Re: [osg-users] Paging performance on Windows

Zach Deedler wrote:
  
Hi Robert,
One other thing apparently was a factor in fixing the hitching problem 
I was having.  I had to generate the database with larger tiles.  I 
used to have a checkerboard database of tiles, and each tile had about 
4 paged files in it.  If I condense those 4 paged tiles into one large 
one, then I get better results.  Here is the investigation:
    

   This seems counter-intuitive.

   My experience has been that more, smaller pieces usually compile/download
more smoothly.

   I am not sure where to continue investigating.

   I don't recall, have you tested this on a computer with a significantly
different configuration? Different CPU and/or graphics card?

--
Chris 'Xenon' Hanson aka Eric Hammil | http://www.3DNature.com/ eric at
logrus
  "I set the wheels in motion, turn up all the machines, activate the
programs,
   and run behind the scenes. I set the clouds in motion, turn up light and
sound,
   activate the window, and watch the world go 'round." -Prime Mover, Rush.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/



------------------------------

Message: 6
Date: Wed, 23 Aug 2006 15:25:38 -0500
From: "Kawicki, Ryan H" <[EMAIL PROTECTED]>
Subject: [osg-users] ClearNode
To: <[email protected]>
Message-ID:
	<[EMAIL PROTECTED]>
Content-Type: text/plain;	charset="us-ascii"

I'm trying to use the stencil buffer, so I setup the subgraph with a
ClearNode as the root of the subgraph.  When the cull visitor traverses
the graph, it is setting these values for the top level, which is
removing the calls to the GL_COLOR_BUFFER_BIT and GL_DEPTH_BUFFER_BIT.
Is there a way to get around this problem?  Anyone else have this same
problem?

Thanks,
Ryan



------------------------------

Message: 7
Date: Wed, 23 Aug 2006 16:28:36 -0400 (EDT)
From: Eric Sokolowsky <[EMAIL PROTECTED]>
Subject: [osg-users] Custom node read/write
To: [email protected]
Message-ID: <[EMAIL PROTECTED]>
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

I have derived a node from osg::Image to add some custom behavior. However,
when this node is written out it is written as a base osg::Image and my
custom behavior is discarded. How do I write out my extra fields and
read them in again within the osgPlugin architecture? I am mostly interested
in the .osg plugin and the .ive plugin. If the answer is "modify the source
code in your local copy of the osg source repository" then I might have to
rethink my approach to this problem.

  

-- 
Sincerely, Allen

Gene Allen Saucier, Jr
Senior Software Engineer
CAS, Inc
100 Quality Circle
Huntsville, AL  35806
or
PO Box 11190
Huntsville, AL  35814
(256) 922-6453 (w)
"As for I and my house, we shall follow the Lord"  Joshua 25:14
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to