ContRap-Libraries
Public Member Functions | Protected Attributes

crp::Point2D Class Reference

Class Point2D represents a point. More...

#include <primitives.h>

Inheritance diagram for crp::Point2D:
crp::Primitive2D

Public Member Functions

 Point2D (double x=0.0, double y=0.0)
 Creates a new point.
virtual ~Point2D ()
 Destructor.
 Point2D (const Point2D &primitive)
 Copy constructor.
Point2Doperator= (const Point2D &primitive)
 Assignment operator.
virtual Type get_type () const
 Type of the primitive.
virtual Primitive2Dget_copy ()
 Copies the current primitive.
void set_style (PointStyle style)
 Sets the style of the point.
PointStyle get_style () const
 Returns the style of the point.

Protected Attributes

PointStyle style
 Style of the point.

Detailed Description

Class Point2D represents a point.


Constructor & Destructor Documentation

crp::Point2D::Point2D ( double  x = 0.0,
double  y = 0.0 
) [inline]

Creates a new point.

The default point style is the cross style.

Parameters:
xX-Coordinate
yY-Coordinate
virtual crp::Point2D::~Point2D ( ) [inline, virtual]

Destructor.

crp::Point2D::Point2D ( const Point2D primitive) [inline]

Copy constructor.

Parameters:
primitivePrimitive to copy

Member Function Documentation

virtual Primitive2D* crp::Point2D::get_copy ( ) [inline, virtual]

Copies the current primitive.

Returns:
New copy of the current primitive

Implements crp::Primitive2D.

PointStyle crp::Point2D::get_style ( ) const [inline]

Returns the style of the point.

Returns:
Style of the point
virtual Type crp::Point2D::get_type ( ) const [inline, virtual]

Type of the primitive.

Returns:
Type of the primitive

Implements crp::Primitive2D.

Point2D& crp::Point2D::operator= ( const Point2D primitive) [inline]

Assignment operator.

Parameters:
primitiveObject to assign
void crp::Point2D::set_style ( PointStyle  style) [inline]

Sets the style of the point.

Parameters:
styleNew point style

Field Documentation

Style of the point.


The documentation for this class was generated from the following file: