codac 2.0.0
Loading...
Searching...
No Matches
codac2::Figure2DInterface Class Referenceabstract

Interface for 2D figures. More...

#include <codac2_Figure2DInterface.h>

Inheritance diagram for codac2::Figure2DInterface:

Public Member Functions

virtual void draw_point (const Vector &c, const StyleProperties &s=StyleProperties())=0
 Draws a point on the figure.
 
virtual void draw_box (const IntervalVector &x, const StyleProperties &s=StyleProperties())=0
 Draws a box on the figure.
 
virtual void draw_circle (const Vector &c, double r, const StyleProperties &s=StyleProperties())=0
 Draws a circle on the figure.
 
virtual void draw_ring (const Vector &c, const Interval &r, const StyleProperties &s=StyleProperties())=0
 Draws a ring on the figure.
 
virtual void draw_polyline (const std::vector< Vector > &x, float tip_length, const StyleProperties &s=StyleProperties())=0
 Draws a polyline on the figure.
 
virtual void draw_polygon (const std::vector< Vector > &x, const StyleProperties &s=StyleProperties())=0
 Draws a polygone on the figure.
 
virtual void draw_pie (const Vector &c, const Interval &r, const Interval &theta, const StyleProperties &s=StyleProperties())=0
 Draws a pie on the figure.
 
virtual void draw_ellipse (const Vector &c, const Vector &ab, double theta, const StyleProperties &s=StyleProperties())=0
 Draws an ellipse on the figure.
 
virtual void draw_tank (const Vector &x, float size, const StyleProperties &s=StyleProperties())=0
 Draws a tank on the figure.
 
virtual void draw_AUV (const Vector &x, float size, const StyleProperties &s=StyleProperties())=0
 Draws an AUV on the figure.
 
virtual void draw_motor_boat (const Vector &x, float size, const StyleProperties &s=StyleProperties())=0
 Draws a motor boat on the figure.
 

Detailed Description

Interface for 2D figures.

This class is used to display 2D figures. It defines the basic drawing functions.

This class is purely virtual and should not be used directly. It is used as an interface for the Figure2D class.

This interface contains the “low-level” methods that need to be overloaded to implement graphic primitives in the output view. The Figure2D class may contain methods not listed here: these methods are more “high-level” and do not require a specific implementation related to the graphic tool. For example, Figure2D::draw_line calls Figure2D::draw_polyline (a line is a special case of a two-point polyline), so only draw_polyline needs to be implemented in this interface.

Member Function Documentation

◆ draw_point()

virtual void codac2::Figure2DInterface::draw_point ( const Vector & c,
const StyleProperties & s = StyleProperties() )
pure virtual

Draws a point on the figure.

Parameters
cCoordinates of the point
sStyle of the point (edge color and fill color)

Implemented in codac2::Figure2D_IPE, and codac2::Figure2D_VIBes.

◆ draw_box()

virtual void codac2::Figure2DInterface::draw_box ( const IntervalVector & x,
const StyleProperties & s = StyleProperties() )
pure virtual

Draws a box on the figure.

Parameters
xBox to draw
sStyle of the box (edge color and fill color)

Implemented in codac2::Figure2D_IPE, and codac2::Figure2D_VIBes.

◆ draw_circle()

virtual void codac2::Figure2DInterface::draw_circle ( const Vector & c,
double r,
const StyleProperties & s = StyleProperties() )
pure virtual

Draws a circle on the figure.

Parameters
cCenter of the circle
rRadius of the circle
sStyle of the circle (edge color and fill color)

Implemented in codac2::Figure2D_IPE, and codac2::Figure2D_VIBes.

◆ draw_ring()

virtual void codac2::Figure2DInterface::draw_ring ( const Vector & c,
const Interval & r,
const StyleProperties & s = StyleProperties() )
pure virtual

Draws a ring on the figure.

Parameters
cCenter of the ring
rInner and outer radius of the ring
sStyle of the ring (edge color and fill color)

Implemented in codac2::Figure2D_IPE, and codac2::Figure2D_VIBes.

◆ draw_polyline()

virtual void codac2::Figure2DInterface::draw_polyline ( const std::vector< Vector > & x,
float tip_length,
const StyleProperties & s = StyleProperties() )
pure virtual

Draws a polyline on the figure.

Parameters
xVector of the points of the polyline
tip_lengthLength of the tip of the arrow
sStyle of the polyline (edge color and fill color)

Implemented in codac2::Figure2D_IPE, and codac2::Figure2D_VIBes.

◆ draw_polygon()

virtual void codac2::Figure2DInterface::draw_polygon ( const std::vector< Vector > & x,
const StyleProperties & s = StyleProperties() )
pure virtual

Draws a polygone on the figure.

Parameters
xVector of the points of the polygone
sStyle of the polygone (edge color and fill color)

Implemented in codac2::Figure2D_IPE, and codac2::Figure2D_VIBes.

◆ draw_pie()

virtual void codac2::Figure2DInterface::draw_pie ( const Vector & c,
const Interval & r,
const Interval & theta,
const StyleProperties & s = StyleProperties() )
pure virtual

Draws a pie on the figure.

Parameters
cCenter of the pie
rInner and outer radius of the pie
thetaStart and end angle of the pie (in radians)
sStyle of the pie (edge color and fill color)

Implemented in codac2::Figure2D_IPE, and codac2::Figure2D_VIBes.

◆ draw_ellipse()

virtual void codac2::Figure2DInterface::draw_ellipse ( const Vector & c,
const Vector & ab,
double theta,
const StyleProperties & s = StyleProperties() )
pure virtual

Draws an ellipse on the figure.

Parameters
cCenter of the ellipse
abHalf-lengths of the ellipse
thetaRotation angle of the ellipse (in radians)
sStyle of the ellipse (edge color and fill color)

Implemented in codac2::Figure2D_IPE, and codac2::Figure2D_VIBes.

◆ draw_tank()

virtual void codac2::Figure2DInterface::draw_tank ( const Vector & x,
float size,
const StyleProperties & s = StyleProperties() )
pure virtual

Draws a tank on the figure.

Parameters
xCoordinates of the tank
sizeSize of the tank
sStyle of the tank (edge color and fill color)

Implemented in codac2::Figure2D_IPE, and codac2::Figure2D_VIBes.

◆ draw_AUV()

virtual void codac2::Figure2DInterface::draw_AUV ( const Vector & x,
float size,
const StyleProperties & s = StyleProperties() )
pure virtual

Draws an AUV on the figure.

Parameters
xCoordinates of the AUV
sizeSize of the AUV
sStyle of the AUV (edge color and fill color)

Implemented in codac2::Figure2D_IPE, and codac2::Figure2D_VIBes.

◆ draw_motor_boat()

virtual void codac2::Figure2DInterface::draw_motor_boat ( const Vector & x,
float size,
const StyleProperties & s = StyleProperties() )
pure virtual

Draws a motor boat on the figure.

Parameters
xCoordinates of the motor boat
sizeSize of the motor boat
sStyle of the motor boat (edge color and fill color)

Implemented in codac2::Figure2D_IPE, and codac2::Figure2D_VIBes.


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