From eb46608be49ccdef55a297c3260138caba230c90 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 27 Feb 2008 12:11:02 +0000 Subject: [PATCH] From Wojciech Lewandowski and Robert Osfield, Support from LightPointNode::s/getPointSprite parameter. --- src/osgPlugins/ive/IveVersion.h | 3 ++- src/osgPlugins/ive/LightPointNode.cpp | 10 ++++++++++ src/osgPlugins/osgSim/IO_LightPointNode.cpp | 18 ++++++++++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/src/osgPlugins/ive/IveVersion.h b/src/osgPlugins/ive/IveVersion.h index 8100157c6..4f571538d 100644 --- a/src/osgPlugins/ive/IveVersion.h +++ b/src/osgPlugins/ive/IveVersion.h @@ -32,8 +32,9 @@ #define VERSION_0021 21 #define VERSION_0022 22 #define VERSION_0023 23 +#define VERSION_0024 24 -#define VERSION VERSION_0023 +#define VERSION VERSION_0024 /* The BYTE_SEX tag is used to check the endian of the IVE file being read in. The IVE format diff --git a/src/osgPlugins/ive/LightPointNode.cpp b/src/osgPlugins/ive/LightPointNode.cpp index 6987f3c3e..e98213f0b 100644 --- a/src/osgPlugins/ive/LightPointNode.cpp +++ b/src/osgPlugins/ive/LightPointNode.cpp @@ -34,6 +34,11 @@ void LightPointNode::write(DataOutputStream* out){ out->writeFloat(getMaxPixelSize()); out->writeFloat(getMaxVisibleDistance2()); + if (out->getVersion() >= VERSION_0024) + { + out->writeBool(getPointSprite()); + } + // Write out LightPoints. unsigned int size = getNumLightPoints(); out->writeUInt(size); @@ -60,6 +65,11 @@ void LightPointNode::read(DataInputStream* in){ setMaxPixelSize(in->readFloat()); setMaxVisibleDistance2(in->readFloat()); + if (in->getVersion() >= VERSION_0024) + { + setPointSprite(in->readBool()); + } + // Read in lightpoints. unsigned int size = in->readUInt(); for(unsigned int i=0; i