Exemplo n.º 1
0
        return

    def id(self):
        return self._id

    pass


# 2. the handler to construct c++ engine
def onHe3Tube(self, he3tube):
    return construct(self, he3tube)


# 4. register the new class and handlers
import mccomposite
mccomposite.register_engine_renderer_handler(He3Tube, onHe3Tube)


# the handler for a copy of he3tube
def onHe3TubeCopy(self, copy):
    he3tube = copy.reference()
    return construct(self, he3tube)


class He3TubeCopy:
    pass


mccomposite.register_engine_renderer_handler(He3TubeCopy, onHe3TubeCopy)

Exemplo n.º 2
0
#                        (C) 2007  All Rights Reserved
#
# {LicenseText}
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#

#sometimes ScattererCopy are just called "Copy"
from mccomposite.ScattererCopy import ScattererCopy


class Copy(ScattererCopy):
    def identify(self, visitor):
        return visitor.onCopy(self)

    pass  # Copy


def onCopy(self, copy):
    return self.onScattererCopy(copy)


# 4. register the new class and handlers
import mccomposite
mccomposite.register_engine_renderer_handler(Copy, onCopy)

# version
__id__ = "$Id$"

# End of file
Exemplo n.º 3
0
        self._id = id
        return
    def id(self): return self._id
    pass

    

# 2. the handler to construct c++ engine
def onHe3Tube(self, he3tube):
    return construct(self, he3tube)



# 4. register the new class and handlers
import mccomposite
mccomposite.register_engine_renderer_handler (He3Tube, onHe3Tube )




# the handler for a copy of he3tube
def onHe3TubeCopy(self, copy):
    he3tube = copy.reference()
    return construct(self, he3tube)
class He3TubeCopy: pass
mccomposite.register_engine_renderer_handler( He3TubeCopy, onHe3TubeCopy )



#hack
#Detector actually means he3 tube. we should use more specific name
Exemplo n.º 4
0
#
#                                   Jiao Lin
#                      California Institute of Technology
#                        (C) 2007  All Rights Reserved
#
# {LicenseText}
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#


#sometimes ScattererCopy are just called "Copy"
from mccomposite.ScattererCopy import ScattererCopy
class Copy(ScattererCopy):
    def identify(self, visitor): return visitor.onCopy(self)
    pass # Copy

def onCopy(self, copy):
    return self.onScattererCopy(copy)


# 4. register the new class and handlers
import mccomposite
mccomposite.register_engine_renderer_handler(Copy, onCopy)


# version
__id__ = "$Id$"

# End of file