Class Triangle2D represents a triangle.
More...
#include <primitives.h>
Detailed Description
Class Triangle2D represents a triangle.
Constructor & Destructor Documentation
crp::Triangle2D::Triangle2D |
( |
const SPtr< Point2D > & |
a, |
|
|
const SPtr< Point2D > & |
b, |
|
|
const SPtr< Point2D > & |
c |
|
) |
| [inline] |
Creates a new triangle.
- Parameters:
-
a | Coordinates of the first point |
b | Coordinates of the second point |
c | Coordinates of the third point |
virtual crp::Triangle2D::~Triangle2D |
( |
| ) |
[inline, virtual] |
crp::Triangle2D::Triangle2D |
( |
const Triangle2D & |
primitive | ) |
[inline] |
Copy constructor.
- Parameters:
-
primitive | Primitive to copy |
Member Function Documentation
virtual Primitive2D* crp::Triangle2D::get_copy |
( |
| ) |
[inline, virtual] |
Copies the current primitive.
- Returns:
- New copy of the current primitive
Implements crp::Primitive2D.
const SPtr<Point2D>& crp::Triangle2D::get_corner_a |
( |
| ) |
[inline] |
Returns the three corner points of the triangle.
- Returns:
- First point of the triangle
const SPtr<Point2D>& crp::Triangle2D::get_corner_b |
( |
| ) |
[inline] |
Returns the three corner points of the triangle.
- Returns:
- Second point of the triangle
const SPtr<Point2D>& crp::Triangle2D::get_corner_c |
( |
| ) |
[inline] |
Returns the three corner points of the triangle.
- Returns:
- Third point of the triangle
virtual Type crp::Triangle2D::get_type |
( |
| ) |
const [inline, virtual] |
Type of the primitive.
- Returns:
- Type of the primitive
Implements crp::Primitive2D.
Assignment operator.
- Parameters:
-
Field Documentation
Directions of the other points of the triangle.
The documentation for this class was generated from the following file: