diff options
| author | Dave Parks <davep@lindenlab.com> | 2010-06-14 23:04:11 -0500 |
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2010-06-14 23:04:11 -0500 |
| commit | 37a8c12bd34b2bd119b50f32d6e081ab59d1f5c4 (patch) | |
| tree | ccdc7a5952a55dab7417251b248a25f6ca6fd530 /indra/newview/llhudtext.cpp | |
| parent | b3fc9c79f559c84893dede3ce643ac0dfd1f3d65 (diff) | |
| parent | ad5a45624a702433d481c3dbc0f348a8755b367c (diff) | |
merge
Diffstat (limited to 'indra/newview/llhudtext.cpp')
| -rw-r--r-- | indra/newview/llhudtext.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp index 8d1d27444b..7f9eddc837 100644 --- a/indra/newview/llhudtext.cpp +++ b/indra/newview/llhudtext.cpp @@ -207,10 +207,11 @@ BOOL LLHUDText::lineSegmentIntersect(const LLVector3& start, const LLVector3& en } LLVector3 dir = end-start; - F32 t = 0.f; + F32 a,b,t; - if (LLTriangleRayIntersect(v[0], v[1], v[2], start, dir, NULL, NULL, &t, FALSE) || - LLTriangleRayIntersect(v[2], v[3], v[0], start, dir, NULL, NULL, &t, FALSE) ) + + if (LLTriangleRayIntersect(v[0], v[1], v[2], start, dir, a, b, t, FALSE) || + LLTriangleRayIntersect(v[2], v[3], v[0], start, dir, a, b, t, FALSE) ) { if (t <= 1.f) { @@ -567,6 +568,18 @@ void LLHUDText::setStringUTF8(const std::string &wtext) setString(utf8str_to_wstring(wtext)); } +std::string LLHUDText::getString() +{ + std::ostringstream ostr; + for (U32 i = 0; i < mTextSegments.size(); ++i) + { + const std::string str = wstring_to_utf8str(mTextSegments[i].getText()); + ostr << str; + } + + return ostr.str(); +} + void LLHUDText::setString(const LLWString &wtext) { mTextSegments.clear(); |
