Re: Modifying TMaterial
gora@solar2.ucr.edu
Tue, 27 Jul 1999 17:55:57 -0700
Hello again,
I have found a way to do what I wanted. It turns out that it was my lack
of understanding of C++ that was the problem.
Just in case there are other people as confused as I was, the way to do
this is to derive, say, TMedium from TMaterial, with the constructor for the
derived class invoking the TMaterial constructor. Define an instance of
TMedium as usual. Then from the global gGeometry->GetMaterial("name") can
be used to retrieve a pointer to this, which will be of type TMaterial *.
This can then be cast to a TMedium *, which can be used to retrieve the
additional properties of the TMedium object.
Thanks for your help and sorry to be a bother.
Regards,
Gora