1. Data structures

1.1. Basic

template<typename T = double>
class point

Define a point for the 2D plan, it has two dimensions.

template<typename TPrecision = double, typename TPoint = point<TPrecision>>
class bimpp::plan2d::constant

Define some classes and declare some constant values

Public Types

typedef TPoint point_type

Define the point type.

Public Static Functions

static inline bool isValid(id_type _id)

Is id valid?

Public Static Attributes

static const point_type zero_point

Origin point.

static const point_type unit_point

Unit point.

static const id_type none_id

Invalid id.

1.2. Node

template<typename TConstant = constant<>>
class bimpp::plan2d::node

A point or a joint in the plan.

A node represents a point or a joint with two walls in the 2D plan

Public Functions

inline node(precision_type _x = 0, precision_type _y = 0)

A constructor by a 2D coordinate

Parameters
  • _x: The value in x-axis, default is 0.

  • _y: The value in y-axis, default is 0.

inline node(const point_type &_point = TConstant::zero_point)

A constructor by a 2D point

Parameters
  • _point: A 2D point, default is origin point.

1.3. Wall

template<typename TConstant = constant<>>
class bimpp::plan2d::wall

A wall represents a wall in the 2D plan

Public Members

std::string kind

The kind of wall.

id_type start_node_id

The start of wall.

id_type end_node_id

The end of wall.

precision_type thickness

The thickness of wall.

1.4. Hole

template<typename TConstant = constant<>>
class hole

A hole represents a hole in the 2D plan, it might be a window or a door or a hole in a wall.

1.5. Room

template<typename TConstant = constant<>>
class room