cee::vis::MarkupPartPoints Class Reference

A MarkupModel part for drawing points. More...

Public Member Functions

 MarkupPartPoints ()
 Constructs an empty part. More...
 
 MarkupPartPoints (const Color3f &color, float pointSize, bool alwaysVisible, float eyeLiftFactor)
 Constructs a part with the given settings. More...
 
virtual PartType type () const
 Returns the type of the part. Always MarkupPart::POINTS. 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 current point color. More...
 
void setColor (const Color3f &color)
 Sets the point color. More...
 
float pointSize () const
 Returns the current point size. More...
 
void setPointSize (float pointSize)
 Sets the current point size. More...
 
bool alwaysVisible () const
 Returns true if the points are always visible and does not use the z buffer. More...
 
void setAlwaysVisible (bool showAlways)
 Sets if the points should be always visible and not use the z buffer. More...
 
float eyeLiftFactor () const
 Returns the eye lift factor of the lines. More...
 
void setEyeLiftFactor (float factor)
 Sets the eye lift factor for the lines. More...
 
void add (const Vec3d &vertex)
 Adds a point to the part. More...
 
void add (const std::vector< Vec3d > &vertices)
 Adds a number of points to the part. More...
 
size_t count () const
 Returns the number of points in the part. More...
 
void removeAll ()
 Removes all points from the part. More...
 
const std::vector< Vec3d > & vertices () const
 Returns the vector of the point vertices in the part. 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...
 

Static Public Member Functions

static PtrRef< MarkupPartPointscreate (const std::vector< Vec3d > &vertices, const Color3f &color, float pointSize=1.0f, bool alwaysVisible=false, float eyeLiftFactor=0.0f)
 Returns a newly created part with the given points and settings. More...
 
static PtrRef< MarkupPartPointscreate (const Vec3d &vertex, const Color3f &color, float pointSize=1.0f, bool alwaysVisible=false, float eyeLiftFactor=0.0f)
 Returns a newly created part with the given point and settings. 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::MarkupPartPoints:
cee::vis::MarkupPart cee::RefCountedObject

Detailed Description

A MarkupModel part for drawing points.

The part can contain any number of points, but all points will share the same settings for

  • color
  • point size (in pixels)
  • always visible. True if the points should always be visible and not use the z buffer.
  • eye lift factor. A factor to move the points towards the camera. This is used to control item drawn in the same plane.
See also
MarkupModel

Constructor & Destructor Documentation

cee::vis::MarkupPartPoints::MarkupPartPoints ( )

Constructs an empty part.

cee::vis::MarkupPartPoints::MarkupPartPoints ( const Color3f color,
float  pointSize,
bool  alwaysVisible,
float  eyeLiftFactor 
)

Constructs a part with the given settings.

  • color: The point color for all point in the part
  • pointSize: The point size in pixels for all points in the part
  • alwaysVisible: If true, the points will always be visible and not use the z buffer
  • eyeLiftFactor: A factor to move the points towards the camera. This is used to control item drawn in the same plane.

Member Function Documentation

void cee::vis::MarkupPartPoints::add ( const Vec3d vertex)

Adds a point to the part.

void cee::vis::MarkupPartPoints::add ( const std::vector< Vec3d > &  vertices)

Adds a number of points to the part.

bool cee::vis::MarkupPartPoints::alwaysVisible ( ) const

Returns true if the points are always visible and does not use the z buffer.

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

Returns the current bounding box of the part.

Implements cee::vis::MarkupPart.

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

Returns the current point color.

size_t cee::vis::MarkupPartPoints::count ( ) const

Returns the number of points in the part.

PtrRef< MarkupPartPoints > cee::vis::MarkupPartPoints::create ( const std::vector< Vec3d > &  vertices,
const Color3f color,
float  pointSize = 1.0f,
bool  alwaysVisible = false,
float  eyeLiftFactor = 0.0f 
)
static

Returns a newly created part with the given points and settings.

The returned part will have vertices.size() points.

  • color: The line color for all lines in the part
  • pointSize: The point size in pixels for all lines in the part
  • alwaysVisible: If true, the lines will always be visible and not use the z buffer.
  • eyeLiftFactor: A factor to move the lines towards the camera. This is used to control item drawn in the same plane.
PtrRef< MarkupPartPoints > cee::vis::MarkupPartPoints::create ( const Vec3d vertex,
const Color3f color,
float  pointSize = 1.0f,
bool  alwaysVisible = false,
float  eyeLiftFactor = 0.0f 
)
static

Returns a newly created part with the given point and settings.

The returned part will have one point.

  • color: The line color for all lines in the part
  • pointSize: The point size in pixels for all lines in the part
  • alwaysVisible: If true, the lines will always be visible and not use the z buffer.
  • eyeLiftFactor: A factor to move the lines towards the camera. This is used to control item drawn in the same plane.
float cee::vis::MarkupPartPoints::eyeLiftFactor ( ) const

Returns the eye lift factor of the lines.

See also
setEyeLiftFactor
float cee::vis::MarkupPartPoints::pointSize ( ) const

Returns the current point size.

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

Returns the render priority of the part.

Implements cee::vis::MarkupPart.

void cee::vis::MarkupPartPoints::removeAll ( )

Removes all points from the part.

void cee::vis::MarkupPartPoints::setAlwaysVisible ( bool  showAlways)

Sets if the points should be always visible and not use the z buffer.

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

Sets the point color.

void cee::vis::MarkupPartPoints::setEyeLiftFactor ( float  factor)

Sets the eye lift factor for the lines.

The eye lift factor specifies if the points should be moved towards the camera (or away from the camera if the factor is negative).

This is useful for controlling the ordering of items that are defined in the same plane.

void cee::vis::MarkupPartPoints::setPointSize ( float  pointSize)

Sets the current point size.

void cee::vis::MarkupPartPoints::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 12.

Implements cee::vis::MarkupPart.

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

Sets the transformation matrix to use for the part.

Implements cee::vis::MarkupPart.

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

Returns the current transformation matrix for the part.

Implements cee::vis::MarkupPart.

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

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

Implements cee::vis::MarkupPart.

const std::vector< Vec3d > & cee::vis::MarkupPartPoints::vertices ( ) const

Returns the vector of the point vertices in the part.