Examples of BoundingRectangle


Examples of net.sf.robocode.battle.BoundingRectangle

    this.battle = battle;
    this.robotSpecification = robotSpecification;

    this.rbSerializer = new RbSerializer();

    this.boundingBox = new BoundingRectangle();
    this.scanArc = new Arc2D.Double();
    this.teamPeer = team;
    this.state = RobotState.ACTIVE;
    this.battleRules = battle.getBattleRules();
View Full Code Here

Examples of net.sf.robocode.battle.BoundingRectangle

  private final BoundingRectangle boundingBox;

  public BattleField(int width, int height) {
    super();
    this.boundingBox = new BoundingRectangle(0, 0, width, height);
  }
View Full Code Here

Examples of org.geotools.renderer3d.utils.BoundingRectangle

        // Remove previous texture request, if found
        myTextureProvider.cancelRequest( myTextureListener );

        // Update center
        final BoundingRectangle bounds = myQuadTreeNode.getBounds();
        myCenter = new Vector3f( (float) bounds.getCenterX(),
                                 (float) bounds.getCenterY(),
                                 0 ); // TODO: Get ground height at center.

        // Update terrain mesh if present
        if ( myTerrainMesh != null )
        {
            ///fillTextureImageWithLoadingGraphics();
            myTerrainMesh.updateBounds( bounds.getX1(), bounds.getY1(), bounds.getX2(), bounds.getY2() );
//            myTerrainMesh.setTextureImage( myTextureImage );

            // Copy a chunk of a previously calculated parent block texture to the texture of this block
            initializeTextureFromParentTexture();
        }
View Full Code Here

Examples of org.geotools.renderer3d.utils.BoundingRectangle

    // Private Methods

    private void initializeTextureFromParentTexture()
    {
        myTempParentTextureToUse = null;
        final BoundingRectangle area = calculatePlaceholderTextureAndArea( myQuadTreeNode );

        setPlaceholderTexture( myTempParentTextureToUse, area );
    }
View Full Code Here

Examples of org.geotools.renderer3d.utils.BoundingRectangle

            }
            else
            {
                // Get area and texture from parent
                final QuadTreeNode<TerrainBlock> parentNode = node.getParent();
                final BoundingRectangle area = calculatePlaceholderTextureAndArea( parentNode );

                if ( area == null )
                {
                    return null;
                }
                else
                {
                    // Calculate location of this node in the parent area
                    int quadrant = parentNode.getIndexOfChild( node );

                    // Compensate for some texture flipping complications
                    quadrant = area.flipSubquadrantAcrossY( quadrant );

                    return area.createSubquadrantBoundingRectangle( quadrant );
                }
            }
        }
    }
View Full Code Here

Examples of org.geotools.renderer3d.utils.BoundingRectangle

        // Clear to color
        graphics.setColor( myBackgroundColor );
        graphics.fillRect( 0, 0, width, height );

        final BoundingRectangle transformedArea = area.transform( myTranslateX, myTranslateY, myScaleX, myScaleY );

        // Create the source and destination areas
        final Rectangle targetArea = new Rectangle( width, height );
        final ReferencedEnvelope sourceArea = new ReferencedEnvelope( transformedArea.getX1(),
                                                                      transformedArea.getX2(),
                                                                      transformedArea.getY1(),
                                                                      transformedArea.getY2(),
                                                                      myMap.getCoordinateReferenceSystem() );

        // Render
        myStreamingRenderer.paint( graphics, targetArea, sourceArea );
View Full Code Here

Examples of org.geotools.renderer3d.utils.BoundingRectangle

        {
            // Calcualte which direction the new parent should expand into
            final int parentSubsector = myBoundingRectangle.getSubsectorAt( x, y );

            // Create a new parent
            final BoundingRectangle parentBounds = myBoundingRectangle.createParentBoundingRectangle( parentSubsector );
            final QuadTreeNode<N> parentNode = myQuadTree.createQuadTreeNode( parentBounds, null );
            myQuadTree.initnodedata( parentNode );

            // Add this node as a child of the parent node (in the opposite corner of where we expanded)
            final int childSubquadrant = myBoundingRectangle.getOppositeSubquadrant( parentSubsector );
View Full Code Here

Examples of org.geotools.renderer3d.utils.BoundingRectangle

                {
                    myChildren[ i ] = childNode;
                }
                else
                {
                    final BoundingRectangle rectangle = myBoundingRectangle.createSubquadrantBoundingRectangle( i );
                    myChildren[ i ] = myQuadTree.createQuadTreeNode( rectangle, this );
                }
            }

            // Init node data for the other children
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.