cee::vis::BoxLocator Class Reference

A locator designed to position a box. More...

Public Member Functions

 BoxLocator (View *view)
 Creates a box locator for the given view. More...
 
void setup (const Vec3d &min, const Vec3d &max)
 Creates a box locator from a minimum and maximum point. More...
 
void tiltAlongAxis ()
 Tilts the box along the base axis. More...
 
void setBoxColor (const Color3f &color)
 Sets the color of the locator box. More...
 
Color3f boxColor () const
 Returns the color of the locator box. More...
 
void setBoxOpacity (float opacity)
 Sets the opacity of the locator box. More...
 
float boxOpacity () const
 Returns the opacity of the locator box. More...
 
void setSphereColor (const Color3f &color)
 Sets the color of the corner spheres. More...
 
Color3f sphereColor () const
 Returns the color of the corner spheres. More...
 
void setSelectedColor (const Color3f &color)
 Sets the color of the selected locator part. More...
 
Color3f selectedColor ()
 Returns the color of selected spheres/arrows. More...
 
std::vector< Planeplanes () const
 Returns an array of the 6 planes defining the locator box. More...
 
Vec3d centerPosition () const
 Returns the center position of the box. More...
 
void boxNavigationOnMousePressEvent (MouseEvent *mouseEvent, const Vec3d &rotationPoint)
 Processes box navigation start from mouse press event. More...
 
void boxNavigationOnMouseMoveEvent (MouseEvent *mouseEvent)
 Processes box navigation update from mouse move event. More...
 
void boxNavigationOnMouseReleaseEvent (MouseEvent *mouseEvent)
 Processes box navigation end from mouse release event. More...
 
bool onMousePressEvent (MouseEvent *mouseEvent)
 Processes mouse press event. More...
 
bool onMouseMoveEvent (MouseEvent *mouseEvent)
 Processes mouse move event. More...
 
void onMouseReleaseEvent ()
 Processes mouse release event. More...
 
- Public Member Functions inherited from cee::vis::MarkupModel
 MarkupModel ()
 Creates empty markup model. More...
 
size_t partCount () const
 Returns the number of parts in the model. More...
 
size_t partIndex (MarkupPart *part) const
 Returns the index of the specified part. More...
 
MarkupPartpart (size_t index)
 Returns the part at the given index. More...
 
const MarkupPartpart (size_t index) const
 Returns a const pointer to the part at the given index. More...
 
void addPart (MarkupPart *part)
 Adds the part to the model. More...
 
void removePart (MarkupPart *part)
 Removes the specified part from the model. More...
 
void removeAllParts ()
 Removes all parts from the model. More...
 
virtual BoundingBox boundingBox ()
 Returns the current bounding box of the model. More...
 
virtual Str modelInfo () const
 Returns information about the model. More...
 
size_t rayIntersect (const Ray &ray, const View &view)
 Returns the index of the part hit by the ray. More...
 
bool rayIntersect (const Ray &ray, const View &view, MarkupModelHitItem *hitItem)
 Performs a ray intersect on the parts in the model. More...
 
bool rayIntersectAllHits (const Ray &ray, const View &view, MarkupModelHitItemCollection *hitItems)
 Performs a ray intersect on the parts in the model, returning all parts that was intersected by the ray. More...
 
bool isViewClippingIgnored () const
 Returns true if this model is configured to ignore view clipping. More...
 
void setIgnoreViewClipping (bool ignore)
 Set if view clipping should be ignored for all parts in this model. More...
 
- Public Member Functions inherited from cee::vis::Model
 Model ()
 Constructs an empty model. More...
 
Str name () const
 Returns the name of the model. More...
 
void setName (const Str &name)
 Sets the name of the model. More...
 
bool use2dPixelProjection () const
 Returns true if the model is using a 2D pixel exact projection to render its content. More...
 
void setUse2dPixelProjection (bool use2dMode)
 Specify if this model should use an override camera to render 2D sceen aligned data. More...
 
- Public Member Functions inherited from cee::RefCountedObject
void addRef () const
 Increments the reference count for this object. More...
 
void release () const
 Decrements the reference count for this object. More...
 
int refCount () const
 Returns the reference count for this object. More...
 
void setRefCountZero () const
 Sets the ref count to zero, but DOES NOT delete the object. More...
 

Additional Inherited Members

- Protected Types inherited from cee::vis::Model
enum  NotifyAction { NO_ACTION, MODEL_CHANGED }
 Notification sent to the view. More...
 
- Protected Member Functions inherited from cee::vis::Model
void notifyObservingViews (NotifyAction notifyAction, const View *exceptView)
 Sends a notification to all observing views. More...
 
bool hasAnyObservingViewsWithClipping (bool *outExplicitViewClippingIsActive=NULL, bool *outDropShadowClippingIsActive=NULL) const
 Returns true if the model is a being viewed in any views where clipping is enabled (either view clipping or shadow clipping) More...
 
Inheritance diagram for cee::vis::BoxLocator:
cee::vis::MarkupModel cee::vis::Model cee::RefCountedObject

Detailed Description

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.

Constructor & Destructor Documentation

cee::vis::BoxLocator::BoxLocator ( View view)

Creates a box locator for the given view.

Member Function Documentation

cee::Color3f cee::vis::BoxLocator::boxColor ( ) const

Returns the color of the locator box.

void cee::vis::BoxLocator::boxNavigationOnMouseMoveEvent ( MouseEvent mouseEvent)

Processes box navigation update from mouse move event.

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

void cee::vis::BoxLocator::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 cee::vis::BoxLocator::boxNavigationOnMouseReleaseEvent ( MouseEvent mouseEvent)

Processes box navigation end from mouse release event.

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

float cee::vis::BoxLocator::boxOpacity ( ) const

Returns the opacity of the locator box.

cee::Vec3d cee::vis::BoxLocator::centerPosition ( ) const

Returns the center position of the box.

bool cee::vis::BoxLocator::onMouseMoveEvent ( MouseEvent mouseEvent)

Processes mouse move event.

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

bool cee::vis::BoxLocator::onMousePressEvent ( MouseEvent mouseEvent)

Processes mouse press event.

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

void cee::vis::BoxLocator::onMouseReleaseEvent ( )

Processes mouse release event.

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

std::vector< cee::Plane > cee::vis::BoxLocator::planes ( ) const

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

Size is always 6.

Color3f cee::vis::BoxLocator::selectedColor ( )

Returns the color of selected spheres/arrows.

void cee::vis::BoxLocator::setBoxColor ( const Color3f color)

Sets the color of the locator box.

void cee::vis::BoxLocator::setBoxOpacity ( float  opacity)

Sets the opacity of the locator box.

void cee::vis::BoxLocator::setSelectedColor ( const Color3f color)

Sets the color of the selected locator part.

Applies to corner spheres and corner arrows.

void cee::vis::BoxLocator::setSphereColor ( const Color3f color)

Sets the color of the corner spheres.

void cee::vis::BoxLocator::setup ( const Vec3d min,
const Vec3d max 
)

Creates a box locator from a minimum and maximum point.

cee::Color3f cee::vis::BoxLocator::sphereColor ( ) const

Returns the color of the corner spheres.

void cee::vis::BoxLocator::tiltAlongAxis ( )

Tilts the box along the base axis.