#include "TEveProjectionBases.h"
#include "TEveProjectionManager.h"
#include "TEveManager.h"
#include <cassert>
ClassImp(TEveProjectable);
TEveProjectable::TEveProjectable()
{
}
TEveProjectable::~TEveProjectable()
{
while ( ! fProjectedList.empty())
{
TEveProjected* p = fProjectedList.front();
p->UnRefProjectable(this);
TEveElement* el = dynamic_cast<TEveElement*>(p);
assert(el);
{
gEve->PreDeleteElement(el);
delete el;
}
}
}
void TEveProjectable::AddProjectedsToSet(std::set<TEveElement*>& set)
{
for (ProjList_i i=fProjectedList.begin(); i!=fProjectedList.end(); ++i)
{
set.insert(dynamic_cast<TEveElement*>(*i));
}
}
void TEveProjectable::PropagateVizParams(TEveElement* el)
{
if (el == 0)
el = dynamic_cast<TEveElement*>(this);
for (ProjList_i i=fProjectedList.begin(); i!=fProjectedList.end(); ++i)
{
dynamic_cast<TEveElement*>(*i)->CopyVizParams(el);
}
}
void TEveProjectable::PropagateRenderState(Bool_t rnr_self, Bool_t rnr_children)
{
for (ProjList_i i=fProjectedList.begin(); i!=fProjectedList.end(); ++i)
{
TEveElement* el = dynamic_cast<TEveElement*>(*i);
if (el->SetRnrSelfChildren(rnr_self, rnr_children))
el->ElementChanged();
}
}
void TEveProjectable::PropagateMainColor(Color_t color, Color_t old_color)
{
for (ProjList_i i=fProjectedList.begin(); i!=fProjectedList.end(); ++i)
{
TEveElement* el = dynamic_cast<TEveElement*>(*i);
if (el->GetMainColor() == old_color)
el->SetMainColor(color);
}
}
ClassImp(TEveProjected);
TEveProjected::TEveProjected() :
fManager (0),
fProjectable (0),
fDepth (0)
{
}
TEveProjected::~TEveProjected()
{
if (fProjectable) fProjectable->RemoveProjected(this);
}
void TEveProjected::SetProjection(TEveProjectionManager* mng, TEveProjectable* model)
{
fManager = mng;
if (fProjectable) fProjectable->RemoveProjected(this);
fProjectable = model;
if (fProjectable) fProjectable->AddProjected(this);
}
void TEveProjected::UnRefProjectable(TEveProjectable* assumed_parent)
{
static const TEveException eH("TEveProjected::UnRefProjectable ");
assert(fProjectable == assumed_parent);
fProjectable->RemoveProjected(this);
fProjectable = 0;
}
void TEveProjected::SetDepth(Float_t d)
{
if (fManager->GetProjection()->Is2D())
{
SetDepthLocal(d);
}
else
{
fDepth = d;
}
}
void TEveProjected::SetDepthCommon(Float_t d, TEveElement* el, Float_t* bbox)
{
Float_t delta = d - fDepth;
fDepth = d;
if (bbox) {
bbox[4] += delta;
bbox[5] += delta;
el->StampTransBBox();
}
}
TEveProjectionBases.cxx:1 TEveProjectionBases.cxx:2 TEveProjectionBases.cxx:3 TEveProjectionBases.cxx:4 TEveProjectionBases.cxx:5 TEveProjectionBases.cxx:6 TEveProjectionBases.cxx:7 TEveProjectionBases.cxx:8 TEveProjectionBases.cxx:9 TEveProjectionBases.cxx:10 TEveProjectionBases.cxx:11 TEveProjectionBases.cxx:12 TEveProjectionBases.cxx:13 TEveProjectionBases.cxx:14 TEveProjectionBases.cxx:15 TEveProjectionBases.cxx:16 TEveProjectionBases.cxx:17 TEveProjectionBases.cxx:18 TEveProjectionBases.cxx:19 TEveProjectionBases.cxx:20 TEveProjectionBases.cxx:21 TEveProjectionBases.cxx:22 TEveProjectionBases.cxx:23 TEveProjectionBases.cxx:24 TEveProjectionBases.cxx:25 TEveProjectionBases.cxx:26 TEveProjectionBases.cxx:27 TEveProjectionBases.cxx:28 TEveProjectionBases.cxx:29 TEveProjectionBases.cxx:30 TEveProjectionBases.cxx:31 TEveProjectionBases.cxx:32 TEveProjectionBases.cxx:33 TEveProjectionBases.cxx:34 TEveProjectionBases.cxx:35 TEveProjectionBases.cxx:36 TEveProjectionBases.cxx:37 TEveProjectionBases.cxx:38 TEveProjectionBases.cxx:39 TEveProjectionBases.cxx:40 TEveProjectionBases.cxx:41 TEveProjectionBases.cxx:42 TEveProjectionBases.cxx:43 TEveProjectionBases.cxx:44 TEveProjectionBases.cxx:45 TEveProjectionBases.cxx:46 TEveProjectionBases.cxx:47 TEveProjectionBases.cxx:48 TEveProjectionBases.cxx:49 TEveProjectionBases.cxx:50 TEveProjectionBases.cxx:51 TEveProjectionBases.cxx:52 TEveProjectionBases.cxx:53 TEveProjectionBases.cxx:54 TEveProjectionBases.cxx:55 TEveProjectionBases.cxx:56 TEveProjectionBases.cxx:57 TEveProjectionBases.cxx:58 TEveProjectionBases.cxx:59 TEveProjectionBases.cxx:60 TEveProjectionBases.cxx:61 TEveProjectionBases.cxx:62 TEveProjectionBases.cxx:63 TEveProjectionBases.cxx:64 TEveProjectionBases.cxx:65 TEveProjectionBases.cxx:66 TEveProjectionBases.cxx:67 TEveProjectionBases.cxx:68 TEveProjectionBases.cxx:69 TEveProjectionBases.cxx:70 TEveProjectionBases.cxx:71 TEveProjectionBases.cxx:72 TEveProjectionBases.cxx:73 TEveProjectionBases.cxx:74 TEveProjectionBases.cxx:75 TEveProjectionBases.cxx:76 TEveProjectionBases.cxx:77 TEveProjectionBases.cxx:78 TEveProjectionBases.cxx:79 TEveProjectionBases.cxx:80 TEveProjectionBases.cxx:81 TEveProjectionBases.cxx:82 TEveProjectionBases.cxx:83 TEveProjectionBases.cxx:84 TEveProjectionBases.cxx:85 TEveProjectionBases.cxx:86 TEveProjectionBases.cxx:87 TEveProjectionBases.cxx:88 TEveProjectionBases.cxx:89 TEveProjectionBases.cxx:90 TEveProjectionBases.cxx:91 TEveProjectionBases.cxx:92 TEveProjectionBases.cxx:93 TEveProjectionBases.cxx:94 TEveProjectionBases.cxx:95 TEveProjectionBases.cxx:96 TEveProjectionBases.cxx:97 TEveProjectionBases.cxx:98 TEveProjectionBases.cxx:99 TEveProjectionBases.cxx:100 TEveProjectionBases.cxx:101 TEveProjectionBases.cxx:102 TEveProjectionBases.cxx:103 TEveProjectionBases.cxx:104 TEveProjectionBases.cxx:105 TEveProjectionBases.cxx:106 TEveProjectionBases.cxx:107 TEveProjectionBases.cxx:108 TEveProjectionBases.cxx:109 TEveProjectionBases.cxx:110 TEveProjectionBases.cxx:111 TEveProjectionBases.cxx:112 TEveProjectionBases.cxx:113 TEveProjectionBases.cxx:114 TEveProjectionBases.cxx:115 TEveProjectionBases.cxx:116 TEveProjectionBases.cxx:117 TEveProjectionBases.cxx:118 TEveProjectionBases.cxx:119 TEveProjectionBases.cxx:120 TEveProjectionBases.cxx:121 TEveProjectionBases.cxx:122 TEveProjectionBases.cxx:123 TEveProjectionBases.cxx:124 TEveProjectionBases.cxx:125 TEveProjectionBases.cxx:126 TEveProjectionBases.cxx:127 TEveProjectionBases.cxx:128 TEveProjectionBases.cxx:129 TEveProjectionBases.cxx:130 TEveProjectionBases.cxx:131 TEveProjectionBases.cxx:132 TEveProjectionBases.cxx:133 TEveProjectionBases.cxx:134 TEveProjectionBases.cxx:135 TEveProjectionBases.cxx:136 TEveProjectionBases.cxx:137 TEveProjectionBases.cxx:138 TEveProjectionBases.cxx:139 TEveProjectionBases.cxx:140 TEveProjectionBases.cxx:141 TEveProjectionBases.cxx:142 TEveProjectionBases.cxx:143 TEveProjectionBases.cxx:144 TEveProjectionBases.cxx:145 TEveProjectionBases.cxx:146 TEveProjectionBases.cxx:147 TEveProjectionBases.cxx:148 TEveProjectionBases.cxx:149 TEveProjectionBases.cxx:150 TEveProjectionBases.cxx:151 TEveProjectionBases.cxx:152 TEveProjectionBases.cxx:153 TEveProjectionBases.cxx:154 TEveProjectionBases.cxx:155 TEveProjectionBases.cxx:156 TEveProjectionBases.cxx:157 TEveProjectionBases.cxx:158 TEveProjectionBases.cxx:159 TEveProjectionBases.cxx:160 TEveProjectionBases.cxx:161 TEveProjectionBases.cxx:162 TEveProjectionBases.cxx:163 TEveProjectionBases.cxx:164 TEveProjectionBases.cxx:165 TEveProjectionBases.cxx:166 TEveProjectionBases.cxx:167 TEveProjectionBases.cxx:168 TEveProjectionBases.cxx:169 TEveProjectionBases.cxx:170 TEveProjectionBases.cxx:171 TEveProjectionBases.cxx:172 TEveProjectionBases.cxx:173 TEveProjectionBases.cxx:174 TEveProjectionBases.cxx:175 TEveProjectionBases.cxx:176 TEveProjectionBases.cxx:177 TEveProjectionBases.cxx:178 TEveProjectionBases.cxx:179 TEveProjectionBases.cxx:180 TEveProjectionBases.cxx:181 TEveProjectionBases.cxx:182 TEveProjectionBases.cxx:183 TEveProjectionBases.cxx:184 TEveProjectionBases.cxx:185 TEveProjectionBases.cxx:186 TEveProjectionBases.cxx:187 TEveProjectionBases.cxx:188 TEveProjectionBases.cxx:189 TEveProjectionBases.cxx:190 TEveProjectionBases.cxx:191 TEveProjectionBases.cxx:192 TEveProjectionBases.cxx:193 TEveProjectionBases.cxx:194 TEveProjectionBases.cxx:195 TEveProjectionBases.cxx:196 TEveProjectionBases.cxx:197 TEveProjectionBases.cxx:198 TEveProjectionBases.cxx:199 TEveProjectionBases.cxx:200 TEveProjectionBases.cxx:201 TEveProjectionBases.cxx:202 TEveProjectionBases.cxx:203 TEveProjectionBases.cxx:204 TEveProjectionBases.cxx:205 TEveProjectionBases.cxx:206 TEveProjectionBases.cxx:207 TEveProjectionBases.cxx:208 TEveProjectionBases.cxx:209 TEveProjectionBases.cxx:210 TEveProjectionBases.cxx:211 TEveProjectionBases.cxx:212