[osg-users] texturing a sphere segment

sylvain cormier sly at sat.qc.ca
Fri Sep 28 10:39:47 PDT 2007


On Fri, 2007-21-09 at 20:21 +0100, Robert Osfield wrote:
> Hi Sylvain,
> 
> osgSim::SphereSegment is very specialist class that has been designed
> not to be used with texturing, and its complex shape preclude any easy
> tex coord mapping for them
> 
> Is there a reason why you aren't just rolling your own osg::Geometry?

Hi Robert, list,

complex shape indeed,
after having "rolled my own" geometry with TRIANGLES, 
I have one vertex array for a sphere segment. 
I seem to be getting the same results.
I still can see the movie's shades playing and I can pause and start the
movie.
But my guess now is that I would be to assign a texture coordinate to
each vertex. Am I right?
Is there anything special with such a shape that i should be taking into
consideration when Applying texture coordinates?

Also, you recently added support for intensityMap and fixed naming of
--panoramic-sd and --3d-sd command line arguments in osgViewer/View.cpp

This brought my attention to

createParoramicSphericalDisplayDistortionMesh(const osg::Vec3& origin,
const osg::Vec3& widthVector, const osg::Vec3& heightVector, double
sphere_radius, double collar_radius)

That actually sounds very much like what I need.

Does this mean I could set up a spherical distortion in my viewer
instead of trying to do it inside my scene?


Thank you,


Sylvain


thanks,

Sylvain 






More information about the osg-users mailing list