def __init__(self, ent):
        Aspect.__init__(self,ent)
        self.ent = ent
        self.halfSize = self.ent.size /2
        self.EABoxColor = "white"
        self.offsets = []
        self.corners = []
        self.lowBounds = [0,0]
        self.highBounds = [0,0]
        self.showEABox = False

        meshErrorY = 4
        meshErrorZ = 5

        # establish offsets for entity aligned bounding box
        self.offsets.append(ogre.Vector3(0 + self.halfSize.x,0 - self.halfSize.y -meshErrorY,0- self.halfSize.z -meshErrorZ))
        self.offsets.append(ogre.Vector3(0 + self.halfSize.x,0+ self.halfSize.y -meshErrorY,0 - self.halfSize.z -meshErrorZ))
        self.offsets.append(ogre.Vector3(0 - self.halfSize.x,0+ self.halfSize.y -meshErrorY,0 - self.halfSize.z -meshErrorZ))
        self.offsets.append(ogre.Vector3(0 - self.halfSize.x,0- self.halfSize.y -meshErrorY,0 - self.halfSize.z -meshErrorZ))
        self.offsets.append(ogre.Vector3(0 - self.halfSize.x,0+ self.halfSize.y -meshErrorY,0 + self.halfSize.z -meshErrorZ))
        self.offsets.append(ogre.Vector3(0 + self.halfSize.x,0+ self.halfSize.y -meshErrorY,0 + self.halfSize.z -meshErrorZ))
        self.offsets.append(ogre.Vector3(0 + self.halfSize.x,0- self.halfSize.y -meshErrorY,0 + self.halfSize.z -meshErrorZ))
        self.offsets.append(ogre.Vector3(0 - self.halfSize.x,0- self.halfSize.y -meshErrorY,0 + self.halfSize.z -meshErrorZ))
        
        # establish offsets for entity aligned bounding box
        for i in range(8):
            self.corners.append(self.offsets[i] + self.ent.pos)

        # establish renderable information
        self.Lines = ogre.ManualObject( "BoxLine")
        self.Lines.setDynamic(True)
        self.LineNode = self.ent.engine.gfxMgr.sceneManager.getRootSceneNode().createChildSceneNode()
        self.LineNode.attachObject(self.Lines)
        self.LineNode.getAttachedObject('BoxLine').setCastShadows(False)
        self.updateLines()
Example #2
0
def find_pot_aspects(tree, pot_aspects, tags):
    """
    A recursive function that finds each noun in a sentence and appends them to a list.
    :param tree: A node.
    :param pot_aspects: A list of the current noun phrases found in a tree.
    :param tags: The tags of nouns.
    """
    if tree.is_leaf():
        if tree.tag in tags:
            pot_aspects.append(Aspect(None, tree.phrase, 6))
    else:
        for i in range(tree.children):
            child = tree.get_child(i)
            find_pot_aspects(child, pot_aspects, tags)
    def __init__(self, url=None, version=None, token=None):
        self.subject = Subject()
        self.aspect = Aspect()
        self.sample = Sample()

        if url:
            if url.endswith('/'):
                config.REFOCUS_URL = url
            else:
                config.REFOCUS_URL = url + '/'

        if config.API_VERSION or version:
            config.REFOCUS_URL += version if version else config.API_VERSION

        if token:
            config.REFOCUS_TOKEN = token
Example #4
0
 def __init__(self, ent):
     Aspect.__init__(self, ent)
     self.ent.vel = Vector3(0, 0, 0)
Example #5
0
 def __init__(self, ent):
     Aspect.__init__(self, ent)
Example #6
0
 def __init__(self,ent):
     Aspect.__init__(self,ent)
     self.emitterList = [0,0,0]
Example #7
0
 def __init__(self, ent):
     Aspect.__init__(self, ent)
     pass
Example #8
0
 def __init__(self, ent):
     Aspect.__init__(self, ent)
     self.waitTime = 0;
     self.turn = 0 # -1 = turn off, 0 = turn, 1 = Left, 2 = Right
Example #9
0
 def __init__(self, ent):
     Aspect.__init__(self, ent)
     self.commands = []
Example #10
0
 def __init__(self, ent):
     Aspect.__init__(self, ent)
     self.stillStrafing = False
     self.strafeCommand = False
Example #11
0
 def __init__(self, ent):
     Aspect.__init__(self, ent)
     self.node = None
Example #12
0
 def __init__(self, ent):
     Aspect.__init__(self, ent)
     self.ent.vel = Vector3(0, 0, 0)
Example #13
0
 def __init__(self, ent):
     Aspect.__init__(self, ent)
     self.commands = []
Example #14
0
 def __setattr__(self, key, value):
     if (self.isAspect(value)):
         value.Host = self.Host
     Aspect.__setattr__(self, key, value)