From Corbin Holtz, "I have completed my mods to the OpenFlight loader (modified files are
attached): * Light point strings using the REPLICATE opcode should now be supported (>=15.6?) * Directional lights should now work as in Performer using a viewing frustrum defined by a direction vector, horizontal angular width, vertical angular width, and roll angle about the direction vector. The current directional light implementation had some bad assumptions which caused problems with direction vectors not on the XY plane. * IVE and OSG reader/writers were updated as appropriate"
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#include "ElevationSector.h"
|
||||
#include "AzimSector.h"
|
||||
#include "ConeSector.h"
|
||||
#include "DirectionalSector.h"
|
||||
|
||||
using namespace ive;
|
||||
|
||||
@@ -47,6 +48,9 @@ void LightPoint::write(DataOutputStream* out){
|
||||
else if(dynamic_cast<osgSim::ConeSector*>(_sector.get())){
|
||||
((ive::ConeSector*)(_sector.get()))->write(out);
|
||||
}
|
||||
else if(dynamic_cast<osgSim::DirectionalSector*>(_sector.get())){
|
||||
((ive::DirectionalSector*)(_sector.get()))->write(out);
|
||||
}
|
||||
else
|
||||
throw Exception("Unknown sector in LightPoint::write()");
|
||||
}
|
||||
@@ -99,6 +103,11 @@ void LightPoint::read(DataInputStream* in){
|
||||
((ive::ConeSector*)(sector))->read(in);
|
||||
_sector = sector;
|
||||
}
|
||||
else if(attributeID == IVEDIRECTIONALSECTOR){
|
||||
sector = new osgSim::DirectionalSector();
|
||||
((ive::DirectionalSector*)(sector))->read(in);
|
||||
_sector = sector;
|
||||
}
|
||||
else
|
||||
throw Exception("Unknown sector in LightPoint::read()");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user