The rectangle is defined with the Rectangle class (with two 3D points).
The color of the rectangle of the PrimitiveManagerRubberBandInterface cannot be changed.
Displaying a Rectangle may be done with the following :
/** * Sample to explain how to create a 2D rectangle on top of the rendering (PrimitiveManagerRubberBandInterface). */ import { InfiniteEngineInterface, PrimitiveManagerRubberBandInterface, Vector2, Rectangle } from'generated/documentation/appinfiniteapi';
// created previously, the rectangle extents letlRectanglePosition1 : Vector2; letlRectanglePosition2 : Vector2;
// the rubber band manager constlRubberBandManager : PrimitiveManagerRubberBandInterface = lInfiniteEngine.getPrimitiveManager().getRubberBandManager();
// make sure rectangle is correct console.assert(lSelectionRectangle.isValid() && (!lSelectionRectangle.isEmpty()));
// set rectangle and display it lRubberBandManager.setRubberBandRectangle(lSelectionRectangle); lRubberBandManager.setRubberBandVisible(true);
You may create also boxes, lines, etc with [PrimitiveManagerBoxInterface](PrimitiveManagerBoxInterface.html), [PrimitiveManagerLineInterface](PrimitiveManagerLineInterface.html), etc.
The PrimitiveManagerRubberBandInterface is used to display a unique orange rectangle on top of the DMU.
It is mainly used to select a rectangular area.
The PrimitiveManagerPointInterface is accessed through the getRubberBandManager function (the PrimitiveManagerInterface is accessed through getPrimitiveManager).
The rectangle is defined with the Rectangle class (with two 3D points).
The color of the rectangle of the PrimitiveManagerRubberBandInterface cannot be changed.
Displaying a Rectangle may be done with the following :
You may create also boxes, lines, etc with [PrimitiveManagerBoxInterface](PrimitiveManagerBoxInterface.html), [PrimitiveManagerLineInterface](PrimitiveManagerLineInterface.html), etc.
See