forked from root-project/root
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from alja/Prox4c1
Introduce proxy builder view types
- Loading branch information
Showing
12 changed files
with
274 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#ifndef ROOT_REveScalableStraightLineSet | ||
#define ROOT_REveScalableStraightLineSet | ||
|
||
#include "ROOT/REveStraightLineSet.hxx" | ||
|
||
namespace ROOT { | ||
namespace Experimental { | ||
class REveScalableStraightLineSet : public REveStraightLineSet | ||
{ | ||
private: | ||
REveScalableStraightLineSet(const REveScalableStraightLineSet&); // Not implemented | ||
REveScalableStraightLineSet& operator=(const REveScalableStraightLineSet&); // Not implemented | ||
|
||
protected: | ||
Double_t fCurrentScale; | ||
Float_t fScaleCenter[3]; | ||
|
||
public: | ||
REveScalableStraightLineSet(const char* n="ScalableStraightLineSet", const char* t=""); | ||
virtual ~REveScalableStraightLineSet() {} | ||
|
||
void SetScaleCenter(Float_t x, Float_t y, Float_t z); | ||
void SetScale(Double_t scale); | ||
|
||
Double_t GetScale() const; | ||
}; | ||
|
||
} // namespace Experimental | ||
} // namespace ROOT | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#include "ROOT/REveScalableStraightLineSet.hxx" | ||
#include "ROOT/REveChunkManager.hxx" | ||
|
||
/** \class REveScalableStraightLineSet | ||
\ingroup REve | ||
Straight-line-set with extra scaling, useful for projectables that need | ||
to be scaled in accordance with an external object. | ||
*/ | ||
|
||
using namespace ROOT::Experimental; | ||
namespace REX = ROOT::Experimental; | ||
|
||
//////////////////////////////////////////////////////////////////////////////// | ||
/// Constructor. | ||
|
||
REveScalableStraightLineSet::REveScalableStraightLineSet(const char* n, const char* t): | ||
REveStraightLineSet (n, t), | ||
fCurrentScale(1.0) | ||
{ | ||
fScaleCenter[0] = 0; | ||
fScaleCenter[1] = 0; | ||
fScaleCenter[2] = 0; | ||
} | ||
|
||
//////////////////////////////////////////////////////////////////////////////// | ||
/// Set scale center. | ||
|
||
void REveScalableStraightLineSet::SetScaleCenter(Float_t x, Float_t y, Float_t z) | ||
{ | ||
fScaleCenter[0] = x; | ||
fScaleCenter[1] = y; | ||
fScaleCenter[2] = z; | ||
} | ||
|
||
//////////////////////////////////////////////////////////////////////////////// | ||
/// Return current scale. | ||
|
||
Double_t REveScalableStraightLineSet::GetScale() const | ||
{ | ||
return fCurrentScale; | ||
} | ||
|
||
//////////////////////////////////////////////////////////////////////////////// | ||
/// Loop over line parameters and scale coordinates. | ||
|
||
void REveScalableStraightLineSet::SetScale(Double_t scale) | ||
{ | ||
REveChunkManager::iterator li(GetLinePlex()); | ||
while (li.next()) | ||
{ | ||
REveStraightLineSet::Line_t& l = * (REveStraightLineSet::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; | ||
} |
Oops, something went wrong.