cee::vis::MarkupPartFixedSizeArrow Class Reference

A MarkupModel part for drawing an arrow with a constant size independent of the camera settings. More...

Public Member Functions

 MarkupPartFixedSizeArrow ()
 Constructs an empty part. More...
 
 MarkupPartFixedSizeArrow (const Vec3d &position, const Vec3d &direction, double lengthInPixels, const Color3f &color)
 Constructs a part with the given settings. More...
 
virtual PartType type () const
 Returns the type of the part. Always MarkupPart::FIXED_SIZE_ARROW. More...
 
virtual BoundingBox boundingBox () const
 Returns the current bounding box of the part. More...
 
virtual void setPriority (int priority)
 Sets render priority of the part. More...
 
virtual int priority () const
 Returns the render priority of the part. More...
 
virtual const Mat4dtransformation () const
 Returns the current transformation matrix for the part. More...
 
virtual void setTransformation (const Mat4d &matrix)
 Sets the transformation matrix to use for the part. More...
 
const Color3fcolor () const
 Returns the color of the arrow in the part. More...
 
void setColor (const Color3f &color)
 Sets the color to use to draw the arrows in the part. More...
 
Vec3d position () const
 Returns the start position of the arrow. More...
 
void setPosition (const Vec3d &pos)
 Sets the start position of the arrow. More...
 
Vec3d direction () const
 Returns the direction of the arrow. More...
 
void setDirection (const Vec3d &dir)
 Sets the direction of the arrow. More...
 
double lengthInPixels () const
 Returns the fixed length in pixels of the arrow. More...
 
void setLengthInPixels (double length)
 Sets the length in pixels of the arrow. More...
 
unsigned int numberOfSubDivisions () const
 Returns the resolution of the arrow. More...
 
void setNumberOfSubDivisions (unsigned int numSubDivisions)
 Sets the resolution of the arrow. More...
 
- Public Member Functions inherited from cee::vis::MarkupPart
bool visible () const
 Returns true if the part is visible. More...
 
void setVisible (bool visible)
 Sets if the part should be visible or not. 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

- Public Types inherited from cee::vis::MarkupPart
enum  PartType {
  LABELS, TEXTS_3D, TRIANGLES, INSTANCED_GEOMETRY,
  LINES, POINTS, ARROWS, FIXED_SIZE_ARROW,
  FIXED_SIZE_SPHERE, FIXED_SIZE_IMAGE_GLYPH
}
 Enum specifying the type of MarkupPart. More...
 
Inheritance diagram for cee::vis::MarkupPartFixedSizeArrow:
cee::vis::MarkupPart cee::RefCountedObject

Detailed Description

A MarkupModel part for drawing an arrow with a constant size independent of the camera settings.

The arrow will have the given size (in pixels) independent on camera position and settings.

The following settings can be specified:

  • position: The start position of the arrow
  • direction: The direction of the arrow
  • color: The color for the arrow in the part
  • lengthInPixels: The length of the arrow in pixels
  • numSubDivisions: The resolution of the arrow. A higher number will give a more smooth arrow, but will result in more triangles per arrow and thus (somewhat) decreased performance.
See also
MarkupModel

Constructor & Destructor Documentation

cee::vis::MarkupPartFixedSizeArrow::MarkupPartFixedSizeArrow ( )

Constructs an empty part.

cee::vis::MarkupPartFixedSizeArrow::MarkupPartFixedSizeArrow ( const Vec3d position,
const Vec3d direction,
double  lengthInPixels,
const Color3f color 
)

Constructs a part with the given settings.

  • position: The start position of the arrow
  • direction: The direction of the arrow
  • lengthInPixels: The length of the arrow in pixels
  • color: The color for the arrow in the part

Member Function Documentation

cee::BoundingBox cee::vis::MarkupPartFixedSizeArrow::boundingBox ( ) const
virtual

Returns the current bounding box of the part.

Implements cee::vis::MarkupPart.

const Color3f & cee::vis::MarkupPartFixedSizeArrow::color ( ) const

Returns the color of the arrow in the part.

cee::Vec3d cee::vis::MarkupPartFixedSizeArrow::direction ( ) const

Returns the direction of the arrow.

double cee::vis::MarkupPartFixedSizeArrow::lengthInPixels ( ) const

Returns the fixed length in pixels of the arrow.

unsigned int cee::vis::MarkupPartFixedSizeArrow::numberOfSubDivisions ( ) const

Returns the resolution of the arrow.

See also
setNumberOfSubDivisions
cee::Vec3d cee::vis::MarkupPartFixedSizeArrow::position ( ) const

Returns the start position of the arrow.

int cee::vis::MarkupPartFixedSizeArrow::priority ( ) const
virtual

Returns the render priority of the part.

Implements cee::vis::MarkupPart.

void cee::vis::MarkupPartFixedSizeArrow::setColor ( const Color3f color)

Sets the color to use to draw the arrows in the part.

void cee::vis::MarkupPartFixedSizeArrow::setDirection ( const Vec3d dir)

Sets the direction of the arrow.

void cee::vis::MarkupPartFixedSizeArrow::setLengthInPixels ( double  length)

Sets the length in pixels of the arrow.

void cee::vis::MarkupPartFixedSizeArrow::setNumberOfSubDivisions ( unsigned int  numSubDivisions)

Sets the resolution of the arrow.

numSubDivisions specifies the number of lines in the tessellated arrow. A higher number will give a more smooth arrow, but will result in more triangles per arrow and thus (somewhat) decreased performance.

void cee::vis::MarkupPartFixedSizeArrow::setPosition ( const Vec3d pos)

Sets the start position of the arrow.

void cee::vis::MarkupPartFixedSizeArrow::setPriority ( int  priority)
virtual

Sets render priority of the part.

The render priority determines the order in which parts get rendered. Parts with lower priorities get rendered first. The default priority is 10.

Implements cee::vis::MarkupPart.

void cee::vis::MarkupPartFixedSizeArrow::setTransformation ( const Mat4d matrix)
virtual

Sets the transformation matrix to use for the part.

Implements cee::vis::MarkupPart.

const Mat4d & cee::vis::MarkupPartFixedSizeArrow::transformation ( ) const
virtual

Returns the current transformation matrix for the part.

Implements cee::vis::MarkupPart.

MarkupPart::PartType cee::vis::MarkupPartFixedSizeArrow::type ( ) const
virtual

Returns the type of the part. Always MarkupPart::FIXED_SIZE_ARROW.

Implements cee::vis::MarkupPart.