G4VMarker Class Reference

#include <G4VMarker.hh>

Inheritance diagram for G4VMarker:

G4Visible G4Circle G4Polymarker G4Scale G4Square G4Text

Public Types

 noFill
 hashed
 filled
 none
 world
 screen
enum  FillStyle { noFill, hashed, filled }
enum  SizeType { none, world, screen }

Public Member Functions

 G4VMarker ()
 G4VMarker (const G4VMarker &)
 G4VMarker (const G4Point3D &position)
virtual ~G4VMarker ()
G4VMarkeroperator= (const G4VMarker &)
G4bool operator!= (const G4VMarker &) const
G4Point3D GetPosition () const
SizeType GetSizeType () const
G4double GetWorldSize () const
G4double GetWorldDiameter () const
G4double GetWorldRadius () const
G4double GetScreenSize () const
G4double GetScreenDiameter () const
G4double GetScreenRadius () const
FillStyle GetFillStyle () const
void SetPosition (const G4Point3D &)
void SetSize (SizeType, G4double)
void SetDiameter (SizeType, G4double)
void SetRadius (SizeType, G4double)
void SetWorldSize (G4double)
void SetWorldDiameter (G4double)
void SetWorldRadius (G4double)
void SetScreenSize (G4double)
void SetScreenDiameter (G4double)
void SetScreenRadius (G4double)
void SetFillStyle (FillStyle)
virtual const G4StringGetInfo () const
virtual void SetInfo (const G4String &info)

Friends

std::ostream & operator<< (std::ostream &os, const G4VMarker &)

Detailed Description

Definition at line 91 of file G4VMarker.hh.


Member Enumeration Documentation

enum G4VMarker::FillStyle

Enumerator:
noFill 
hashed 
filled 

Definition at line 97 of file G4VMarker.hh.

00097 {noFill, hashed, filled};

enum G4VMarker::SizeType

Enumerator:
none 
world 
screen 

Definition at line 98 of file G4VMarker.hh.

00098 {none, world, screen};


Constructor & Destructor Documentation

G4VMarker::G4VMarker (  ) 

Definition at line 35 of file G4VMarker.cc.

00035                      :
00036   fPosition   (G4Point3D ()),
00037   fWorldSize  (0.),
00038   fScreenSize (0.),
00039   fFillStyle  (noFill)
00040 {
00041   // fInfo: default initialisation.
00042 }

G4VMarker::G4VMarker ( const G4VMarker  ) 

Definition at line 44 of file G4VMarker.cc.

00044                                         :
00045   G4Visible   (mk),
00046   fPosition   (mk.fPosition),
00047   fWorldSize  (mk.fWorldSize),
00048   fScreenSize (mk.fScreenSize),
00049   fFillStyle  (mk.fFillStyle),
00050   fInfo       (mk.fInfo)
00051 {}

G4VMarker::G4VMarker ( const G4Point3D position  ) 

Definition at line 53 of file G4VMarker.cc.

00053                                          :
00054   fPosition   (pos),
00055   fWorldSize  (0.),
00056   fScreenSize (0.),
00057   fFillStyle  (noFill),
00058   fInfo       (G4String())
00059 {
00060   // fInfo: default initialisation.
00061 }

G4VMarker::~G4VMarker (  )  [virtual]

Definition at line 63 of file G4VMarker.cc.

00063 {}


Member Function Documentation

G4VMarker::FillStyle G4VMarker::GetFillStyle (  )  const [inline]

Definition at line 59 of file G4VMarker.icc.

00059                                                          {
00060   return fFillStyle;
00061 }

const G4String & G4VMarker::GetInfo (  )  const [inline, virtual]

Definition at line 106 of file G4VMarker.icc.

00106 {return fInfo;}

G4Point3D G4VMarker::GetPosition (  )  const [inline]

Definition at line 31 of file G4VMarker.icc.

Referenced by G4HepRepSceneHandler::AddPrimitive(), G4HepRepFileSceneHandler::AddPrimitive(), and G4TextModel::G4TextModel().

00031                                                {
00032   return fPosition;
00033 }

G4double G4VMarker::GetScreenDiameter (  )  const [inline]

Definition at line 51 of file G4VMarker.icc.

00051                                                     {
00052   return fScreenSize;
00053 }

G4double G4VMarker::GetScreenRadius (  )  const [inline]

Definition at line 55 of file G4VMarker.icc.

00055                                                   {
00056   return fScreenSize / 2.;
00057 }

G4double G4VMarker::GetScreenSize (  )  const [inline]

Definition at line 47 of file G4VMarker.icc.

Referenced by G4TextModel::G4TextModel(), and G4VSceneHandler::GetMarkerSize().

00047                                                 {
00048   return fScreenSize;
00049 }

G4VMarker::SizeType G4VMarker::GetSizeType (  )  const

Definition at line 112 of file G4VMarker.cc.

References none, screen, and world.

00112                                                 {
00113   SizeType type = none;
00114   if (fWorldSize) type = world;
00115   else if (fScreenSize) type = screen;
00116   return type;
00117 }

G4double G4VMarker::GetWorldDiameter (  )  const [inline]

Definition at line 39 of file G4VMarker.icc.

00039                                                    {
00040   return fWorldSize;
00041 }

G4double G4VMarker::GetWorldRadius (  )  const [inline]

Definition at line 43 of file G4VMarker.icc.

Referenced by G4HepRepFileSceneHandler::AddPrimitive().

00043                                                  {
00044   return fWorldSize / 2.;
00045 }

G4double G4VMarker::GetWorldSize (  )  const [inline]

Definition at line 35 of file G4VMarker.icc.

Referenced by G4VSceneHandler::GetMarkerSize().

00035                                                {
00036   return fWorldSize;
00037 }

G4bool G4VMarker::operator!= ( const G4VMarker  )  const

Definition at line 76 of file G4VMarker.cc.

References fFillStyle, fInfo, fPosition, fScreenSize, and fWorldSize.

00076                                                         {
00077   if (
00078       (G4Visible::operator != (mk))   ||
00079       (fWorldSize  != mk.fWorldSize)   ||
00080       (fScreenSize != mk.fScreenSize)  ||
00081       (fFillStyle  != mk.fFillStyle)   ||
00082       !(fPosition  == mk.fPosition)    ||
00083       (fInfo       != mk.fInfo)
00084       )
00085     return true;
00086   return false;
00087 }

G4VMarker & G4VMarker::operator= ( const G4VMarker  ) 

Definition at line 65 of file G4VMarker.cc.

References fFillStyle, fInfo, fPosition, fScreenSize, fWorldSize, and G4Visible::operator=().

Referenced by G4Text::operator=().

00065                                                      {
00066   if (&mk == this) return *this;
00067   G4Visible::operator = (mk);
00068   fPosition   = mk.fPosition;
00069   fWorldSize  = mk.fWorldSize;
00070   fScreenSize = mk.fScreenSize;
00071   fFillStyle  = mk.fFillStyle;
00072   fInfo       = mk.fInfo;
00073   return *this;
00074 }

void G4VMarker::SetDiameter ( SizeType  ,
G4double   
) [inline]

Definition at line 67 of file G4VMarker.icc.

References SetSize().

00067                                                                     {
00068   SetSize(sizeType, size);
00069 }

void G4VMarker::SetFillStyle ( FillStyle   )  [inline]

Definition at line 102 of file G4VMarker.icc.

00102                                                              {
00103   fFillStyle = style;
00104 }

void G4VMarker::SetInfo ( const G4String info  )  [inline, virtual]

Definition at line 108 of file G4VMarker.icc.

00108 {fInfo = info;}

void G4VMarker::SetPosition ( const G4Point3D  )  [inline]

Definition at line 63 of file G4VMarker.icc.

00063                                                         {
00064   fPosition = pos;
00065 }

void G4VMarker::SetRadius ( SizeType  ,
G4double   
) [inline]

Definition at line 71 of file G4VMarker.icc.

References SetSize().

00071                                                                   {
00072   SetSize(sizeType, 2. * size);
00073 }

void G4VMarker::SetScreenDiameter ( G4double   )  [inline]

Definition at line 92 of file G4VMarker.icc.

00092                                                      {
00093   fWorldSize  = 0.;
00094   fScreenSize = sd;
00095 }

void G4VMarker::SetScreenRadius ( G4double   )  [inline]

Definition at line 97 of file G4VMarker.icc.

00097                                                     {
00098   fWorldSize  = 0.;
00099   fScreenSize = 2. * scr;
00100 }

void G4VMarker::SetScreenSize ( G4double   )  [inline]

Definition at line 87 of file G4VMarker.icc.

Referenced by G4VScoreColorMap::DrawColorChartText(), G4ScoreLogColorMap::DrawColorChartText(), G4AxesModel::G4AxesModel(), G4ViewParameters::G4ViewParameters(), G4VisCommandSceneAddText2D::SetNewValue(), and G4VisCommandSceneAddText::SetNewValue().

00087                                                  {
00088   fWorldSize  = 0.;
00089   fScreenSize = ss;
00090 }

void G4VMarker::SetSize ( SizeType  ,
G4double   
)

Definition at line 119 of file G4VMarker.cc.

References screen, and world.

Referenced by SetDiameter(), and SetRadius().

00119                                                          {
00120   fWorldSize = fScreenSize = 0.;
00121   if (sizeType == world) fWorldSize = size;
00122   else if (sizeType == screen) fScreenSize = size;
00123 }

void G4VMarker::SetWorldDiameter ( G4double   )  [inline]

Definition at line 79 of file G4VMarker.icc.

00079                                                     {
00080   fWorldSize = wd;
00081 }

void G4VMarker::SetWorldRadius ( G4double   )  [inline]

Definition at line 83 of file G4VMarker.icc.

00083                                                   {
00084   fWorldSize = 2. * wr;
00085 }

void G4VMarker::SetWorldSize ( G4double   )  [inline]

Definition at line 75 of file G4VMarker.icc.

00075                                                 {
00076   fWorldSize = ws;
00077 }


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const G4VMarker marker 
) [friend]

Definition at line 89 of file G4VMarker.cc.

00089                                                                   {
00090   os << "G4VMarker: position: " << marker.fPosition
00091      << ", world size: " << marker.fWorldSize
00092      << ", screen size: " << marker.fScreenSize << '\n'
00093      << "           fill style: ";
00094   switch (marker.fFillStyle) {
00095   case G4VMarker::noFill:
00096     os << "no fill";
00097     break;
00098   case G4VMarker::hashed:
00099     os << "hashed";
00100     break;
00101   case G4VMarker::filled:
00102     os << "filled";
00103     break;
00104   default:
00105     os << "unrecognised"; break;
00106   }
00107   if (!marker.fInfo.empty()) os << "\n  User information: " << marker.fInfo;
00108   os << "\n           " << (const G4Visible&) marker;
00109   return os;
00110 }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:53:50 2013 for Geant4 by  doxygen 1.4.7