Merged changes to OpenSceneGraph-2.6 into trunk using :
svn merge -r 8729:8734 http://www.openscenegraph.org/svn/osg/OpenSceneGraph/branches/OpenSceneGraph-2.6 .
This commit is contained in:
parent
800ca9b8ed
commit
7f8183f64c
@ -26,7 +26,7 @@ PROJECT(OpenSceneGraph)
|
||||
SET(OPENSCENEGRAPH_MAJOR_VERSION 2)
|
||||
SET(OPENSCENEGRAPH_MINOR_VERSION 6)
|
||||
SET(OPENSCENEGRAPH_PATCH_VERSION 0)
|
||||
SET(OPENSCENEGRAPH_SOVERSION 43)
|
||||
SET(OPENSCENEGRAPH_SOVERSION 44)
|
||||
|
||||
SET(OPENSCENEGRAPH_VERSION ${OPENSCENEGRAPH_MAJOR_VERSION}.${OPENSCENEGRAPH_MINOR_VERSION}.${OPENSCENEGRAPH_PATCH_VERSION})
|
||||
|
||||
|
@ -83,8 +83,8 @@ class OSG_EXPORT AutoTransform : public Transform
|
||||
|
||||
bool getAutoScaleToScreen() const { return _autoScaleToScreen; }
|
||||
|
||||
void setAutoScaleTransistionWidthRatio(float ratio) { _autoScaleTransitionWidthRatio = ratio; }
|
||||
float getAutoScaleTransistionWidthRatio() const { return _autoScaleTransitionWidthRatio; }
|
||||
void setAutoScaleTransitionWidthRatio(float ratio) { _autoScaleTransitionWidthRatio = ratio; }
|
||||
float getAutoScaleTransitionWidthRatio() const { return _autoScaleTransitionWidthRatio; }
|
||||
|
||||
|
||||
virtual bool computeLocalToWorldMatrix(Matrix& matrix,NodeVisitor* nv) const;
|
||||
|
@ -22,7 +22,7 @@ extern "C" {
|
||||
#define OPENSCENEGRAPH_MAJOR_VERSION 2
|
||||
#define OPENSCENEGRAPH_MINOR_VERSION 6
|
||||
#define OPENSCENEGRAPH_PATCH_VERSION 0
|
||||
#define OPENSCENEGRAPH_SOVERSION 43
|
||||
#define OPENSCENEGRAPH_SOVERSION 44
|
||||
|
||||
/**
|
||||
* osgGetVersion() returns the library version number.
|
||||
|
@ -157,7 +157,7 @@ class OSGSHADOW_EXPORT ParallelSplitShadowMap : public ShadowTechnique
|
||||
|
||||
private:
|
||||
void calculateFrustumCorners(PSSMShadowSplitTexture &pssmShadowSplitTexture,osg::Vec3d *frustumCorners);
|
||||
void calculateLightInitalPosition(PSSMShadowSplitTexture &pssmShadowSplitTexture,osg::Vec3d *frustumCorners);
|
||||
void calculateLightInitialPosition(PSSMShadowSplitTexture &pssmShadowSplitTexture,osg::Vec3d *frustumCorners);
|
||||
void calculateLightNearFarFormFrustum(PSSMShadowSplitTexture &pssmShadowSplitTexture,osg::Vec3d *frustumCorners);
|
||||
void calculateLightViewProjectionFormFrustum(PSSMShadowSplitTexture &pssmShadowSplitTexture,osg::Vec3d *frustumCorners);
|
||||
|
||||
|
@ -41,7 +41,7 @@ void AutoTransform::write(DataOutputStream* out){
|
||||
{
|
||||
out->writeFloat(getMinimumScale());
|
||||
out->writeFloat(getMaximumScale());
|
||||
out->writeFloat(getAutoScaleTransistionWidthRatio());
|
||||
out->writeFloat(getAutoScaleTransitionWidthRatio());
|
||||
}
|
||||
|
||||
out->writeQuat(getRotation());
|
||||
@ -76,7 +76,7 @@ void AutoTransform::read(DataInputStream* in){
|
||||
{
|
||||
setMinimumScale(in->readFloat());
|
||||
setMaximumScale(in->readFloat());
|
||||
setAutoScaleTransistionWidthRatio(in->readFloat());
|
||||
setAutoScaleTransitionWidthRatio(in->readFloat());
|
||||
}
|
||||
|
||||
setRotation(in->readQuat());
|
||||
|
@ -140,12 +140,13 @@ bool AutoTransform_readLocalData(Object& obj, Input& fr)
|
||||
iteratorAdvanced = true;
|
||||
}
|
||||
|
||||
if (fr.matchSequence("autoScaleTransistionWidthRatio %f"))
|
||||
if (fr.matchSequence("autoScaleTransistionWidthRatio %f") ||
|
||||
fr.matchSequence("autoScaleTransitionWidthRatio %f"))
|
||||
{
|
||||
float ratio;
|
||||
fr[1].getFloat(ratio);
|
||||
|
||||
transform.setAutoScaleTransistionWidthRatio(ratio);
|
||||
transform.setAutoScaleTransitionWidthRatio(ratio);
|
||||
|
||||
fr += 2;
|
||||
iteratorAdvanced = true;
|
||||
@ -181,9 +182,9 @@ bool AutoTransform_writeLocalData(const Object& obj, Output& fw)
|
||||
|
||||
fw.indent()<<"autoScaleToScreen "<<(transform.getAutoScaleToScreen()?"TRUE":"FALSE")<<std::endl;
|
||||
|
||||
if (transform.getAutoScaleTransistionWidthRatio()!=0.25)
|
||||
if (transform.getAutoScaleTransitionWidthRatio()!=0.25)
|
||||
{
|
||||
fw.indent()<<"autoScaleTransistionWidthRatio "<<transform.getAutoScaleTransistionWidthRatio()<<std::endl;
|
||||
fw.indent()<<"autoScaleTransitionWidthRatio "<<transform.getAutoScaleTransitionWidthRatio()<<std::endl;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -641,7 +641,7 @@ void ParallelSplitShadowMap::cull(osgUtil::CullVisitor& cv){
|
||||
|
||||
// Init Light (Directional Light)
|
||||
//
|
||||
calculateLightInitalPosition(pssmShadowSplitTexture,pCorners);
|
||||
calculateLightInitialPosition(pssmShadowSplitTexture,pCorners);
|
||||
|
||||
// Calculate near and far for light view
|
||||
//
|
||||
@ -813,7 +813,7 @@ void ParallelSplitShadowMap::calculateFrustumCorners(
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// compute directional light initial position;
|
||||
void ParallelSplitShadowMap::calculateLightInitalPosition(PSSMShadowSplitTexture &pssmShadowSplitTexture,osg::Vec3d *frustumCorners){
|
||||
void ParallelSplitShadowMap::calculateLightInitialPosition(PSSMShadowSplitTexture &pssmShadowSplitTexture,osg::Vec3d *frustumCorners){
|
||||
pssmShadowSplitTexture._frustumSplitCenter = frustumCorners[0];
|
||||
for(int i=1;i<8;i++) {
|
||||
pssmShadowSplitTexture._frustumSplitCenter +=frustumCorners[i];
|
||||
|
@ -179,14 +179,14 @@ BEGIN_OBJECT_REFLECTOR(osg::AutoTransform)
|
||||
__bool__getAutoScaleToScreen,
|
||||
"",
|
||||
"");
|
||||
I_Method1(void, setAutoScaleTransistionWidthRatio, IN, float, ratio,
|
||||
I_Method1(void, setAutoScaleTransitionWidthRatio, IN, float, ratio,
|
||||
Properties::NON_VIRTUAL,
|
||||
__void__setAutoScaleTransistionWidthRatio__float,
|
||||
__void__setAutoScaleTransitionWidthRatio__float,
|
||||
"",
|
||||
"");
|
||||
I_Method0(float, getAutoScaleTransistionWidthRatio,
|
||||
I_Method0(float, getAutoScaleTransitionWidthRatio,
|
||||
Properties::NON_VIRTUAL,
|
||||
__float__getAutoScaleTransistionWidthRatio,
|
||||
__float__getAutoScaleTransitionWidthRatio,
|
||||
"",
|
||||
"");
|
||||
I_Method2(bool, computeLocalToWorldMatrix, IN, osg::Matrix &, matrix, IN, osg::NodeVisitor *, nv,
|
||||
@ -216,9 +216,9 @@ BEGIN_OBJECT_REFLECTOR(osg::AutoTransform)
|
||||
I_SimpleProperty(bool, AutoScaleToScreen,
|
||||
__bool__getAutoScaleToScreen,
|
||||
__void__setAutoScaleToScreen__bool);
|
||||
I_SimpleProperty(float, AutoScaleTransistionWidthRatio,
|
||||
__float__getAutoScaleTransistionWidthRatio,
|
||||
__void__setAutoScaleTransistionWidthRatio__float);
|
||||
I_SimpleProperty(float, AutoScaleTransitionWidthRatio,
|
||||
__float__getAutoScaleTransitionWidthRatio,
|
||||
__void__setAutoScaleTransitionWidthRatio__float);
|
||||
I_SimpleProperty(float, AutoUpdateEyeMovementTolerance,
|
||||
__float__getAutoUpdateEyeMovementTolerance,
|
||||
__void__setAutoUpdateEyeMovementTolerance__float);
|
||||
|
Loading…
Reference in New Issue
Block a user