diff --git a/applications/osgconv/osgconv.cpp b/applications/osgconv/osgconv.cpp index 168751d43..187f7c3e9 100644 --- a/applications/osgconv/osgconv.cpp +++ b/applications/osgconv/osgconv.cpp @@ -164,7 +164,7 @@ public: { NO_TRANSPARANCY_FIXING, MAKE_OPAQUE_TEXTURE_STATESET_OPAQUE, - MAKE_ALL_STATESET_OPAQUE, + MAKE_ALL_STATESET_OPAQUE }; FixTransparencyVisitor(FixTransparencyMode mode=MAKE_OPAQUE_TEXTURE_STATESET_OPAQUE): diff --git a/examples/osgdistortion/osgdistortion.cpp b/examples/osgdistortion/osgdistortion.cpp index c4155bb80..e8e343088 100644 --- a/examples/osgdistortion/osgdistortion.cpp +++ b/examples/osgdistortion/osgdistortion.cpp @@ -423,7 +423,7 @@ osg::Geometry* createDomeDistortionMesh(const osg::Vec3& origin, const osg::Vec3 } return geometry; -}; +} void setDomeCorrection(osgViewer::Viewer& viewer, osg::ArgumentParser& arguments) { @@ -712,4 +712,4 @@ int main(int argc, char** argv) return viewer.run(); } -; + diff --git a/examples/osgunittests/UnitTestFramework.cpp b/examples/osgunittests/UnitTestFramework.cpp index 2a45c0c64..1c550c171 100644 --- a/examples/osgunittests/UnitTestFramework.cpp +++ b/examples/osgunittests/UnitTestFramework.cpp @@ -392,4 +392,4 @@ bool QualifiedTestPrinter::visit( TestCase* pTest ) ////////////////////////////////////////////////////////////////////////////// -}; +} diff --git a/include/osgGA/KeySwitchMatrixManipulator b/include/osgGA/KeySwitchMatrixManipulator index ee0e3e105..e47d8899d 100644 --- a/include/osgGA/KeySwitchMatrixManipulator +++ b/include/osgGA/KeySwitchMatrixManipulator @@ -135,6 +135,6 @@ private: osg::ref_ptr _current; }; -}; +} #endif diff --git a/include/osgGA/NodeTrackerManipulator b/include/osgGA/NodeTrackerManipulator index 5b27186e3..c947c28bd 100644 --- a/include/osgGA/NodeTrackerManipulator +++ b/include/osgGA/NodeTrackerManipulator @@ -57,7 +57,7 @@ class OSGGA_EXPORT NodeTrackerManipulator : public MatrixManipulator NODE_CENTER_AND_AZIM, /** Tack the center of the node's bounding sphere, and the all rotations of the node. */ - NODE_CENTER_AND_ROTATION, + NODE_CENTER_AND_ROTATION }; void setTrackerMode(TrackerMode mode); @@ -71,7 +71,7 @@ class OSGGA_EXPORT NodeTrackerManipulator : public MatrixManipulator TRACKBALL, /** Allow the elevation and azimuth angles to be adjust w.r.t the tracked orientation. */ - ELEVATION_AZIM, + ELEVATION_AZIM }; void setRotationMode(RotationMode mode); diff --git a/include/osgGA/TerrainManipulator b/include/osgGA/TerrainManipulator index 5d7332879..1e8ed272e 100644 --- a/include/osgGA/TerrainManipulator +++ b/include/osgGA/TerrainManipulator @@ -31,7 +31,7 @@ class OSGGA_EXPORT TerrainManipulator : public MatrixManipulator enum RotationMode { ELEVATION_AZIM_ROLL, - ELEVATION_AZIM, + ELEVATION_AZIM }; void setRotationMode(RotationMode mode); diff --git a/include/osgShadow/OccluderGeometry b/include/osgShadow/OccluderGeometry index f036453f9..58130dc52 100644 --- a/include/osgShadow/OccluderGeometry +++ b/include/osgShadow/OccluderGeometry @@ -144,9 +144,18 @@ class OSGSHADOW_EXPORT OccluderGeometry : public osg::Drawable { if (edge.boundaryEdge()) return true; + float offset = 0.0f; + osg::Vec3 delta(lightpos-_vertices[edge._p1]); - float n1 = delta * _triangleNormals[edge._t1]; - float n2 = delta * _triangleNormals[edge._t2]; + delta.normalize(); + + float n1 = delta * _triangleNormals[edge._t1] + offset; + float n2 = delta * _triangleNormals[edge._t2] + offset; + + float angle_offset = 0.0f; + + n1 = cos(acosf(n1) + angle_offset); + n2 = cos(acosf(n2) + angle_offset); if (n1==0.0f && n2==0.0f) return false; @@ -157,8 +166,15 @@ class OSGSHADOW_EXPORT OccluderGeometry : public osg::Drawable { if (edge.boundaryEdge()) return true; - float n1 = lightdirection * _triangleNormals[edge._t1]; - float n2 = lightdirection * _triangleNormals[edge._t2]; + float offset = 0.0f; + + float n1 = lightdirection * _triangleNormals[edge._t1] + offset; + float n2 = lightdirection * _triangleNormals[edge._t2] + offset; + + float angle_offset = 0.0f; + + n1 = cos(acosf(n1) + angle_offset); + n2 = cos(acosf(n2) + angle_offset); if (n1==0.0f && n2==0.0f) return false; diff --git a/src/osgPlugins/3ds/atmosphere.h b/src/osgPlugins/3ds/atmosphere.h index 0e965eac0..58c620eb6 100644 --- a/src/osgPlugins/3ds/atmosphere.h +++ b/src/osgPlugins/3ds/atmosphere.h @@ -95,6 +95,6 @@ extern LIB3DSAPI Lib3dsBool lib3ds_atmosphere_read(Lib3dsAtmosphere *atmosphere, extern LIB3DSAPI Lib3dsBool lib3ds_atmosphere_write(Lib3dsAtmosphere *atmosphere, FILE *f); #ifdef __cplusplus -}; +} #endif #endif diff --git a/src/osgPlugins/3ds/background.h b/src/osgPlugins/3ds/background.h index e54dc3de8..82a054483 100644 --- a/src/osgPlugins/3ds/background.h +++ b/src/osgPlugins/3ds/background.h @@ -75,7 +75,7 @@ extern LIB3DSAPI Lib3dsBool lib3ds_background_read(Lib3dsBackground *background, extern LIB3DSAPI Lib3dsBool lib3ds_background_write(Lib3dsBackground *background, FILE *f); #ifdef __cplusplus -}; +} #endif #endif diff --git a/src/osgPlugins/3ds/camera.h b/src/osgPlugins/3ds/camera.h index 733d78d0e..06467ca81 100644 --- a/src/osgPlugins/3ds/camera.h +++ b/src/osgPlugins/3ds/camera.h @@ -54,7 +54,7 @@ extern LIB3DSAPI Lib3dsBool lib3ds_camera_read(Lib3dsCamera *camera, FILE *f); extern LIB3DSAPI Lib3dsBool lib3ds_camera_write(Lib3dsCamera *camera, FILE *f); #ifdef __cplusplus -}; +} #endif #endif diff --git a/src/osgPlugins/3ds/chunk.h b/src/osgPlugins/3ds/chunk.h index 3480e9dd1..5d061d760 100644 --- a/src/osgPlugins/3ds/chunk.h +++ b/src/osgPlugins/3ds/chunk.h @@ -281,7 +281,7 @@ extern LIB3DSAPI void lib3ds_chunk_unknown(Lib3dsWord chunk); extern LIB3DSAPI void lib3ds_chunk_dump_info(const char *format, ...); #ifdef __cplusplus -}; +} #endif #endif diff --git a/src/osgPlugins/3ds/chunktable.h b/src/osgPlugins/3ds/chunktable.h index f48d4120e..9b508ca51 100644 --- a/src/osgPlugins/3ds/chunktable.h +++ b/src/osgPlugins/3ds/chunktable.h @@ -257,7 +257,7 @@ static Lib3dsChunkTable lib3ds_chunk_table[]={ }; #ifdef __cplusplus -}; +} #endif #endif diff --git a/src/osgPlugins/3ds/ease.h b/src/osgPlugins/3ds/ease.h index ce8e4dab3..0cf1ca667 100644 --- a/src/osgPlugins/3ds/ease.h +++ b/src/osgPlugins/3ds/ease.h @@ -35,7 +35,7 @@ extern LIB3DSAPI Lib3dsFloat lib3ds_ease(Lib3dsFloat fp, Lib3dsFloat fc, Lib3dsFloat fn, Lib3dsFloat ease_from, Lib3dsFloat ease_to); #ifdef __cplusplus -}; +} #endif #endif diff --git a/src/osgPlugins/3ds/file.h b/src/osgPlugins/3ds/file.h index c2698e583..d6535a347 100644 --- a/src/osgPlugins/3ds/file.h +++ b/src/osgPlugins/3ds/file.h @@ -99,7 +99,7 @@ extern LIB3DSAPI Lib3dsBool lib3ds_file_remove_node(Lib3dsFile *file, Lib3dsNode extern LIB3DSAPI void lib3ds_file_dump_nodes(Lib3dsFile *file); #ifdef __cplusplus -}; +} #endif #endif diff --git a/src/osgPlugins/3ds/lib3ds_float.h b/src/osgPlugins/3ds/lib3ds_float.h index 9c8861ce2..035957ef8 100644 --- a/src/osgPlugins/3ds/lib3ds_float.h +++ b/src/osgPlugins/3ds/lib3ds_float.h @@ -35,7 +35,7 @@ extern LIB3DSAPI Lib3dsFloat lib3ds_float_cubic(Lib3dsFloat a, Lib3dsFloat p, Lib3dsFloat q, Lib3dsFloat b, Lib3dsFloat t); #ifdef __cplusplus -}; +} #endif #endif diff --git a/src/osgPlugins/3ds/light.h b/src/osgPlugins/3ds/light.h index 36ef94962..bec3fe496 100644 --- a/src/osgPlugins/3ds/light.h +++ b/src/osgPlugins/3ds/light.h @@ -72,7 +72,7 @@ extern LIB3DSAPI Lib3dsBool lib3ds_light_read(Lib3dsLight *light, FILE *f); extern LIB3DSAPI Lib3dsBool lib3ds_light_write(Lib3dsLight *light, FILE *f); #ifdef __cplusplus -}; +} #endif #endif diff --git a/src/osgPlugins/3ds/material.h b/src/osgPlugins/3ds/material.h index 70464e387..25b12da81 100644 --- a/src/osgPlugins/3ds/material.h +++ b/src/osgPlugins/3ds/material.h @@ -160,7 +160,7 @@ extern LIB3DSAPI Lib3dsBool lib3ds_material_read(Lib3dsMaterial *material, FILE extern LIB3DSAPI Lib3dsBool lib3ds_material_write(Lib3dsMaterial *material, FILE *f); #ifdef __cplusplus -}; +} #endif #endif diff --git a/src/osgPlugins/3ds/matrix.h b/src/osgPlugins/3ds/matrix.h index 0f8b6a908..788711a43 100644 --- a/src/osgPlugins/3ds/matrix.h +++ b/src/osgPlugins/3ds/matrix.h @@ -61,7 +61,7 @@ extern LIB3DSAPI void lib3ds_matrix_camera(Lib3dsMatrix matrix, Lib3dsVector pos extern LIB3DSAPI void lib3ds_matrix_dump(Lib3dsMatrix matrix); #ifdef __cplusplus -}; +} #endif #endif diff --git a/src/osgPlugins/3ds/mesh.h b/src/osgPlugins/3ds/mesh.h index 714043148..cd481e52f 100644 --- a/src/osgPlugins/3ds/mesh.h +++ b/src/osgPlugins/3ds/mesh.h @@ -129,7 +129,7 @@ extern LIB3DSAPI Lib3dsBool lib3ds_mesh_read(Lib3dsMesh *mesh, FILE *f); extern LIB3DSAPI Lib3dsBool lib3ds_mesh_write(Lib3dsMesh *mesh, FILE *f); #ifdef __cplusplus -}; +} #endif #endif diff --git a/src/osgPlugins/3ds/node.h b/src/osgPlugins/3ds/node.h index cc64d38e8..88666ee14 100644 --- a/src/osgPlugins/3ds/node.h +++ b/src/osgPlugins/3ds/node.h @@ -163,7 +163,7 @@ extern LIB3DSAPI Lib3dsBool lib3ds_node_read(Lib3dsNode *node, Lib3dsFile *file, extern LIB3DSAPI Lib3dsBool lib3ds_node_write(Lib3dsNode *node, Lib3dsFile *file, FILE *f); #ifdef __cplusplus -}; +} #endif #endif diff --git a/src/osgPlugins/3ds/quat.h b/src/osgPlugins/3ds/quat.h index 10971c5cd..c9294a2d9 100644 --- a/src/osgPlugins/3ds/quat.h +++ b/src/osgPlugins/3ds/quat.h @@ -55,7 +55,7 @@ extern LIB3DSAPI void lib3ds_quat_tangent(Lib3dsQuat c, Lib3dsQuat p, Lib3dsQuat extern LIB3DSAPI void lib3ds_quat_dump(Lib3dsQuat q); #ifdef __cplusplus -}; +} #endif #endif diff --git a/src/osgPlugins/3ds/readwrite.h b/src/osgPlugins/3ds/readwrite.h index 94b275c43..4d1e6a597 100644 --- a/src/osgPlugins/3ds/readwrite.h +++ b/src/osgPlugins/3ds/readwrite.h @@ -55,7 +55,7 @@ extern LIB3DSAPI Lib3dsBool lib3ds_rgb_write(Lib3dsRgb rgb, FILE *f); extern LIB3DSAPI Lib3dsBool lib3ds_string_write(const char *s, FILE *f); #ifdef __cplusplus -}; +} #endif #endif diff --git a/src/osgPlugins/3ds/shadow.h b/src/osgPlugins/3ds/shadow.h index bd476606f..606c46bb3 100644 --- a/src/osgPlugins/3ds/shadow.h +++ b/src/osgPlugins/3ds/shadow.h @@ -49,7 +49,7 @@ extern LIB3DSAPI Lib3dsBool lib3ds_shadow_read(Lib3dsShadow *shadow, FILE *f); extern LIB3DSAPI Lib3dsBool lib3ds_shadow_write(Lib3dsShadow *shadow, FILE *f); #ifdef __cplusplus -}; +} #endif #endif diff --git a/src/osgPlugins/3ds/tcb.h b/src/osgPlugins/3ds/tcb.h index aea0f4412..fe630e985 100644 --- a/src/osgPlugins/3ds/tcb.h +++ b/src/osgPlugins/3ds/tcb.h @@ -56,7 +56,7 @@ extern LIB3DSAPI Lib3dsBool lib3ds_tcb_read(Lib3dsTcb *tcb, FILE *f); extern LIB3DSAPI Lib3dsBool lib3ds_tcb_write(Lib3dsTcb *tcb, FILE *f); #ifdef __cplusplus -}; +} #endif #endif diff --git a/src/osgPlugins/3ds/tracks.h b/src/osgPlugins/3ds/tracks.h index 673bd3835..0449c86ab 100644 --- a/src/osgPlugins/3ds/tracks.h +++ b/src/osgPlugins/3ds/tracks.h @@ -203,7 +203,7 @@ extern LIB3DSAPI Lib3dsBool lib3ds_morph_track_read(Lib3dsMorphTrack *track, FIL extern LIB3DSAPI Lib3dsBool lib3ds_morph_track_write(Lib3dsMorphTrack *track, FILE *f); #ifdef __cplusplus -}; +} #endif #endif diff --git a/src/osgPlugins/3ds/types.h b/src/osgPlugins/3ds/types.h index ca2695c4b..c4fbbf32e 100644 --- a/src/osgPlugins/3ds/types.h +++ b/src/osgPlugins/3ds/types.h @@ -134,7 +134,7 @@ typedef union _Lib3dsUserData { } Lib3dsUserData; #ifdef __cplusplus -}; +} #endif #endif diff --git a/src/osgPlugins/3ds/vector.h b/src/osgPlugins/3ds/vector.h index f5bcac2a8..271a77381 100644 --- a/src/osgPlugins/3ds/vector.h +++ b/src/osgPlugins/3ds/vector.h @@ -52,7 +52,7 @@ extern LIB3DSAPI void lib3ds_vector_max(Lib3dsVector c, Lib3dsVector a); extern LIB3DSAPI void lib3ds_vector_dump(Lib3dsVector c); #ifdef __cplusplus -}; +} #endif #endif diff --git a/src/osgPlugins/3ds/viewport.h b/src/osgPlugins/3ds/viewport.h index 7f3db5554..38857ee3a 100644 --- a/src/osgPlugins/3ds/viewport.h +++ b/src/osgPlugins/3ds/viewport.h @@ -127,7 +127,7 @@ extern LIB3DSAPI void lib3ds_viewport_set_views(Lib3dsViewport *viewport, Lib3ds extern LIB3DSAPI Lib3dsBool lib3ds_viewport_write(Lib3dsViewport *viewport, FILE *f); #ifdef __cplusplus -}; +} #endif #endif diff --git a/src/osgPlugins/ac/ac3d.cpp b/src/osgPlugins/ac/ac3d.cpp index 64e095020..1efd073ed 100644 --- a/src/osgPlugins/ac/ac3d.cpp +++ b/src/osgPlugins/ac/ac3d.cpp @@ -186,7 +186,7 @@ enum { SurfaceTypeLineStrip = 2, SurfaceShaded = 1<<4, - SurfaceTwoSided = 1<<5, + SurfaceTwoSided = 1<<5 }; /// Returns a possibly quoted string given in the end of the current line in the stream diff --git a/src/osgPlugins/geo/ReaderWriterGEO.cpp b/src/osgPlugins/geo/ReaderWriterGEO.cpp index ae593959d..7213f6d28 100644 --- a/src/osgPlugins/geo/ReaderWriterGEO.cpp +++ b/src/osgPlugins/geo/ReaderWriterGEO.cpp @@ -61,7 +61,7 @@ geoHeaderGeo::geoHeaderGeo() extVars=new userVars; _initialTick = _timer.tick(); color_palette=new colourPalette; -}; +} const geoValue *geoHeaderGeo::getGeoVar(const unsigned fid) const { const geoValue *st=intVars->getGeoVar(fid); if (!st) { diff --git a/src/osgPlugins/net/sockstream.h b/src/osgPlugins/net/sockstream.h index fd0415af0..9a2e7a168 100644 --- a/src/osgPlugins/net/sockstream.h +++ b/src/osgPlugins/net/sockstream.h @@ -165,10 +165,10 @@ class sockbuf: public streambuf enum msgflag { msg_oob = MSG_OOB, msg_peek = MSG_PEEK, - msg_dontroute = MSG_DONTROUTE, + msg_dontroute = MSG_DONTROUTE #if !(defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__APPLE__)) - msg_maxiovlen = MSG_MAXIOVLEN + ,msg_maxiovlen = MSG_MAXIOVLEN #endif }; enum shuthow { diff --git a/src/osgPlugins/x/types.cpp b/src/osgPlugins/x/types.cpp index c98eff324..0065775da 100644 --- a/src/osgPlugins/x/types.cpp +++ b/src/osgPlugins/x/types.cpp @@ -239,4 +239,4 @@ namespace DX { } } -}; +} diff --git a/src/osgSim/ColorRange.cpp b/src/osgSim/ColorRange.cpp index 7a96a5354..4331c567a 100644 --- a/src/osgSim/ColorRange.cpp +++ b/src/osgSim/ColorRange.cpp @@ -15,7 +15,7 @@ ColorRange::ColorRange(float min, float max): ScalarsToColors(min,max) ColorRange::ColorRange(float min, float max, const std::vector& colors): ScalarsToColors(min,max) { setColors(colors); -}; +} void ColorRange::setColors(const std::vector& colors) { diff --git a/src/osgTerrain/GeometryTechnique.cpp b/src/osgTerrain/GeometryTechnique.cpp index 8ce847ba4..75d80b961 100644 --- a/src/osgTerrain/GeometryTechnique.cpp +++ b/src/osgTerrain/GeometryTechnique.cpp @@ -327,6 +327,8 @@ void GeometryTechnique::init() } } + // _geometry->setUseDisplayList(false); + _dirty = false; } diff --git a/src/osgText/Font.cpp b/src/osgText/Font.cpp index 7b98d75b9..2cab6419d 100644 --- a/src/osgText/Font.cpp +++ b/src/osgText/Font.cpp @@ -1,4 +1,3 @@ -; /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield * * This library is open source and may be redistributed and/or modified under diff --git a/src/osgUtil/Statistics.cpp b/src/osgUtil/Statistics.cpp index e0b81e694..274cb18cd 100644 --- a/src/osgUtil/Statistics.cpp +++ b/src/osgUtil/Statistics.cpp @@ -31,7 +31,7 @@ using namespace osgUtil; Statistics::Statistics() { reset(); -}; +} void Statistics::reset() { diff --git a/src/osgUtil/TriStrip_tri_stripper.h b/src/osgUtil/TriStrip_tri_stripper.h index d8d07728f..9bc4bfeda 100644 --- a/src/osgUtil/TriStrip_tri_stripper.h +++ b/src/osgUtil/TriStrip_tri_stripper.h @@ -379,6 +379,6 @@ inline bool _cmp_tri_degree_gt::operator () (const triangle_degree & a, const tr -}; // namespace triangle_stripper +} // namespace triangle_stripper #endif diff --git a/src/osgViewer/GraphicsWindowCarbon.cpp b/src/osgViewer/GraphicsWindowCarbon.cpp index e16e80035..6842da1c6 100644 --- a/src/osgViewer/GraphicsWindowCarbon.cpp +++ b/src/osgViewer/GraphicsWindowCarbon.cpp @@ -891,7 +891,7 @@ bool GraphicsWindowCarbon::handleMouseEvent(EventRef theEvent) enum { kEventParamMouseWheelSmoothVerticalDelta = 'saxy', // typeSInt32 - kEventParamMouseWheelSmoothHorizontalDelta = 'saxx', // typeSInt32 + kEventParamMouseWheelSmoothHorizontalDelta = 'saxx' // typeSInt32 }; SInt32 scroll_delta_x = 0;