Hi all,

Sorry for not replying to the original message, as stated on osg-users I didn't receive it for some reason, sorry if this messes up threading in your mail readers.

I just wanted to report I got the attachment off the archives, added it to my source tree and it built fine. It works well. I can do

osgconv cow.osg cow.dot

and then

dot -Tpng -ocow.png cow.dot

and get a nice graph of the cow's scene graph structure.

You do need to add the dot directory to the osgPlugins directory's CMakeLists.txt - attached. I put it in the "Image plugins" section, I think that's appropriate.

I'd like to add some of the comments from Paul's osgdot, which explained what the .dot file is good for and the command line for dot to convert it to an image, into the new plugin. I'd also like to add a little more info to Geometry (Paul's version had the number of primitive sets, I'd like to add number of vertices, perhaps more detail about the type of primitives, etc). Perhaps also add more info to some other node types, I don't know. Perhaps controlled by reader writer options. But I can do all that once it's been integrated into SVN.

Thanks a lot for the great submission Richard, it's also a lot cleaner code (no offense intended Paul, I think you noted yourself that your version was not a shining example of OSG coding :-) ).

J-S
--
______________________________________________________
Jean-Sebastien Guay    [EMAIL PROTECTED]
                               http://www.cm-labs.com/
                        http://whitestar02.webhop.org/
#---------------------------------------------------
# OSG CMAKE SUPPORT
# (C) by Michael Wagner, [EMAIL PROTECTED] 2005
# (C) Eric Wing, Luigi Calori and Robert Osfield 2006-2007
#---------------------------------------------------

PROJECT(OSG_PLUGINS_MASTER)


IF(NOT MSVC)
    SET(LIBRARY_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH}/${OSG_PLUGINS}")
    SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY 
"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${OSG_PLUGINS}")
ENDIF(NOT MSVC)

SET(CMAKE_SHARED_MODULE_PREFIX ${OSG_PLUGIN_PREFIX})

IF(MSVC80)
  IF(NOT OSG_MSVC_GENERATE_PLUGINS_AND_WRAPPERS_MANIFESTS)
    SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /MANIFEST:NO")
  ENDIF(NOT OSG_MSVC_GENERATE_PLUGINS_AND_WRAPPERS_MANIFESTS)
ENDIF(MSVC80)

SET(TARGET_DEFAULT_PREFIX "osgdb_")
SET(TARGET_DEFAULT_LABEL_PREFIX "Plugins")
SET(TARGET_COMMON_LIBRARIES
    OpenThreads
    osg
    osgDB
    osgUtil
)

############################################################
#
#  NodeKit/Psudo loader plugins
#
ADD_SUBDIRECTORY(osgFX)
ADD_SUBDIRECTORY(osgParticle)
ADD_SUBDIRECTORY(osgSim)
ADD_SUBDIRECTORY(osgText)
ADD_SUBDIRECTORY(osgViewer)
ADD_SUBDIRECTORY(osgShadow)
ADD_SUBDIRECTORY(osgTerrain)
ADD_SUBDIRECTORY(osga)
ADD_SUBDIRECTORY(rot)
ADD_SUBDIRECTORY(scale)
ADD_SUBDIRECTORY(trans)
ADD_SUBDIRECTORY(normals)

############################################################
#
#  Main native plugins
#
ADD_SUBDIRECTORY(osg)
ADD_SUBDIRECTORY(ive)

############################################################
#
#  Viewer plugins
#
ADD_SUBDIRECTORY(cfg)

############################################################
#
#  Shader plugins
#
ADD_SUBDIRECTORY(glsl)

############################################################
#
#  Image plugins
#
ADD_SUBDIRECTORY(rgb)
ADD_SUBDIRECTORY(bmp)
ADD_SUBDIRECTORY(pnm)
ADD_SUBDIRECTORY(dds)
ADD_SUBDIRECTORY(tga)
ADD_SUBDIRECTORY(hdr)
ADD_SUBDIRECTORY(dot)

IF(JPEG_FOUND)
    ADD_SUBDIRECTORY(jpeg)
ENDIF(JPEG_FOUND)
IF(JASPER_FOUND)
    ADD_SUBDIRECTORY(jp2)
ENDIF(JASPER_FOUND)
IF(GIFLIB_FOUND)
    ADD_SUBDIRECTORY(gif)
ENDIF(GIFLIB_FOUND)
IF(PNG_FOUND)
    ADD_SUBDIRECTORY(png)
ENDIF(PNG_FOUND)
IF(TIFF_FOUND)
    ADD_SUBDIRECTORY(tiff)
ENDIF(TIFF_FOUND)
IF(GDAL_FOUND)
    ADD_SUBDIRECTORY(gdal)
    ADD_SUBDIRECTORY(ogr)
ENDIF(GDAL_FOUND)

IF(CURL_FOUND)
    ADD_SUBDIRECTORY(curl)
ENDIF(CURL_FOUND)

############################################################
#
# 3D Image plugins
#
IF   (ITK_FOUND OR DCMTK_FOUND)
    ADD_SUBDIRECTORY(dicom)
ENDIF(ITK_FOUND OR DCMTK_FOUND)


############################################################
#
#  3rd party 3d plugins
#

ADD_SUBDIRECTORY(3dc)

IF(INVENTOR_FOUND)
    ADD_SUBDIRECTORY(Inventor)
ENDIF(INVENTOR_FOUND)

IF(OPENVRML_FOUND)
    ADD_SUBDIRECTORY(vrml)
ENDIF(OPENVRML_FOUND)

IF(COLLADA_FOUND)
    ADD_SUBDIRECTORY(dae)
ENDIF(COLLADA_FOUND)

ADD_SUBDIRECTORY(lwo)
ADD_SUBDIRECTORY(x)
ADD_SUBDIRECTORY(dw)
ADD_SUBDIRECTORY(dxf)
ADD_SUBDIRECTORY(OpenFlight)
ADD_SUBDIRECTORY(geo)
ADD_SUBDIRECTORY(obj)

IF(PERFORMER_FOUND)
    ADD_SUBDIRECTORY(pfb)
ENDIF(PERFORMER_FOUND)

ADD_SUBDIRECTORY(pic)
ADD_SUBDIRECTORY(stl)
ADD_SUBDIRECTORY(3ds)
ADD_SUBDIRECTORY(ac)

ADD_SUBDIRECTORY(logo)
ADD_SUBDIRECTORY(lws)
ADD_SUBDIRECTORY(md2)
ADD_SUBDIRECTORY(osgtgz)
ADD_SUBDIRECTORY(tgz)

ADD_SUBDIRECTORY(txp)
ADD_SUBDIRECTORY(shp)
ADD_SUBDIRECTORY(txf)

IF(XINE_FOUND)
    ADD_SUBDIRECTORY(xine)
ENDIF(XINE_FOUND)

IF(QUICKTIME_FOUND)
    ADD_SUBDIRECTORY(quicktime)
ENDIF(QUICKTIME_FOUND)

IF(FREETYPE_FOUND)
    ADD_SUBDIRECTORY(freetype)
ENDIF(FREETYPE_FOUND)
IF(ZLIB_FOUND)
    ADD_SUBDIRECTORY(zip)
ENDIF(ZLIB_FOUND)

IF(RSVG_FOUND AND CAIRO_FOUND)
    ADD_SUBDIRECTORY(svg)
ENDIF(RSVG_FOUND AND CAIRO_FOUND)

IF   (BUILD_OSGWIDGET)
    ADD_SUBDIRECTORY(osgWidget)
ENDIF(BUILD_OSGWIDGET)


##########to get all the variables of Cmake
#GET_CMAKE_PROPERTY(MYVARS VARIABLES)
#FOREACH(myvar ${MYVARS})
#    FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/AllVariables.txt
#        "${myvar} -->${${myvar}}<-\n"
#    )
#ENDFOREACH(myvar)


_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to