2016-03-01 15:47:10 +00:00
|
|
|
/*
|
|
|
|
** r_interpolate.cpp
|
|
|
|
**
|
|
|
|
** Movement interpolation
|
|
|
|
**
|
|
|
|
**---------------------------------------------------------------------------
|
|
|
|
** Copyright 2008 Christoph Oelckers
|
|
|
|
** All rights reserved.
|
|
|
|
**
|
|
|
|
** Redistribution and use in source and binary forms, with or without
|
|
|
|
** modification, are permitted provided that the following conditions
|
|
|
|
** are met:
|
|
|
|
**
|
|
|
|
** 1. Redistributions of source code must retain the above copyright
|
|
|
|
** notice, this list of conditions and the following disclaimer.
|
|
|
|
** 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
** notice, this list of conditions and the following disclaimer in the
|
|
|
|
** documentation and/or other materials provided with the distribution.
|
|
|
|
** 3. The name of the author may not be used to endorse or promote products
|
|
|
|
** derived from this software without specific prior written permission.
|
|
|
|
**
|
|
|
|
** THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
|
|
|
** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
|
|
** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
|
|
** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
|
|
** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
|
|
** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
|
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
|
|
** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
**---------------------------------------------------------------------------
|
|
|
|
**
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "p_3dmidtex.h"
|
|
|
|
#include "stats.h"
|
|
|
|
#include "r_data/r_interpolate.h"
|
|
|
|
#include "p_local.h"
|
|
|
|
#include "po_man.h"
|
2020-04-11 17:27:11 +00:00
|
|
|
#include "serializer_doom.h"
|
|
|
|
#include "serialize_obj.h"
|
2019-01-28 17:26:14 +00:00
|
|
|
#include "g_levellocals.h"
|
2016-03-01 15:47:10 +00:00
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
class DSectorPlaneInterpolation : public DInterpolation
|
|
|
|
{
|
|
|
|
DECLARE_CLASS(DSectorPlaneInterpolation, DInterpolation)
|
|
|
|
|
|
|
|
sector_t *sector;
|
2016-03-30 15:11:31 +00:00
|
|
|
double oldheight, oldtexz;
|
|
|
|
double bakheight, baktexz;
|
2016-03-01 15:47:10 +00:00
|
|
|
bool ceiling;
|
|
|
|
TArray<DInterpolation *> attached;
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
DSectorPlaneInterpolation() {}
|
|
|
|
DSectorPlaneInterpolation(sector_t *sector, bool plane, bool attach);
|
2019-02-05 17:34:02 +00:00
|
|
|
void UnlinkFromMap() override;
|
2016-03-01 15:47:10 +00:00
|
|
|
void UpdateInterpolation();
|
|
|
|
void Restore();
|
2016-03-30 15:11:31 +00:00
|
|
|
void Interpolate(double smoothratio);
|
2016-09-19 17:14:30 +00:00
|
|
|
|
2016-09-19 11:36:58 +00:00
|
|
|
virtual void Serialize(FSerializer &arc);
|
2016-03-01 15:47:10 +00:00
|
|
|
size_t PropagateMark();
|
|
|
|
};
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
class DSectorScrollInterpolation : public DInterpolation
|
|
|
|
{
|
|
|
|
DECLARE_CLASS(DSectorScrollInterpolation, DInterpolation)
|
|
|
|
|
|
|
|
sector_t *sector;
|
2016-03-30 15:11:31 +00:00
|
|
|
double oldx, oldy;
|
|
|
|
double bakx, baky;
|
2016-03-01 15:47:10 +00:00
|
|
|
bool ceiling;
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
DSectorScrollInterpolation() {}
|
|
|
|
DSectorScrollInterpolation(sector_t *sector, bool plane);
|
2019-02-05 17:34:02 +00:00
|
|
|
void UnlinkFromMap() override;
|
2016-03-01 15:47:10 +00:00
|
|
|
void UpdateInterpolation();
|
|
|
|
void Restore();
|
2016-03-30 15:11:31 +00:00
|
|
|
void Interpolate(double smoothratio);
|
2016-09-19 17:14:30 +00:00
|
|
|
|
2016-09-19 11:36:58 +00:00
|
|
|
virtual void Serialize(FSerializer &arc);
|
2016-03-01 15:47:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
class DWallScrollInterpolation : public DInterpolation
|
|
|
|
{
|
|
|
|
DECLARE_CLASS(DWallScrollInterpolation, DInterpolation)
|
|
|
|
|
|
|
|
side_t *side;
|
|
|
|
int part;
|
2016-03-30 15:11:31 +00:00
|
|
|
double oldx, oldy;
|
|
|
|
double bakx, baky;
|
2016-03-01 15:47:10 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
DWallScrollInterpolation() {}
|
|
|
|
DWallScrollInterpolation(side_t *side, int part);
|
2019-02-05 17:34:02 +00:00
|
|
|
void UnlinkFromMap() override;
|
2016-03-01 15:47:10 +00:00
|
|
|
void UpdateInterpolation();
|
|
|
|
void Restore();
|
2016-03-30 15:11:31 +00:00
|
|
|
void Interpolate(double smoothratio);
|
2016-09-19 17:14:30 +00:00
|
|
|
|
2016-09-19 11:36:58 +00:00
|
|
|
virtual void Serialize(FSerializer &arc);
|
2016-03-01 15:47:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
class DPolyobjInterpolation : public DInterpolation
|
|
|
|
{
|
|
|
|
DECLARE_CLASS(DPolyobjInterpolation, DInterpolation)
|
|
|
|
|
|
|
|
FPolyObj *poly;
|
2016-03-30 15:11:31 +00:00
|
|
|
TArray<double> oldverts, bakverts;
|
|
|
|
double oldcx, oldcy;
|
|
|
|
double bakcx, bakcy;
|
2016-03-01 15:47:10 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
DPolyobjInterpolation() {}
|
|
|
|
DPolyobjInterpolation(FPolyObj *poly);
|
2019-02-05 17:34:02 +00:00
|
|
|
void UnlinkFromMap() override;
|
2016-03-01 15:47:10 +00:00
|
|
|
void UpdateInterpolation();
|
|
|
|
void Restore();
|
2016-03-30 15:11:31 +00:00
|
|
|
void Interpolate(double smoothratio);
|
2016-09-19 17:14:30 +00:00
|
|
|
|
2016-09-19 11:36:58 +00:00
|
|
|
virtual void Serialize(FSerializer &arc);
|
2016-03-01 15:47:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
2016-11-24 20:36:02 +00:00
|
|
|
IMPLEMENT_CLASS(DInterpolation, true, true)
|
2016-11-05 16:08:54 +00:00
|
|
|
|
|
|
|
IMPLEMENT_POINTERS_START(DInterpolation)
|
|
|
|
IMPLEMENT_POINTER(Next)
|
|
|
|
IMPLEMENT_POINTER(Prev)
|
|
|
|
IMPLEMENT_POINTERS_END
|
|
|
|
|
2016-11-24 20:36:02 +00:00
|
|
|
IMPLEMENT_CLASS(DSectorPlaneInterpolation, false, false)
|
|
|
|
IMPLEMENT_CLASS(DSectorScrollInterpolation, false, false)
|
|
|
|
IMPLEMENT_CLASS(DWallScrollInterpolation, false, false)
|
|
|
|
IMPLEMENT_CLASS(DPolyobjInterpolation, false, false)
|
2016-03-01 15:47:10 +00:00
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
int FInterpolator::CountInterpolations ()
|
|
|
|
{
|
2019-02-06 09:44:30 +00:00
|
|
|
int count = 0;
|
|
|
|
for (DInterpolation *probe = Head; probe != nullptr; probe = probe->Next)
|
|
|
|
{
|
|
|
|
count++;
|
|
|
|
}
|
2016-03-01 15:47:10 +00:00
|
|
|
return count;
|
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
void FInterpolator::UpdateInterpolations()
|
|
|
|
{
|
2019-02-06 09:44:30 +00:00
|
|
|
for (DInterpolation *probe = Head; probe != nullptr; probe = probe->Next)
|
2016-03-01 15:47:10 +00:00
|
|
|
{
|
|
|
|
probe->UpdateInterpolation ();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
void FInterpolator::AddInterpolation(DInterpolation *interp)
|
|
|
|
{
|
|
|
|
interp->Next = Head;
|
2019-02-06 09:44:30 +00:00
|
|
|
if (Head != nullptr) Head->Prev = interp;
|
2019-01-07 08:14:52 +00:00
|
|
|
interp->Prev = nullptr;
|
2016-03-01 15:47:10 +00:00
|
|
|
Head = interp;
|
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
void FInterpolator::RemoveInterpolation(DInterpolation *interp)
|
|
|
|
{
|
|
|
|
if (Head == interp)
|
|
|
|
{
|
|
|
|
Head = interp->Next;
|
2019-01-07 08:14:52 +00:00
|
|
|
if (Head != nullptr) Head->Prev = nullptr;
|
2016-03-01 15:47:10 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2019-02-06 09:44:30 +00:00
|
|
|
if (interp->Prev != nullptr) interp->Prev->Next = interp->Next;
|
|
|
|
if (interp->Next != nullptr) interp->Next->Prev = interp->Prev;
|
2016-03-01 15:47:10 +00:00
|
|
|
}
|
2019-02-06 09:44:30 +00:00
|
|
|
interp->Next = nullptr;
|
|
|
|
interp->Prev = nullptr;
|
2016-03-01 15:47:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
2016-03-30 15:11:31 +00:00
|
|
|
void FInterpolator::DoInterpolations(double smoothratio)
|
2016-03-01 15:47:10 +00:00
|
|
|
{
|
2016-03-30 15:11:31 +00:00
|
|
|
if (smoothratio >= 1.)
|
2016-03-01 15:47:10 +00:00
|
|
|
{
|
|
|
|
didInterp = false;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
didInterp = true;
|
|
|
|
|
|
|
|
DInterpolation *probe = Head;
|
2019-02-06 09:44:30 +00:00
|
|
|
while (probe != nullptr)
|
2016-03-01 15:47:10 +00:00
|
|
|
{
|
|
|
|
DInterpolation *next = probe->Next;
|
|
|
|
probe->Interpolate(smoothratio);
|
|
|
|
probe = next;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
void FInterpolator::RestoreInterpolations()
|
|
|
|
{
|
|
|
|
if (didInterp)
|
|
|
|
{
|
|
|
|
didInterp = false;
|
2019-02-06 09:44:30 +00:00
|
|
|
for (DInterpolation *probe = Head; probe != nullptr; probe = probe->Next)
|
2016-03-01 15:47:10 +00:00
|
|
|
{
|
|
|
|
probe->Restore();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
void FInterpolator::ClearInterpolations()
|
|
|
|
{
|
|
|
|
DInterpolation *probe = Head;
|
2019-01-07 08:14:52 +00:00
|
|
|
Head = nullptr;
|
2019-02-05 17:34:02 +00:00
|
|
|
|
2019-01-07 08:14:52 +00:00
|
|
|
while (probe != nullptr)
|
2016-03-01 15:47:10 +00:00
|
|
|
{
|
|
|
|
DInterpolation *next = probe->Next;
|
2019-01-07 08:14:52 +00:00
|
|
|
probe->Next = probe->Prev = nullptr;
|
2019-02-05 17:34:02 +00:00
|
|
|
probe->UnlinkFromMap();
|
2016-03-01 15:47:10 +00:00
|
|
|
probe->Destroy();
|
|
|
|
probe = next;
|
|
|
|
}
|
2019-02-06 09:44:30 +00:00
|
|
|
|
2016-03-01 15:47:10 +00:00
|
|
|
}
|
|
|
|
|
2019-01-28 17:26:14 +00:00
|
|
|
FSerializer &Serialize(FSerializer &arc, const char *key, FInterpolator &rs, FInterpolator *def)
|
|
|
|
{
|
|
|
|
if (arc.BeginObject(key))
|
|
|
|
{
|
|
|
|
arc("head", rs.Head)
|
|
|
|
.EndObject();
|
|
|
|
}
|
|
|
|
return arc;
|
|
|
|
}
|
2016-03-01 15:47:10 +00:00
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
int DInterpolation::AddRef()
|
|
|
|
{
|
|
|
|
return ++refcount;
|
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
int DInterpolation::DelRef(bool force)
|
|
|
|
{
|
|
|
|
if (refcount > 0) --refcount;
|
2019-02-05 17:34:02 +00:00
|
|
|
if (force && refcount == 0)
|
|
|
|
{
|
|
|
|
UnlinkFromMap();
|
|
|
|
Destroy();
|
|
|
|
}
|
2016-03-01 15:47:10 +00:00
|
|
|
return refcount;
|
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
2019-02-05 17:34:02 +00:00
|
|
|
void DInterpolation::UnlinkFromMap()
|
2016-03-01 15:47:10 +00:00
|
|
|
{
|
2020-01-02 11:40:14 +00:00
|
|
|
if (Level)
|
|
|
|
Level->interpolator.RemoveInterpolation(this);
|
2016-03-01 15:47:10 +00:00
|
|
|
refcount = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
2016-09-19 11:36:58 +00:00
|
|
|
void DInterpolation::Serialize(FSerializer &arc)
|
2016-03-01 15:47:10 +00:00
|
|
|
{
|
|
|
|
Super::Serialize(arc);
|
2019-02-06 09:44:30 +00:00
|
|
|
arc("refcount", refcount)
|
|
|
|
("next", Next)
|
|
|
|
("prev", Prev)
|
|
|
|
("level", Level);
|
2016-03-01 15:47:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
DSectorPlaneInterpolation::DSectorPlaneInterpolation(sector_t *_sector, bool _plane, bool attach)
|
2019-01-31 02:29:25 +00:00
|
|
|
: DInterpolation(_sector->Level)
|
2016-03-01 15:47:10 +00:00
|
|
|
{
|
|
|
|
sector = _sector;
|
|
|
|
ceiling = _plane;
|
|
|
|
UpdateInterpolation ();
|
|
|
|
|
|
|
|
if (attach)
|
|
|
|
{
|
|
|
|
P_Start3dMidtexInterpolations(attached, sector, ceiling);
|
|
|
|
P_StartLinkedSectorInterpolations(attached, sector, ceiling);
|
|
|
|
}
|
2019-01-28 17:26:14 +00:00
|
|
|
sector->Level->interpolator.AddInterpolation(this);
|
2016-03-01 15:47:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
2019-02-05 17:34:02 +00:00
|
|
|
void DSectorPlaneInterpolation::UnlinkFromMap()
|
2016-03-01 15:47:10 +00:00
|
|
|
{
|
2016-09-23 06:49:30 +00:00
|
|
|
if (sector != nullptr)
|
2016-03-01 15:47:10 +00:00
|
|
|
{
|
2016-09-23 06:49:30 +00:00
|
|
|
if (ceiling)
|
|
|
|
{
|
|
|
|
sector->interpolations[sector_t::CeilingMove] = nullptr;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
sector->interpolations[sector_t::FloorMove] = nullptr;
|
|
|
|
}
|
|
|
|
sector = nullptr;
|
2016-03-01 15:47:10 +00:00
|
|
|
}
|
2019-02-05 17:34:02 +00:00
|
|
|
for (unsigned i = 0; i < attached.Size(); i++)
|
2016-03-01 15:47:10 +00:00
|
|
|
{
|
|
|
|
attached[i]->DelRef();
|
|
|
|
}
|
2019-02-04 15:27:57 +00:00
|
|
|
attached.Reset();
|
2019-02-06 09:44:30 +00:00
|
|
|
Super::UnlinkFromMap();
|
2016-03-01 15:47:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
void DSectorPlaneInterpolation::UpdateInterpolation()
|
|
|
|
{
|
|
|
|
if (!ceiling)
|
|
|
|
{
|
2016-03-30 15:11:31 +00:00
|
|
|
oldheight = sector->floorplane.fD();
|
2016-04-24 10:15:09 +00:00
|
|
|
oldtexz = sector->GetPlaneTexZ(sector_t::floor);
|
2016-03-01 15:47:10 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2016-03-30 15:11:31 +00:00
|
|
|
oldheight = sector->ceilingplane.fD();
|
2016-04-24 10:15:09 +00:00
|
|
|
oldtexz = sector->GetPlaneTexZ(sector_t::ceiling);
|
2016-03-01 15:47:10 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
void DSectorPlaneInterpolation::Restore()
|
|
|
|
{
|
|
|
|
if (!ceiling)
|
|
|
|
{
|
2016-03-29 10:40:41 +00:00
|
|
|
sector->floorplane.setD(bakheight);
|
2016-03-01 17:50:45 +00:00
|
|
|
sector->SetPlaneTexZ(sector_t::floor, baktexz, true);
|
2016-03-01 15:47:10 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2016-03-29 10:40:41 +00:00
|
|
|
sector->ceilingplane.setD(bakheight);
|
2016-03-01 17:50:45 +00:00
|
|
|
sector->SetPlaneTexZ(sector_t::ceiling, baktexz, true);
|
2016-03-01 15:47:10 +00:00
|
|
|
}
|
|
|
|
P_RecalculateAttached3DFloors(sector);
|
|
|
|
sector->CheckPortalPlane(ceiling? sector_t::ceiling : sector_t::floor);
|
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
2016-03-30 15:11:31 +00:00
|
|
|
void DSectorPlaneInterpolation::Interpolate(double smoothratio)
|
2016-03-01 15:47:10 +00:00
|
|
|
{
|
2016-03-29 10:40:41 +00:00
|
|
|
secplane_t *pplane;
|
2016-03-01 15:47:10 +00:00
|
|
|
int pos;
|
|
|
|
|
|
|
|
if (!ceiling)
|
|
|
|
{
|
2016-03-29 10:40:41 +00:00
|
|
|
pplane = §or->floorplane;
|
2016-03-01 15:47:10 +00:00
|
|
|
pos = sector_t::floor;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2016-03-29 10:40:41 +00:00
|
|
|
pplane = §or->ceilingplane;
|
2016-03-01 15:47:10 +00:00
|
|
|
pos = sector_t::ceiling;
|
|
|
|
}
|
|
|
|
|
2016-03-30 18:05:29 +00:00
|
|
|
bakheight = pplane->fD();
|
2016-04-24 10:15:09 +00:00
|
|
|
baktexz = sector->GetPlaneTexZ(pos);
|
2016-03-01 15:47:10 +00:00
|
|
|
|
|
|
|
if (refcount == 0 && oldheight == bakheight)
|
|
|
|
{
|
2019-02-06 09:44:30 +00:00
|
|
|
UnlinkFromMap();
|
2016-03-01 15:47:10 +00:00
|
|
|
Destroy();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2016-03-30 15:11:31 +00:00
|
|
|
pplane->setD(oldheight + (bakheight - oldheight) * smoothratio);
|
2016-03-30 16:24:22 +00:00
|
|
|
sector->SetPlaneTexZ(pos, oldtexz + (baktexz - oldtexz) * smoothratio, true);
|
2019-02-05 17:34:02 +00:00
|
|
|
P_RecalculateAttached3DFloors(sector);
|
2016-03-01 15:47:10 +00:00
|
|
|
sector->CheckPortalPlane(pos);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
2016-09-19 11:36:58 +00:00
|
|
|
void DSectorPlaneInterpolation::Serialize(FSerializer &arc)
|
2016-03-01 15:47:10 +00:00
|
|
|
{
|
|
|
|
Super::Serialize(arc);
|
2016-09-19 11:36:58 +00:00
|
|
|
arc("sector", sector)
|
|
|
|
("ceiling", ceiling)
|
|
|
|
("oldheight", oldheight)
|
|
|
|
("oldtexz", oldtexz)
|
|
|
|
("attached", attached);
|
2016-03-01 15:47:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
size_t DSectorPlaneInterpolation::PropagateMark()
|
|
|
|
{
|
|
|
|
for(unsigned i=0; i<attached.Size(); i++)
|
|
|
|
{
|
|
|
|
GC::Mark(attached[i]);
|
|
|
|
}
|
|
|
|
return Super::PropagateMark();
|
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
DSectorScrollInterpolation::DSectorScrollInterpolation(sector_t *_sector, bool _plane)
|
2019-01-31 02:29:25 +00:00
|
|
|
: DInterpolation(_sector->Level)
|
2016-03-01 15:47:10 +00:00
|
|
|
{
|
|
|
|
sector = _sector;
|
|
|
|
ceiling = _plane;
|
|
|
|
UpdateInterpolation ();
|
2019-01-28 17:26:14 +00:00
|
|
|
sector->Level->interpolator.AddInterpolation(this);
|
2016-03-01 15:47:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
2019-02-05 17:34:02 +00:00
|
|
|
void DSectorScrollInterpolation::UnlinkFromMap()
|
2016-03-01 15:47:10 +00:00
|
|
|
{
|
2016-09-23 06:49:30 +00:00
|
|
|
if (sector != nullptr)
|
2016-03-01 15:47:10 +00:00
|
|
|
{
|
2016-09-23 06:49:30 +00:00
|
|
|
if (ceiling)
|
|
|
|
{
|
|
|
|
sector->interpolations[sector_t::CeilingScroll] = nullptr;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
sector->interpolations[sector_t::FloorScroll] = nullptr;
|
|
|
|
}
|
|
|
|
sector = nullptr;
|
2016-03-01 15:47:10 +00:00
|
|
|
}
|
2019-02-06 09:44:30 +00:00
|
|
|
Super::UnlinkFromMap();
|
2016-03-01 15:47:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
void DSectorScrollInterpolation::UpdateInterpolation()
|
|
|
|
{
|
2016-04-23 11:40:02 +00:00
|
|
|
oldx = sector->GetXOffset(ceiling);
|
|
|
|
oldy = sector->GetYOffset(ceiling, false);
|
2016-03-01 15:47:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
void DSectorScrollInterpolation::Restore()
|
|
|
|
{
|
|
|
|
sector->SetXOffset(ceiling, bakx);
|
|
|
|
sector->SetYOffset(ceiling, baky);
|
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
2016-03-30 15:11:31 +00:00
|
|
|
void DSectorScrollInterpolation::Interpolate(double smoothratio)
|
2016-03-01 15:47:10 +00:00
|
|
|
{
|
2016-04-23 11:40:02 +00:00
|
|
|
bakx = sector->GetXOffset(ceiling);
|
|
|
|
baky = sector->GetYOffset(ceiling, false);
|
2016-03-01 15:47:10 +00:00
|
|
|
|
|
|
|
if (refcount == 0 && oldx == bakx && oldy == baky)
|
|
|
|
{
|
2019-02-05 17:34:02 +00:00
|
|
|
UnlinkFromMap();
|
2016-03-01 15:47:10 +00:00
|
|
|
Destroy();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2016-03-30 15:11:31 +00:00
|
|
|
sector->SetXOffset(ceiling, oldx + (bakx - oldx) * smoothratio);
|
|
|
|
sector->SetYOffset(ceiling, oldy + (baky - oldy) * smoothratio);
|
2016-03-01 15:47:10 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
2016-09-19 11:36:58 +00:00
|
|
|
void DSectorScrollInterpolation::Serialize(FSerializer &arc)
|
2016-03-01 15:47:10 +00:00
|
|
|
{
|
|
|
|
Super::Serialize(arc);
|
2016-09-19 11:36:58 +00:00
|
|
|
arc("sector", sector)
|
|
|
|
("ceiling", ceiling)
|
|
|
|
("oldx", oldx)
|
|
|
|
("oldy", oldy);
|
2016-03-01 15:47:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
DWallScrollInterpolation::DWallScrollInterpolation(side_t *_side, int _part)
|
2019-01-31 02:29:25 +00:00
|
|
|
: DInterpolation(_side->GetLevel())
|
2016-03-01 15:47:10 +00:00
|
|
|
{
|
|
|
|
side = _side;
|
|
|
|
part = _part;
|
|
|
|
UpdateInterpolation ();
|
2019-01-28 17:26:14 +00:00
|
|
|
side->GetLevel()->interpolator.AddInterpolation(this);
|
2016-03-01 15:47:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
2019-02-05 17:34:02 +00:00
|
|
|
void DWallScrollInterpolation::UnlinkFromMap()
|
2016-03-01 15:47:10 +00:00
|
|
|
{
|
2016-09-23 06:49:30 +00:00
|
|
|
if (side != nullptr)
|
|
|
|
{
|
|
|
|
side->textures[part].interpolation = nullptr;
|
|
|
|
side = nullptr;
|
|
|
|
}
|
2019-02-06 09:44:30 +00:00
|
|
|
Super::UnlinkFromMap();
|
2016-03-01 15:47:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
void DWallScrollInterpolation::UpdateInterpolation()
|
|
|
|
{
|
2016-04-23 08:55:55 +00:00
|
|
|
oldx = side->GetTextureXOffset(part);
|
|
|
|
oldy = side->GetTextureYOffset(part);
|
2016-03-01 15:47:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
void DWallScrollInterpolation::Restore()
|
|
|
|
{
|
|
|
|
side->SetTextureXOffset(part, bakx);
|
|
|
|
side->SetTextureYOffset(part, baky);
|
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
2016-03-30 15:11:31 +00:00
|
|
|
void DWallScrollInterpolation::Interpolate(double smoothratio)
|
2016-03-01 15:47:10 +00:00
|
|
|
{
|
2016-04-23 08:55:55 +00:00
|
|
|
bakx = side->GetTextureXOffset(part);
|
|
|
|
baky = side->GetTextureYOffset(part);
|
2016-03-01 15:47:10 +00:00
|
|
|
|
|
|
|
if (refcount == 0 && oldx == bakx && oldy == baky)
|
|
|
|
{
|
2019-02-05 17:34:02 +00:00
|
|
|
UnlinkFromMap();
|
2016-03-01 15:47:10 +00:00
|
|
|
Destroy();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2016-03-30 15:11:31 +00:00
|
|
|
side->SetTextureXOffset(part, oldx + (bakx - oldx) * smoothratio);
|
|
|
|
side->SetTextureYOffset(part, oldy + (baky - oldy) * smoothratio);
|
2016-03-01 15:47:10 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
2016-09-19 11:36:58 +00:00
|
|
|
void DWallScrollInterpolation::Serialize(FSerializer &arc)
|
2016-03-01 15:47:10 +00:00
|
|
|
{
|
|
|
|
Super::Serialize(arc);
|
2016-09-19 11:36:58 +00:00
|
|
|
arc("side", side)
|
|
|
|
("part", part)
|
|
|
|
("oldx", oldx)
|
|
|
|
("oldy", oldy);
|
2016-03-01 15:47:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
DPolyobjInterpolation::DPolyobjInterpolation(FPolyObj *po)
|
2019-01-31 02:25:26 +00:00
|
|
|
: DInterpolation(po->Level)
|
2016-03-01 15:47:10 +00:00
|
|
|
{
|
|
|
|
poly = po;
|
|
|
|
oldverts.Resize(po->Vertices.Size() << 1);
|
|
|
|
bakverts.Resize(po->Vertices.Size() << 1);
|
|
|
|
UpdateInterpolation ();
|
2019-01-28 17:26:14 +00:00
|
|
|
po->Level->interpolator.AddInterpolation(this);
|
2016-03-01 15:47:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
2019-02-05 17:34:02 +00:00
|
|
|
void DPolyobjInterpolation::UnlinkFromMap()
|
2016-03-01 15:47:10 +00:00
|
|
|
{
|
2016-09-23 06:49:30 +00:00
|
|
|
if (poly != nullptr)
|
|
|
|
{
|
|
|
|
poly->interpolation = nullptr;
|
|
|
|
}
|
2019-02-06 09:44:30 +00:00
|
|
|
Super::UnlinkFromMap();
|
2016-03-01 15:47:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
void DPolyobjInterpolation::UpdateInterpolation()
|
|
|
|
{
|
|
|
|
for(unsigned int i = 0; i < poly->Vertices.Size(); i++)
|
|
|
|
{
|
2016-03-30 15:11:31 +00:00
|
|
|
oldverts[i*2 ] = poly->Vertices[i]->fX();
|
|
|
|
oldverts[i*2+1] = poly->Vertices[i]->fY();
|
2016-03-01 15:47:10 +00:00
|
|
|
}
|
2016-03-30 22:41:21 +00:00
|
|
|
oldcx = poly->CenterSpot.pos.X;
|
|
|
|
oldcy = poly->CenterSpot.pos.Y;
|
2016-03-01 15:47:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
void DPolyobjInterpolation::Restore()
|
|
|
|
{
|
|
|
|
for(unsigned int i = 0; i < poly->Vertices.Size(); i++)
|
|
|
|
{
|
2016-03-29 08:07:06 +00:00
|
|
|
poly->Vertices[i]->set(bakverts[i*2 ], bakverts[i*2+1]);
|
2016-03-01 15:47:10 +00:00
|
|
|
}
|
2016-03-30 22:41:21 +00:00
|
|
|
poly->CenterSpot.pos.X = bakcx;
|
|
|
|
poly->CenterSpot.pos.Y = bakcy;
|
2016-03-01 15:47:10 +00:00
|
|
|
poly->ClearSubsectorLinks();
|
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
2016-03-30 15:11:31 +00:00
|
|
|
void DPolyobjInterpolation::Interpolate(double smoothratio)
|
2016-03-01 15:47:10 +00:00
|
|
|
{
|
|
|
|
bool changed = false;
|
|
|
|
for(unsigned int i = 0; i < poly->Vertices.Size(); i++)
|
|
|
|
{
|
2016-03-30 18:05:29 +00:00
|
|
|
bakverts[i*2 ] = poly->Vertices[i]->fX();
|
|
|
|
bakverts[i*2+1] = poly->Vertices[i]->fY();
|
2016-03-01 15:47:10 +00:00
|
|
|
|
|
|
|
if (bakverts[i * 2] != oldverts[i * 2] || bakverts[i * 2 + 1] != oldverts[i * 2 + 1])
|
|
|
|
{
|
|
|
|
changed = true;
|
2016-03-29 08:07:06 +00:00
|
|
|
poly->Vertices[i]->set(
|
2016-03-30 15:11:31 +00:00
|
|
|
oldverts[i * 2] + (bakverts[i * 2] - oldverts[i * 2]) * smoothratio,
|
|
|
|
oldverts[i * 2 + 1] + (bakverts[i * 2 + 1] - oldverts[i * 2 + 1]) * smoothratio);
|
2016-03-01 15:47:10 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
if (refcount == 0 && !changed)
|
|
|
|
{
|
2019-02-05 17:34:02 +00:00
|
|
|
UnlinkFromMap();
|
2016-03-01 15:47:10 +00:00
|
|
|
Destroy();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2016-03-30 22:41:21 +00:00
|
|
|
bakcx = poly->CenterSpot.pos.X;
|
|
|
|
bakcy = poly->CenterSpot.pos.Y;
|
|
|
|
poly->CenterSpot.pos.X = bakcx + (bakcx - oldcx) * smoothratio;
|
|
|
|
poly->CenterSpot.pos.Y = bakcy + (bakcy - oldcy) * smoothratio;
|
2016-03-01 15:47:10 +00:00
|
|
|
|
|
|
|
poly->ClearSubsectorLinks();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
2016-09-19 11:36:58 +00:00
|
|
|
void DPolyobjInterpolation::Serialize(FSerializer &arc)
|
2016-03-01 15:47:10 +00:00
|
|
|
{
|
|
|
|
Super::Serialize(arc);
|
2016-09-19 11:36:58 +00:00
|
|
|
arc("poly", poly)
|
|
|
|
("oldverts", oldverts)
|
|
|
|
("oldcx", oldcx)
|
|
|
|
("oldcy", oldcy);
|
|
|
|
if (arc.isReading()) bakverts.Resize(oldverts.Size());
|
2016-03-01 15:47:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
DInterpolation *side_t::SetInterpolation(int position)
|
|
|
|
{
|
2019-02-06 09:44:30 +00:00
|
|
|
if (textures[position].interpolation == nullptr)
|
2016-03-01 15:47:10 +00:00
|
|
|
{
|
2017-04-14 11:31:58 +00:00
|
|
|
textures[position].interpolation = Create<DWallScrollInterpolation>(this, position);
|
2016-03-01 15:47:10 +00:00
|
|
|
}
|
|
|
|
textures[position].interpolation->AddRef();
|
|
|
|
GC::WriteBarrier(textures[position].interpolation);
|
|
|
|
return textures[position].interpolation;
|
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
void side_t::StopInterpolation(int position)
|
|
|
|
{
|
2019-02-06 09:44:30 +00:00
|
|
|
if (textures[position].interpolation != nullptr)
|
2016-03-01 15:47:10 +00:00
|
|
|
{
|
|
|
|
textures[position].interpolation->DelRef();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
DInterpolation *sector_t::SetInterpolation(int position, bool attach)
|
|
|
|
{
|
2019-02-06 09:44:30 +00:00
|
|
|
if (interpolations[position] == nullptr)
|
2016-03-01 15:47:10 +00:00
|
|
|
{
|
|
|
|
DInterpolation *interp;
|
|
|
|
switch (position)
|
|
|
|
{
|
|
|
|
case sector_t::CeilingMove:
|
2017-04-14 11:31:58 +00:00
|
|
|
interp = Create<DSectorPlaneInterpolation>(this, true, attach);
|
2016-03-01 15:47:10 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case sector_t::FloorMove:
|
2017-04-14 11:31:58 +00:00
|
|
|
interp = Create<DSectorPlaneInterpolation>(this, false, attach);
|
2016-03-01 15:47:10 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case sector_t::CeilingScroll:
|
2017-04-14 11:31:58 +00:00
|
|
|
interp = Create<DSectorScrollInterpolation>(this, true);
|
2016-03-01 15:47:10 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case sector_t::FloorScroll:
|
2017-04-14 11:31:58 +00:00
|
|
|
interp = Create<DSectorScrollInterpolation>(this, false);
|
2016-03-01 15:47:10 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
2019-02-06 09:44:30 +00:00
|
|
|
return nullptr;
|
2016-03-01 15:47:10 +00:00
|
|
|
}
|
|
|
|
interpolations[position] = interp;
|
|
|
|
}
|
|
|
|
interpolations[position]->AddRef();
|
|
|
|
GC::WriteBarrier(interpolations[position]);
|
|
|
|
return interpolations[position];
|
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
DInterpolation *FPolyObj::SetInterpolation()
|
|
|
|
{
|
2019-02-06 09:44:30 +00:00
|
|
|
if (interpolation != nullptr)
|
2016-03-01 15:47:10 +00:00
|
|
|
{
|
|
|
|
interpolation->AddRef();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2017-04-14 11:31:58 +00:00
|
|
|
interpolation = Create<DPolyobjInterpolation>(this);
|
2016-03-01 15:47:10 +00:00
|
|
|
interpolation->AddRef();
|
|
|
|
}
|
|
|
|
GC::WriteBarrier(interpolation);
|
|
|
|
return interpolation;
|
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
void FPolyObj::StopInterpolation()
|
|
|
|
{
|
2019-02-06 09:44:30 +00:00
|
|
|
if (interpolation != nullptr)
|
2016-03-01 15:47:10 +00:00
|
|
|
{
|
|
|
|
interpolation->DelRef();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|