How to use the eve.client.script.ui.shared.maps.hexMap.Point function in Eve

To help you get started, we’ve selected a few Eve examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bc6 / Paraplegic-Hank-Drake / eve / client / script / ui / shared / maps / hexMap.py View on Github external
def CalculateHexagonParameters(self):
        mmin = trinity.TriVector(-1.0, 0.0, -0.866025447845459)
        mmax = trinity.TriVector(1.0, 0.0, 0.866025447845459)
        maxx = mmax.z / math.sin(math.radians(60.0))
        topRightX = math.cos(math.radians(60.0)) * maxx
        self.tileMin = Point(-maxx, mmin.z)
        self.tileMax = Point(maxx, mmax.z)
        self.hexPoints = (Point(topRightX, self.tileMax.y),
         Point(self.tileMax.x, 0.0),
         Point(topRightX, self.tileMin.y),
         Point(-topRightX, self.tileMin.y),
         Point(self.tileMin.x, 0.0),
         Point(-topRightX, self.tileMax.y))
        self.tileWidth = maxx * 2.0 * 0.75
        self.tileHeight = mmax.z * 2.0
github bc6 / Paraplegic-Hank-Drake / eve / client / script / ui / shared / maps / hexMap.py View on Github external
if in_nw and in_ne and in_se and in_sw:
                self.items.append(item)
            else:
                if in_nw:
                    nw_items.append(item)
                if in_ne:
                    ne_items.append(item)
                if in_se:
                    se_items.append(item)
                if in_sw:
                    sw_items.append(item)

        if nw_items:
            self.nw = QuadTree(nw_items, depth, AABB(Point(aabb.min.x, aabb.min.y), Point(center.x, center.y)))
        if ne_items:
            self.ne = QuadTree(ne_items, depth, AABB(Point(center.x, aabb.min.y), Point(aabb.max.x, center.y)))
        if se_items:
            self.se = QuadTree(se_items, depth, AABB(Point(center.x, center.y), Point(aabb.max.x, aabb.max.y)))
        if sw_items:
            self.sw = QuadTree(sw_items, depth, AABB(Point(aabb.min.x, center.y), Point(center.x, aabb.max.y)))
github bc6 / Paraplegic-Hank-Drake / eve / client / script / ui / shared / maps / hexMap.py View on Github external
def GetAdaptedHexPoints(self, tile):
        newPoints = []
        pos = Point(tile.center[0], tile.center[2])
        for point in self.hexPoints:
            newPoint = point * tile.scale + pos
            newPoints.append(newPoint)

        return newPoints
github bc6 / Paraplegic-Hank-Drake / eve / client / script / ui / shared / maps / hexMap.py View on Github external
def CalculateHexagonParameters(self):
        mmin = trinity.TriVector(-1.0, 0.0, -0.866025447845459)
        mmax = trinity.TriVector(1.0, 0.0, 0.866025447845459)
        maxx = mmax.z / math.sin(math.radians(60.0))
        topRightX = math.cos(math.radians(60.0)) * maxx
        self.tileMin = Point(-maxx, mmin.z)
        self.tileMax = Point(maxx, mmax.z)
        self.hexPoints = (Point(topRightX, self.tileMax.y),
         Point(self.tileMax.x, 0.0),
         Point(topRightX, self.tileMin.y),
         Point(-topRightX, self.tileMin.y),
         Point(self.tileMin.x, 0.0),
         Point(-topRightX, self.tileMax.y))
        self.tileWidth = maxx * 2.0 * 0.75
        self.tileHeight = mmax.z * 2.0
github bc6 / Paraplegic-Hank-Drake / eve / client / script / ui / shared / maps / hexMap.py View on Github external
nw_items.append(item)
                if in_ne:
                    ne_items.append(item)
                if in_se:
                    se_items.append(item)
                if in_sw:
                    sw_items.append(item)

        if nw_items:
            self.nw = QuadTree(nw_items, depth, AABB(Point(aabb.min.x, aabb.min.y), Point(center.x, center.y)))
        if ne_items:
            self.ne = QuadTree(ne_items, depth, AABB(Point(center.x, aabb.min.y), Point(aabb.max.x, center.y)))
        if se_items:
            self.se = QuadTree(se_items, depth, AABB(Point(center.x, center.y), Point(aabb.max.x, aabb.max.y)))
        if sw_items:
            self.sw = QuadTree(sw_items, depth, AABB(Point(aabb.min.x, center.y), Point(center.x, aabb.max.y)))
github bc6 / Paraplegic-Hank-Drake / eve / client / script / ui / shared / maps / hexMap.py View on Github external
def CalculateHexagonParameters(self):
        mmin = trinity.TriVector(-1.0, 0.0, -0.866025447845459)
        mmax = trinity.TriVector(1.0, 0.0, 0.866025447845459)
        maxx = mmax.z / math.sin(math.radians(60.0))
        topRightX = math.cos(math.radians(60.0)) * maxx
        self.tileMin = Point(-maxx, mmin.z)
        self.tileMax = Point(maxx, mmax.z)
        self.hexPoints = (Point(topRightX, self.tileMax.y),
         Point(self.tileMax.x, 0.0),
         Point(topRightX, self.tileMin.y),
         Point(-topRightX, self.tileMin.y),
         Point(self.tileMin.x, 0.0),
         Point(-topRightX, self.tileMax.y))
        self.tileWidth = maxx * 2.0 * 0.75
        self.tileHeight = mmax.z * 2.0
github bc6 / Paraplegic-Hank-Drake / eve / client / script / ui / shared / maps / hexMap.py View on Github external
in_ne = item.max.x >= center.x and item.min.y <= center.y
            in_se = item.max.x >= center.x and item.max.y >= center.y
            if in_nw and in_ne and in_se and in_sw:
                self.items.append(item)
            else:
                if in_nw:
                    nw_items.append(item)
                if in_ne:
                    ne_items.append(item)
                if in_se:
                    se_items.append(item)
                if in_sw:
                    sw_items.append(item)

        if nw_items:
            self.nw = QuadTree(nw_items, depth, AABB(Point(aabb.min.x, aabb.min.y), Point(center.x, center.y)))
        if ne_items:
            self.ne = QuadTree(ne_items, depth, AABB(Point(center.x, aabb.min.y), Point(aabb.max.x, center.y)))
        if se_items:
            self.se = QuadTree(se_items, depth, AABB(Point(center.x, center.y), Point(aabb.max.x, aabb.max.y)))
        if sw_items:
            self.sw = QuadTree(sw_items, depth, AABB(Point(aabb.min.x, center.y), Point(center.x, aabb.max.y)))
github bc6 / Paraplegic-Hank-Drake / eve / client / script / ui / shared / maps / hexMap.py View on Github external
def CalculateHexagonParameters(self):
        mmin = trinity.TriVector(-1.0, 0.0, -0.866025447845459)
        mmax = trinity.TriVector(1.0, 0.0, 0.866025447845459)
        maxx = mmax.z / math.sin(math.radians(60.0))
        topRightX = math.cos(math.radians(60.0)) * maxx
        self.tileMin = Point(-maxx, mmin.z)
        self.tileMax = Point(maxx, mmax.z)
        self.hexPoints = (Point(topRightX, self.tileMax.y),
         Point(self.tileMax.x, 0.0),
         Point(topRightX, self.tileMin.y),
         Point(-topRightX, self.tileMin.y),
         Point(self.tileMin.x, 0.0),
         Point(-topRightX, self.tileMax.y))
        self.tileWidth = maxx * 2.0 * 0.75
        self.tileHeight = mmax.z * 2.0
github bc6 / Paraplegic-Hank-Drake / eve / client / script / ui / shared / maps / hexMap.py View on Github external
def GetAdaptedTileAABB(self, tile):
        v = Point(tile.center[0], tile.center[2])
        return AABB(self.tileMin * tile.scale + v, self.tileMax * tile.scale + v)