aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llhudmanager.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:04 -0500
committerJacek Antonelli2008-08-15 23:45:04 -0500
commit117e22047c5752352342d64e3fb7ce00a4eb8113 (patch)
treee32de2cfba0dda8705ae528fcd1fbe23ba075685 /linden/indra/newview/llhudmanager.cpp
parentSecond Life viewer sources 1.18.0.6 (diff)
downloadmeta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.zip
meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.tar.gz
meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.tar.bz2
meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.tar.xz
Second Life viewer sources 1.18.1.2
Diffstat (limited to 'linden/indra/newview/llhudmanager.cpp')
-rw-r--r--linden/indra/newview/llhudmanager.cpp101
1 files changed, 0 insertions, 101 deletions
diff --git a/linden/indra/newview/llhudmanager.cpp b/linden/indra/newview/llhudmanager.cpp
index f4eeb5b..0da2f8e 100644
--- a/linden/indra/newview/llhudmanager.cpp
+++ b/linden/indra/newview/llhudmanager.cpp
@@ -50,7 +50,6 @@ LLColor4 LLHUDManager::sChildColor;
50 50
51LLHUDManager::LLHUDManager() 51LLHUDManager::LLHUDManager()
52{ 52{
53 mShowPhysical = FALSE;
54 53
55 LLHUDManager::sParentColor = gColors.getColor("FocusColor"); 54 LLHUDManager::sParentColor = gColors.getColor("FocusColor");
56 // rdw commented out since it's not used. Also removed from colors_base.xml 55 // rdw commented out since it's not used. Also removed from colors_base.xml
@@ -59,110 +58,10 @@ LLHUDManager::LLHUDManager()
59 58
60LLHUDManager::~LLHUDManager() 59LLHUDManager::~LLHUDManager()
61{ 60{
62 mHUDJoints.reset();
63 mHUDSelectedJoints.reset();
64 mHUDEffects.reset(); 61 mHUDEffects.reset();
65} 62}
66 63
67 64
68void LLHUDManager::toggleShowPhysical(const BOOL show_physical)
69{
70 if (show_physical == mShowPhysical)
71 {
72 return;
73 }
74
75 mShowPhysical = show_physical;
76 if (show_physical)
77 {
78 S32 i;
79 for (i = 0; i < gObjectList.getNumObjects(); i++)
80 {
81 LLViewerObject *vobjp = gObjectList.getObject(i);
82
83 if (vobjp && vobjp->isJointChild() && vobjp->getParent())
84 {
85 LLHUDConnector *connectorp = (LLHUDConnector *)LLHUDObject::addHUDObject(LLHUDObject::LL_HUD_CONNECTOR);
86 connectorp->setTargets(vobjp, (LLViewerObject *)vobjp->getParent());
87 connectorp->setColors(LLColor4(1.f, 1.f, 1.f, 1.f), sChildColor, sParentColor);
88 EHavokJointType joint_type = vobjp->getJointType();
89 if (HJT_HINGE == joint_type)
90 {
91 connectorp->setLabel("Hinge");
92 }
93 else if (HJT_POINT == joint_type)
94 {
95 connectorp->setLabel("P2P");
96 }
97#if 0
98 else if (HJT_LPOINT == joint_type)
99 {
100 connectorp->setLabel("LP2P");
101 }
102#endif
103#if 0
104 else if (HJT_WHEEL == joint_type)
105 {
106 connectorp->setLabel("Wheel");
107 }
108#endif
109 mHUDJoints.put(connectorp);
110 }
111 }
112 }
113 else
114 {
115 mHUDJoints.reset();
116 }
117}
118
119void LLHUDManager::showJoints(LLDynamicArray < LLViewerObject* > *object_list)
120{
121 for (S32 i=0; i<object_list->count(); i++)
122 {
123 LLViewerObject *vobjp = object_list->get(i);
124 if (vobjp && vobjp->isJointChild() && vobjp->getParent())
125 {
126 LLHUDConnector *connectorp = (LLHUDConnector *)LLHUDObject::addHUDObject(LLHUDObject::LL_HUD_CONNECTOR);
127 connectorp->setTargets(vobjp, (LLViewerObject *)vobjp->getParent());
128 connectorp->setColors(LLColor4(1.f, 1.f, 1.f, 1.f), sChildColor, sParentColor);
129
130 EHavokJointType joint_type = vobjp->getJointType();
131 if (HJT_HINGE == joint_type)
132 {
133 connectorp->setLabel("Hinge");
134 }
135 else if (HJT_POINT == joint_type)
136 {
137 connectorp->setLabel("P2P");
138 }
139#if 0
140 else if (HJT_LPOINT == joint_type)
141 {
142 connectorp->setLabel("LP2P");
143 }
144#endif
145#if 0
146 else if (HJT_WHEEL == joint_type)
147 {
148 connectorp->setLabel("Wheel");
149 }
150#endif
151 mHUDSelectedJoints.put(connectorp);
152 }
153 }
154}
155
156void LLHUDManager::clearJoints()
157{
158 mHUDSelectedJoints.reset();
159}
160
161BOOL LLHUDManager::getShowPhysical() const
162{
163 return mShowPhysical;
164}
165
166void LLHUDManager::updateEffects() 65void LLHUDManager::updateEffects()
167{ 66{
168 LLFastTimer ftm(LLFastTimer::FTM_HUD_EFFECTS); 67 LLFastTimer ftm(LLFastTimer::FTM_HUD_EFFECTS);