More banging at selection beams
parent
f1452420c1
commit
40c627172b
|
|
@ -186,7 +186,7 @@ void lggBeamColorMapFloater::onClickSlider()
|
|||
fixOrder();
|
||||
}
|
||||
|
||||
F32 lggBeamColorMapFloater::getHueFromLocation(S32 x, S32 y)
|
||||
F32 lggBeamColorMapFloater::getHueFromLocation(S32 x, S32 y) const
|
||||
{
|
||||
if (y > (201 + CORRECTION_Y) && y < (277 + CORRECTION_Y))
|
||||
{
|
||||
|
|
@ -227,7 +227,7 @@ void lggBeamColorMapFloater::setData(FSPanelPrefs* data)
|
|||
}
|
||||
}
|
||||
|
||||
LLSD lggBeamColorMapFloater::getDataSerialized()
|
||||
LLSD lggBeamColorMapFloater::getDataSerialized() const
|
||||
{
|
||||
return mData.toLLSD();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,9 +46,9 @@ protected:
|
|||
void onSaveCallback(const std::vector<std::string>& filenames);
|
||||
void onLoadCallback(const std::vector<std::string>& filenames);
|
||||
|
||||
F32 getHueFromLocation(S32 x, S32 y);
|
||||
F32 getHueFromLocation(S32 x, S32 y) const;
|
||||
void fixOrder();
|
||||
LLSD getDataSerialized();
|
||||
LLSD getDataSerialized() const;
|
||||
|
||||
F32 mContextConeOpacity;
|
||||
F32 mContextConeInAlpha;
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ void lggBeamMapFloater::draw()
|
|||
}
|
||||
|
||||
LLFloater::draw();
|
||||
LLRect rec = mBeamshapePanel->getRect();
|
||||
const LLRect& rec = mBeamshapePanel->getRect();
|
||||
|
||||
gGL.pushMatrix();
|
||||
gGL.color4fv(LLColor4::white.mV);
|
||||
|
|
@ -120,7 +120,7 @@ void lggBeamMapFloater::onBackgroundChange()
|
|||
mBeamshapePanel->setBackgroundColor(getChild<LLColorSwatchCtrl>("back_color_swatch")->get());
|
||||
}
|
||||
|
||||
LLSD lggBeamMapFloater::getDataSerialized()
|
||||
LLSD lggBeamMapFloater::getDataSerialized() const
|
||||
{
|
||||
LLSD out;
|
||||
LLRect r = mBeamshapePanel->getRect();
|
||||
|
|
|
|||
|
|
@ -19,12 +19,11 @@
|
|||
class FSPanelPrefs;
|
||||
class LLPanel;
|
||||
|
||||
class lggPoint
|
||||
struct lggPoint
|
||||
{
|
||||
public:
|
||||
S32 x;
|
||||
S32 y;
|
||||
LLColor4 c;
|
||||
S32 x;
|
||||
S32 y;
|
||||
LLColor4 c;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
|
@ -54,7 +53,7 @@ private:
|
|||
|
||||
void clearPoints();
|
||||
|
||||
LLSD getDataSerialized();
|
||||
LLSD getDataSerialized() const;
|
||||
|
||||
std::vector<lggPoint> mDots;
|
||||
F32 mContextConeOpacity;
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ void hslToRgb(F32 hValIn, F32 sValIn, F32 lValIn, F32& rValOut, F32& gValOut, F3
|
|||
}
|
||||
}
|
||||
|
||||
LLSD lggBeamMaps::getPic(const std::string& filename)
|
||||
LLSD lggBeamMaps::getPic(const std::string& filename) const
|
||||
{
|
||||
LLSD data;
|
||||
llifstream importer(filename.c_str());
|
||||
|
|
@ -136,7 +136,7 @@ LLColor4U lggBeamMaps::beamColorFromData(const lggBeamsColors& data)
|
|||
LLColor4U toReturn;
|
||||
|
||||
F32 difference = data.mEndHue - data.mStartHue;
|
||||
F32 timeinc = difference != 0.f ? timer.getElapsedTimeF32() * 0.3f * (data.mRotateSpeed + 0.01f) * (360 / difference) : 0.f;
|
||||
F32 timeinc = difference != 0.f ? timer.getElapsedTimeF32() * 0.3f * (data.mRotateSpeed + 0.01f) * (360.f / difference) : 0.f;
|
||||
|
||||
S32 rounded_difference = ll_round(difference);
|
||||
if (rounded_difference == 360 || rounded_difference == 720)
|
||||
|
|
|
|||
|
|
@ -21,9 +21,8 @@
|
|||
F32 hueToRgb(F32 val1In, F32 val2In, F32 valHUeIn);
|
||||
void hslToRgb(F32 hValIn, F32 sValIn, F32 lValIn, F32& rValOut, F32& gValOut, F32& bValOut);
|
||||
|
||||
class lggBeamData
|
||||
struct lggBeamData
|
||||
{
|
||||
public:
|
||||
LLVector3d p;
|
||||
LLColor4U c;
|
||||
};
|
||||
|
|
@ -31,15 +30,6 @@ public:
|
|||
class lggBeamMaps
|
||||
{
|
||||
public:
|
||||
lggBeamMaps() :
|
||||
mLastFileName(""),
|
||||
mScale(0.0f),
|
||||
mDuration(0.25f),
|
||||
mPartsNow(false),
|
||||
mBeamLastAt(LLVector3d::zero)
|
||||
{}
|
||||
~lggBeamMaps() {}
|
||||
|
||||
F32 setUpAndGetDuration();
|
||||
void fireCurrentBeams(LLPointer<LLHUDEffectSpiral>, const LLColor4U& rgb);
|
||||
void forceUpdate();
|
||||
|
|
@ -51,15 +41,15 @@ public:
|
|||
string_vec_t getColorsFileNames() const;
|
||||
|
||||
private:
|
||||
LLSD getPic(const std::string& filename);
|
||||
LLSD getPic(const std::string& filename) const;
|
||||
|
||||
std::string mLastFileName;
|
||||
std::string mLastColorFileName;
|
||||
lggBeamsColors mLastColorsData;
|
||||
F32 mDuration;
|
||||
F32 mScale;
|
||||
bool mPartsNow;
|
||||
LLVector3d mBeamLastAt;
|
||||
std::string mLastFileName{};
|
||||
std::string mLastColorFileName{};
|
||||
lggBeamsColors mLastColorsData{};
|
||||
F32 mDuration{ 0.25f };
|
||||
F32 mScale{ 0.0f };
|
||||
bool mPartsNow{ false };
|
||||
LLVector3d mBeamLastAt{ LLVector3d::zero };
|
||||
|
||||
std::vector<lggBeamData> mDots;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -60,10 +60,3 @@ lggBeamsColors::lggBeamsColors(F32 startHue, F32 endHue, F32 rotateSpeed) :
|
|||
mRotateSpeed(rotateSpeed)
|
||||
{
|
||||
}
|
||||
|
||||
lggBeamsColors::lggBeamsColors():
|
||||
mStartHue(0.0f),
|
||||
mEndHue(360.0f),
|
||||
mRotateSpeed(1.0f)
|
||||
{
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,11 +20,11 @@ class lggBeamsColors
|
|||
{
|
||||
public:
|
||||
lggBeamsColors(F32 startHue, F32 endHue, F32 rotateSpeed);
|
||||
lggBeamsColors();
|
||||
lggBeamsColors() = default;
|
||||
|
||||
F32 mStartHue;
|
||||
F32 mEndHue;
|
||||
F32 mRotateSpeed;
|
||||
F32 mStartHue{ 0.0f };
|
||||
F32 mEndHue{ 360.0f };
|
||||
F32 mRotateSpeed{ 1.f };
|
||||
|
||||
LLSD toLLSD() const;
|
||||
static lggBeamsColors fromLLSD(const LLSD& inputData);
|
||||
|
|
|
|||
Loading…
Reference in New Issue