#include "TEveScalableStraightLineSet.h"
#include "TEveChunkManager.h"
ClassImp(TEveScalableStraightLineSet);
TEveScalableStraightLineSet::TEveScalableStraightLineSet(const Text_t* n, const Text_t* t):
TEveStraightLineSet (n, t),
fCurrentScale(1.0)
{
fScaleCenter[0] = 0;
fScaleCenter[1] = 0;
fScaleCenter[2] = 0;
}
void TEveScalableStraightLineSet::SetScaleCenter(Float_t x, Float_t y, Float_t z)
{
fScaleCenter[0] = x;
fScaleCenter[1] = y;
fScaleCenter[2] = z;
}
Double_t TEveScalableStraightLineSet::GetScale() const
{
return fCurrentScale;
}
void TEveScalableStraightLineSet::SetScale(Double_t scale)
{
TEveChunkManager::iterator li(GetLinePlex());
while (li.next())
{
TEveStraightLineSet::Line_t& l = * (TEveStraightLineSet::Line_t*) li();
l.fV1[0] = fScaleCenter[0]+(l.fV1[0]-fScaleCenter[0])/fCurrentScale*scale;
l.fV1[1] = fScaleCenter[1]+(l.fV1[1]-fScaleCenter[1])/fCurrentScale*scale;
l.fV1[2] = fScaleCenter[2]+(l.fV1[2]-fScaleCenter[2])/fCurrentScale*scale;
l.fV2[0] = fScaleCenter[0]+(l.fV2[0]-fScaleCenter[0])/fCurrentScale*scale;
l.fV2[1] = fScaleCenter[1]+(l.fV2[1]-fScaleCenter[1])/fCurrentScale*scale;
l.fV2[2] = fScaleCenter[2]+(l.fV2[2]-fScaleCenter[2])/fCurrentScale*scale;
}
fCurrentScale = scale;
}
Last change: Mon Nov 24 08:18:53 2008
Last generated: 2008-11-24 08:18
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.