# cee::vis::BoxLocator

class `BoxLocator` : public MarkupModel

  A locator designed to position a box.

  It has custom drawing (draws the box, corner points and directional arrows in corners). The box locator also handles rotation of the box itself by mouse navigation and handles panning so that the panning is done in the plane.

  Each corner has a sphere and a directional arrow for each of the three axis directions. The sphere can be grabbed and dragged in the screen plane. Grabbing one of the arrows will limit the movement of the corner to the direction of the arrow.

  Public Functions

  `BoxLocator`(View *view)

    Creates a box locator for the given view.

  void `setup`(const Vec3d &min, const Vec3d &max)

    Creates a box locator from a minimum and maximum point.

  void `tiltAlongAxis`()

    Tilts the box along the base axis.

  void `setBoxColor`(const Color3f &color)

    Sets the color of the locator box.

  Color3f `boxColor`() const

    Returns the color of the locator box.

  void `setBoxOpacity`(float opacity)

    Sets the opacity of the locator box.

  float `boxOpacity`() const

    Returns the opacity of the locator box.

  void `setSphereColor`(const Color3f &color)

    Sets the color of the corner spheres.

  Color3f `sphereColor`() const

    Returns the color of the corner spheres.

  void `setSelectedColor`(const Color3f &color)

    Sets the color of the selected locator part.

    Applies to corner spheres and corner arrows.

  Color3f `selectedColor`()

    Returns the color of selected spheres/arrows.

  std::vector<Plane> `planes`() const

    Returns an array of the 6 planes defining the locator box.

    Size is always 6.

  Vec3d `centerPosition`() const

    Returns the center position of the box.

  void `boxNavigationOnMousePressEvent`(MouseEvent *mouseEvent, const Vec3d &rotationPoint)

    Processes box navigation start from mouse press event.

    Will apply navigation (pan/rotate/zoom) to locator box instead of model.

  void `boxNavigationOnMouseMoveEvent`(MouseEvent *mouseEvent)

    Processes box navigation update from mouse move event.

    Will apply navigation (pan/rotate/zoom) to locator box instead of model.

  void `boxNavigationOnMouseReleaseEvent`(MouseEvent *mouseEvent)

    Processes box navigation end from mouse release event.

    Will apply navigation (pan/rotate/zoom) to locator box instead of model.

  bool `onMousePressEvent`(MouseEvent *mouseEvent)

    Processes mouse press event.

    Handle interaction with box corners (directional vector arrows and sphere)

  bool `onMouseMoveEvent`(MouseEvent *mouseEvent)

    Processes mouse move event.

    Handle interaction with box corners (directional vector arrows and sphere)

  void `onMouseReleaseEvent`()

    Processes mouse release event.

    Handle interaction with box corners (directional vector arrows and sphere)

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

Your multilingual generative AI assistant for documentation. Ask me anything about HOOPS Envision for Desktop in your own language, or choose a sample question below to start a conversation:

What is HOOPS Envision for Desktop?
What are the latest release notes for HOOPS Envision for Desktop?
How do I start evaluating HOOPS Envision for Desktop?
How do I write my first sample application?
How can I get assistance?

HOOPSY may store conversations according to OpenAI's policy. Responses may not always be accurate.

HOOPSY is thinking...