//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
-// Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//
//
+#ifdef HAVE_CONFIG_H
+# include <simgear_config.h>
+#endif
+
#include <plib/sg.h>
-#include <plib/ssg.h>
-#include <simgear/props/props.hxx>
#include <simgear/debug/logstream.hxx>
#include <simgear/screen/extensions.hxx>
#include <simgear/scene/model/animation.hxx>
#include <simgear/scene/model/model.hxx>
#include <simgear/environment/visual_enviro.hxx>
-#include SG_GLU_H
+#include <osg/GLU>
#include "shadowvolume.hxx"
scenery_object ( 0 ),
first_select ( 0 ),
frameNumber ( 0 ),
- numTriangles ( 0 ),
indices ( 0 ),
+ numTriangles ( 0 ),
vertices ( 0 ),
lastSilhouetteIndicesCount ( 0 )
{
sgSetVec4( rotation[3], 0, 0, 0, 1);
ShadowCaster_list::iterator iShadowCaster;
- for(iShadowCaster = parts.begin() ; iShadowCaster != parts.end() ; iShadowCaster ++ ) {
+ for(iShadowCaster = parts.begin() ; iShadowCaster != parts.end() ; ++iShadowCaster ) {
(*iShadowCaster)->computeShadows(rotation, rotation_translation, occluder_type);
}
}
if( ! leaf_name )
return true;
char lname[20];
- int l = 0;
+ unsigned int l = 0;
char *buff;
for( buff = lname; *leaf_name && l < (sizeof( lname )-1); ++buff, l++ )
*buff = tolower(*leaf_name++);
}
SGShadowVolume::SceneryObject::SceneryObject(ssgBranch *_scenery_object, OccluderType _occluder_type) :
- pending_object ( _scenery_object ),
- occluder_type ( _occluder_type ),
- scenery_object ( 0 )
+ scenery_object ( 0 ),
+ pending_object ( _scenery_object ),
+ occluder_type ( _occluder_type )
{
// queue objects, don't do all the work in the first frames because of
// massive cpu power needed
SGShadowVolume::SceneryObject::~SceneryObject()
{
ShadowCaster_list::iterator iParts;
- for(iParts = parts.begin() ; iParts != parts.end(); iParts++ ) {
+ for(iParts = parts.begin() ; iParts != parts.end(); ++iParts ) {
delete *iParts;
}
parts.clear();
SGShadowVolume::~SGShadowVolume() {
SceneryObject_map::iterator iSceneryObject;
- for(iSceneryObject = sceneryObjects.begin() ; iSceneryObject != sceneryObjects.end(); iSceneryObject++ ) {
+ for(iSceneryObject = sceneryObjects.begin() ; iSceneryObject != sceneryObjects.end(); ++iSceneryObject ) {
delete iSceneryObject->second;
}
sceneryObjects.clear();
}
void SGShadowVolume::deleteOccluder(ssgBranch *occluder) {
- ssgBranch *branch = occluder;
// skip first node and go to first transform (placement)
while( occluder && !occluder->isA(ssgTypeTransform()))
occluder = (ssgBranch *) occluder->getKid(0);
}
void SGShadowVolume::addOccluder(ssgBranch *occluder, OccluderType occluder_type, ssgBranch *tile) {
-
- ssgBranch *branch = occluder;
-
// skip first node and go to first transform (placement)
while( occluder && !occluder->isA(ssgTypeTransform()))
occluder = (ssgBranch *) occluder->getKid(0);