Commit Graph

1334 Commits

Author SHA1 Message Date
Robert Osfield
b9f629f0cb From Mathias Fröhlich, txf plugin for reading .txf textured texture files. 2007-01-08 12:04:04 +00:00
Robert Osfield
02bda82b55 From Paul Martz and Robert Osfield, renamed include/osgUtil/Tesselator and associated classes/references to Tessellator etc. 2007-01-08 11:23:52 +00:00
Robert Osfield
778fbc78e5 Fixed compile warning 2007-01-04 20:49:39 +00:00
Robert Osfield
7155f7d1b0 Various work on osgViewer library, including warp point and graphics window resize support 2007-01-01 18:20:10 +00:00
Robert Osfield
32821ebe4e From Roger James, "Here is the version of daeWMaterials.cpp with fixes for case insensitive path names on Windows. Nobody has complained to me about them since I posted them on the users list last week." 2006-12-19 17:40:40 +00:00
Robert Osfield
4f32039f24 From Mathias Fröhlich, "I have a small update to the 'non convex polygon detection' in the ac3d loader
that is used to tell if tesselation is required or if we will better leave a
polygon as is. It is still not perfect but catches some more cases."
2006-12-19 17:30:22 +00:00
Robert Osfield
d88b996df1 From Brede Johansen, "New option "cloneExternalReferences" for OpenFlight plugin" 2006-12-14 21:15:40 +00:00
Robert Osfield
11de6ae8ef From Gerrick Bivins, fixed newly introduced texture setup bug. 2006-12-06 21:39:09 +00:00
Robert Osfield
49cd96cd44 From Rick Pingry, "n my application I am walking through the scene graph looking for nodes of a specific name. I noticed there were times when some of the nodes were not named what I had expected. Upon reviewing the code, I noticed this was happening when there was a forward reference to a parented object.
The existing code uses a map with object ID's.  The original code only applied the name to a node for a new ID only if the node did not already exist in the map.  The problem was that there was another part of the code (when a parent was forward declared) that also created the node with the ID in the map, but it did not know its name.  I simply made sure that the name was set regardless of whether or not the node was already in the map. "
2006-12-06 14:17:55 +00:00
Robert Osfield
3cab169b0d Checked in remaining element from Brede Johansen changes for clmapToEdge reader option. 2006-12-05 20:30:46 +00:00
Robert Osfield
caa27618fc From Stephan Huber, "minor bugfixes for the quicktime-plugin" 2006-12-05 17:30:36 +00:00
Robert Osfield
2b8bcb9bb0 From Gerrick Bivins, "Changes:
--merged with fixes for texture coordinates(is this in CVS/SVN already)?
 --changed above mentioned fix output level from osg::NOTIFY to osg::DEBUG_INFO
 --added support for VRML97 ImageTextures.
 --changed pointers to ref_pointers where possible.
 --added format (method separated by "//////") for easier reading."
2006-12-05 17:27:31 +00:00
Robert Osfield
ae93f08492 From Roger James,"I have had another go at the windows specific file name handling in daeWMaterials.cpp. I think I have arrived at a temporary compromise.
I have decided to just normalise the drive letter part of file names for the time being and also ensure that names of the format x:/xxxxx are treated as absolute paths. This will cover a lot of cases.

I have raised a bug against collada which hopefully should resolve some others. However there are some pathological cases which I have commented on in the code, these will probably never work properly unless there is a significant rewrite of the daeURI functionality. Hopefully they are rare."
2006-12-05 17:10:39 +00:00
Robert Osfield
875668b84d From Stephan Huber and Riccardo Corsi, port of QuickTime plugin to Windows 2006-12-05 16:29:11 +00:00
Robert Osfield
905857acd7 Added use of typedef to help clean up the readability a little and replaced a copy list with a reference. 2006-12-05 15:41:03 +00:00
Robert Osfield
d70cf68ae6 From Sylvain Marie, "changed raw pointers to smart pointers in the dxfBlock, dxfTables and
dxfSection classes, so their members data are correctly deleted.
- changed some methods signatures to pass arguments by reference instead of
by value. The performance and memory usage are enhanced (the reader was
clogging the heap when reading some large DXF files)

The updated files have been compiled and tested with a variety of DXF files
on XP with VS2003, but the changes should not disturb any other compiler."
2006-12-05 15:31:07 +00:00
Robert Osfield
8e0bb5f6ef From Chris McGlone, "PlygonZ copy constructor: added allocation and copying of zarray" 2006-12-05 14:58:38 +00:00
Robert Osfield
289331569d From Brede Johansen, "added a new reader option to replace the texture
wrap mode CLAMP with CLAMP_TO_EDGE."
2006-12-05 14:28:07 +00:00
Robert Osfield
f2b2f00ea1 From Per Fahlberg, added support for writing 16-bit rgb images 2006-11-29 20:10:08 +00:00
Robert Osfield
345810ef22 Added support for float or double osg::Plane, and the default osg::Plane to double.
Performance tests on big models did not indicate any performance penalty in using doubles over floats,
so the move to doubles should mainly impact precision improvements for whole earth databases.

Also made improvements to osgUtil::PlaneIntersector and osgSim::ElevationSlice classes
2006-11-28 16:00:52 +00:00
Robert Osfield
ed4188cb96 Removed the now redundent dateUtils.h file. 2006-11-28 10:31:37 +00:00
Robert Osfield
68e9672765 Added missing Camera.h and removed redundent CameraNode.h 2006-11-28 09:14:46 +00:00
Robert Osfield
fd2ffeb310 Renamed osg::CameraNode to osg::Camera, cleaned up osg::View.
Added beginnings of new osgViewer::Scene,View,Viewer,CompositeViewer and GraphicsWindowProxy files.
2006-11-27 14:52:07 +00:00
Robert Osfield
60a975d05d From André Garneau, "The file submitted includes a fix to properly support DDS textures compressed under the DXT-1 format when they contain alpha information.
Under this mode, each 4x4 texel block can selectively use an alpha component or none. When alpha-enabled blocks are present, this is not reported in the DDPF_ALPHAPIXELS bit in the pixel format flags causing the reader-writer to report the file as a 3-components file (GL_COMPRESSED_RGB_S3TC_DXT1_EXT). The fix requires looking at each 4x4 texel block to detect the presence of 1-bit alpha encoding. When such a block is found, the internal & pixel formats are reported as GL_COMPRESSED_RGBA_S3TC_DXT1_EXT instead.



See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_c/Opaque_and_1_Bit_Alpha_Textures.asp for more information."
2006-11-27 09:23:57 +00:00
Robert Osfield
675e4a2cde From Roger James, "fixes mostly related to texture handling." 2006-11-22 21:11:46 +00:00
Robert Osfield
9c66cb4127 From Sylvan Marie, "I attached my revised dxfEntity.cpp file from the DXF plugin with the 2
following improvements:

- When all unsupported entities (SOLIDS, TEXT, ...) have been filtered out
from a block, dxfInsert::drawScene() was crashing because it assumed that
the block was not empty. It now returns silently so the other blocks can
still be imported.

- The DXF reader assumed all vertices were read first, then the face
indices. But, from the DXF "documentation" (www.autodesk.com/dxf) :
"Polyface meshes created with the PFACE command are always generated with
all the vertex coordinate entities first, followed by the face definition
entities. The code within AutoCAD that processes polyface meshes requires
this ordering. Programs that generate polyface meshes in DXF should generate
all the vertices then all the faces. However, programs that read polyface
meshes from DXF should be tolerant of odd vertex and face ordering."
So now the importer ignores the posted number of vertices and face indices,
and uses the size of the lists instead."
2006-11-22 20:47:53 +00:00
Robert Osfield
6b6bc4de10 Added missing PointSprite files 2006-11-17 14:51:48 +00:00
Robert Osfield
e45245b7d6 From Farshid Lashkari, "Attached is a patch that adds the new coordOriginMode to the .osg
reader/writer for PointSprites."
2006-11-16 17:35:12 +00:00
Robert Osfield
052d44a440 From Frashid Lashkari, added support for PointSprites to .ive 2006-11-16 16:42:11 +00:00
Robert Osfield
ee35f18acb From Mathias Froehlich, replaced assert with notify() error message. 2006-11-15 10:08:09 +00:00
Robert Osfield
43af60e19e Added note about license or file, and link to specs. 2006-11-14 19:29:49 +00:00
Robert Osfield
5d91960cb7 Removed redundent osgac3.h file. 2006-11-14 19:19:54 +00:00
Robert Osfield
2b28b472b4 From Mathias Fröhlich, fixed order of setting of texture image. 2006-11-14 19:19:15 +00:00
Robert Osfield
0c6a05392b From Mathias Froehlich, "Improovments:
- does proper edge detection with the crease angle given in the ac file
- the reader is much more verbose in case of broken files
- no more static variables
- std::stream based
- much faster, up to a factor of 50 for a polygonal test model
- if the file contains polygonal surfaces the loaded geometry is still
polygonal as long as the polygons are convex. Concave polygons are still
tesselated. Rationale: If the user needs triangular models he can throw away
that extra information with the osgUtil::Optimizer himself. But the read step
preserves as much extra information that is contained in the file as
possible. Also the polygonal models look a bit smoother than the triangular
ones.
- a huge cleanup
- the basic parsing logic from the original ac3d developer is untouched
- the writer part is untouched

The tarball contains a replacement for the src/osgPlugins/ac3d directory that
is based on the current CVS (2006-11-13).
I have tested that loader with a osgconv foo.ac /tmp/xx.ive on everyfoo. ac
file I could find (~200 from flightgear and the object database). I also run
my flightgear development with that loader -> here I see the models.
I run valgrind testcases on some selected models."
2006-11-14 16:37:07 +00:00
Robert Osfield
ac9a28051f Fixed the writeNode function so it was properly return FILE_NOT_HANDLED, fixing
a big with it writing out an empty .flt file.
2006-11-07 17:00:29 +00:00
Robert Osfield
d199fd0072 Changed debug output from NOTICE to INFO 2006-11-07 13:26:31 +00:00
Robert Osfield
d061c087fa Removed debug comment. 2006-11-07 12:08:03 +00:00
Robert Osfield
86c6a88c98 From Mathias Froehlich, workaround fix for problematic run length encoded RGB files. Robert Osfield ammend workaround to support multi-byte colour channels. 2006-11-07 12:02:37 +00:00
Robert Osfield
0f65ed9189 From Per Fahlberg, "Attached is a fix to get the proper normals on an md2 model, actually
the way it was before would sometimes lead to a crash since it was
attaching the wrong array to the geometry..."
2006-10-30 12:28:37 +00:00
Robert Osfield
f9b9efec16 From Vladimir Shabanov, "The DDS plugin didn't correctly read mipmapped A8L8 textures.
I've attached a small fix for this.

Cause: uncompressed mipmap handling was done only for RGB pixel format.

Fix: added condition for handling alpha and luminance formats too."
2006-10-30 12:23:37 +00:00
Robert Osfield
a48a4aa7d3 From Michael Henheffer, "Bug: The reader would crash when trying to load a .tif image that
contained an 8-bit color map.  The crash occured at line 545:

remap_row(currPtr, inbuf, w, red, green, blue);


Cause:  The code was trying to write past the end of the buffer while
doing this remapping.  The size of the buffer is determined based on the
value of 'format', which was 1 in this case since bitspersample is
8(indicating a 8-bit color map).  The buffer should have been created 3
times as large since that 8-bit value is indexing a 24-bit color.


Fix:  I've put in an if statement to set format to 3 if 'photometric'
indicates the tif contains a palette as the output data will always be
24-bit color data in this case."
2006-10-30 12:05:56 +00:00
Robert Osfield
0fe424996d From Andrew Lorino and Robert Osfield, Improvements to the handling of texture paths 2006-10-26 16:52:10 +00:00
Robert Osfield
648455da34 Changed the dependency list to use -losg -losgDB instead of OSG_LIBS 2006-10-23 15:29:59 +00:00
Robert Osfield
8544337aca Fixed OSX x86 endian issue in Quicktime movie plugin. 2006-10-21 21:06:27 +00:00
Robert Osfield
d445995432 From Brede Johansen, "Here's a patch discussed in the thread "OpenFlight Loader Discarding
Material" on the osg-user mailing list."
2006-10-06 13:04:48 +00:00
Robert Osfield
fecb63785f From John Aughey, "The id name of nodes are not being set in the daeReader::processNode method. The names are retained in most of the other osg::Nodes that are created. In this case, I have an external modeler creating models, and the name of component nodes are used to give that subtree different characteristics." 2006-10-03 19:55:24 +00:00
Robert Osfield
392232ec06 From Brede Johansen, "This submission adds multitexture support for detecting translucent
images used to enable alpha blending.

Mesh was syncronized with featureset from Face record."
2006-10-03 09:55:28 +00:00
Robert Osfield
e686a9a4a5 From Brede Johansen, "I think some nitpicking is required. The loop duration was added in
OpenFlight version 15.8.  With the attached changes the flasher unit
on the spinnercar and the character_anim model from the Creator
gallery behaves."
2006-10-03 09:39:03 +00:00
Robert Osfield
02783e1dfd From Paul Martz, Bug fix for sequence node direction, It examines the number of children in the Group record destructor, so that the total duration of the sequence matches the specified loopDuration field. 2006-10-02 15:09:49 +00:00
Robert Osfield
e3478069b4 From Per Fahlberg, "Attached is a fix for loading the same file multiple times with the
COLLADA plugin. dae->load will not return DAE_OK the second time a model is loaded, so a
second check for DAE_ERR_COLLECTION_ALREADY_EXISTS has been added."
2006-10-02 13:24:39 +00:00