2009-04-09 17:23:45 +08:00
|
|
|
INCLUDE_DIRECTORIES(${OPENVRML_INCLUDE_DIR})
|
|
|
|
INCLUDE_DIRECTORIES(${OPENVRML_INCLUDE_DIR}/openvrml)
|
|
|
|
|
2007-07-06 22:07:59 +08:00
|
|
|
IF (WIN32)
|
2009-04-09 17:23:45 +08:00
|
|
|
INCLUDE_DIRECTORIES(${JPEG_INCLUDE_DIR})
|
|
|
|
INCLUDE_DIRECTORIES(${PNG_INCLUDE_DIR})
|
|
|
|
INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
|
|
|
|
|
|
|
|
FIND_LIBRARY(OPENVRML_ANTLR_LIBRARY
|
|
|
|
NAMES antlr.lib
|
|
|
|
PATHS $ENV{OPENVRML_DIR}/lib)
|
|
|
|
FIND_LIBRARY(OPENVRML_ANTLR_LIBRARY_DEBUG
|
|
|
|
NAMES antlrd.lib
|
|
|
|
PATHS $ENV{OPENVRML_DIR}/lib)
|
|
|
|
FIND_LIBRARY(OPENVRML_REGEX_LIBRARY
|
|
|
|
NAMES regex.lib
|
|
|
|
PATHS $ENV{OPENVRML_DIR}/lib)
|
|
|
|
FIND_LIBRARY(OPENVRML_REGEX_LIBRARY_DEBUG
|
|
|
|
NAMES regexd.lib
|
|
|
|
PATHS $ENV{OPENVRML_DIR}/lib)
|
|
|
|
|
|
|
|
SET(TARGET_LIBRARIES_VARS
|
|
|
|
OPENVRML_ANTLR_LIBRARY
|
|
|
|
OPENVRML_REGEX_LIBRARY
|
|
|
|
OPENVRML_LIBRARY
|
|
|
|
JPEG_LIBRARY
|
|
|
|
PNG_LIBRARY
|
|
|
|
ZLIB_LIBRARY)
|
|
|
|
SET(TARGET_EXTERNAL_LIBRARIES
|
|
|
|
Ws2_32.lib)
|
|
|
|
ELSE()
|
|
|
|
SET(TARGET_LIBRARIES_VARS
|
|
|
|
OPENVRML_LIBRARY)
|
|
|
|
ENDIF()
|
2007-05-06 00:11:30 +08:00
|
|
|
|
2008-05-27 20:06:50 +08:00
|
|
|
SET(TARGET_SRC
|
2009-04-09 17:23:45 +08:00
|
|
|
IndexedFaceSet.cpp
|
|
|
|
Primitives.cpp
|
|
|
|
ReaderWriterVRML2.cpp
|
From Johan Nouvel, "Some times ago, I have coded an osg to vrml2 writer. Today, I have updated our writer to osg 2.9.9.
As it works (for our needs at least) I've done and attached a tar.gz file for the VRML2 plugin with a new part to write a VRML2 file from an osg one.
The read part is the same as in osg 2.9.9.
The write part code is in convertToVRML.cpp and .h files. It works for some osg nodes (group, geode, matrixTransform, positionAttitudeTransform and geometry). Textures are converted to jpeg (if not translucent) or png (if translucent).
There are some options that could be given to the writer (with -O switch) :
convertTextures=0 to copy textures without converting them to jpeg or png
convertTextures=-1 do not copy textures, keep them in their original format and location
convertTextures=-2 do not use textures, parse only geometry
convertTextures=-3 (default) convert textures to jpeg or png ones.
textureUnit=X in case of multiple textures, X= texture unit to use (default value=0)
directoryTexture=aPath when texture will be copied, it will be in this directory, not in the current one."
2010-11-08 23:49:30 +08:00
|
|
|
ConvertToVRML.cpp
|
2008-05-27 20:06:50 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
SET(TARGET_H
|
2009-04-09 17:23:45 +08:00
|
|
|
ReaderWriterVRML2.h
|
From Johan Nouvel, "Some times ago, I have coded an osg to vrml2 writer. Today, I have updated our writer to osg 2.9.9.
As it works (for our needs at least) I've done and attached a tar.gz file for the VRML2 plugin with a new part to write a VRML2 file from an osg one.
The read part is the same as in osg 2.9.9.
The write part code is in convertToVRML.cpp and .h files. It works for some osg nodes (group, geode, matrixTransform, positionAttitudeTransform and geometry). Textures are converted to jpeg (if not translucent) or png (if translucent).
There are some options that could be given to the writer (with -O switch) :
convertTextures=0 to copy textures without converting them to jpeg or png
convertTextures=-1 do not copy textures, keep them in their original format and location
convertTextures=-2 do not use textures, parse only geometry
convertTextures=-3 (default) convert textures to jpeg or png ones.
textureUnit=X in case of multiple textures, X= texture unit to use (default value=0)
directoryTexture=aPath when texture will be copied, it will be in this directory, not in the current one."
2010-11-08 23:49:30 +08:00
|
|
|
ConvertToVRML.h
|
2008-05-27 20:06:50 +08:00
|
|
|
)
|
2007-05-06 00:11:30 +08:00
|
|
|
|
|
|
|
#### end var setup ###
|
2008-12-12 19:01:09 +08:00
|
|
|
SETUP_PLUGIN(vrml vrml)
|