Package com.threerings.miso.data

Examples of com.threerings.miso.data.ObjectInfo


            Point ts = MisoUtil.tileToScreen(_metrics, tx, ty, new Point());

//             log.info("Added portal", "portal", portal, "screen", StringUtil.toString(p), "tile",
//                StringUtil.coordsToString(tx, ty), "tscreen", StringUtil.toString(ts));

            ObjectInfo info = new ObjectInfo(0, tx, ty);
            info.action = "portal:" + portal.portalId;

            // TODO: cache me
            ObjectTile tile = new PortalObjectTile(
                ts.x + _metrics.tilehwid - p.x + (PORTAL_ICON_WIDTH / 2),
View Full Code Here


        // now prune from this set any and all objects that don't actually
        // overlap the specified rectangle
        Rectangle foot = new Rectangle();
        for (int ii = 0; ii < objs.size(); ii++) {
            ObjectInfo info = objs.get(ii);
            if (getObjectFootprint(tmgr, info.tileId, info.x, info.y, foot)) {
                if (!foot.intersects(rect)) {
                    objs.remove(ii--);
                }
            } else {
View Full Code Here

     */
    public ObjectInfo addObject (ObjectTile tile, int fqTileId, int x, int y)
    {
        Point p = new Point(x, y);
        adjustObjectCoordsAccordingToGrip(p, tile);
        return addObject(new ObjectInfo(fqTileId, x, y));
    }
View Full Code Here

        _ptile = tile;

        // if this is an object tile, create a temporary scene object we
        // can use to perform calculations with the object while placing
        if (_ptile instanceof ObjectTile) {
            _pscobj = new SceneObject(this, new ObjectInfo(0, _ppos.x, _ppos.y), (ObjectTile)tile);
        } else {
            _pscobj = null;
        }
    }
View Full Code Here

     */
    protected boolean isTilePlacementValid (int x, int y, Tile tile)
    {
        if (tile instanceof ObjectTile) {
            // create a temporary scene object for this tile
            SceneObject nobj = new SceneObject(this, new ObjectInfo(0, x, y), (ObjectTile)tile);
            // report invalidity if overlaps any existing objects
            int ocount = _vizobjs.size();
            for (int ii = 0; ii < ocount; ii++) {
                SceneObject scobj = _vizobjs.get(ii);
                if (scobj.objectFootprintOverlaps(nobj)) {
View Full Code Here

TOP

Related Classes of com.threerings.miso.data.ObjectInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.