Class Container2D represents a primitive container.
More...
#include <primitives.h>
Detailed Description
Class Container2D represents a primitive container.
Containers allow to group primitives into semantical objects.
Constructor & Destructor Documentation
crp::Container2D::Container2D |
( |
double |
x = 0.0 , |
|
|
double |
y = 0.0 |
|
) |
| [inline] |
Creates a new empty container.
- Parameters:
-
x | X-Coordinate |
y | Y-Coordinate |
virtual crp::Container2D::~Container2D |
( |
| ) |
[inline, virtual] |
Member Function Documentation
void crp::Container2D::add_primitive |
( |
const SPtr< Primitive2D > & |
primitive | ) |
[inline] |
Adds a primitive to the end of the primitives list.
- Parameters:
-
primitive | New primitive to add |
void crp::Container2D::clear |
( |
| ) |
[inline] |
virtual Primitive2D* crp::Container2D::get_copy |
( |
| ) |
[inline, virtual] |
Copies the current primitive.
- Returns:
- New copy of the current primitive
Implements crp::Primitive2D.
std::vector<SPtr<Primitive2D> >& crp::Container2D::get_primitives |
( |
| ) |
[inline] |
Returns the primitives.
- Returns:
- Vector of primitives
virtual Type crp::Container2D::get_type |
( |
| ) |
const [inline, virtual] |
Type of the primitive.
- Returns:
- Type of the primitive
Implements crp::Primitive2D.
Assignment operator.
- Parameters:
-
void crp::Container2D::set_color |
( |
const Color & |
color | ) |
[inline] |
Sets the color of the primitive.
- Parameters:
-
color | Color of the primitive |
Reimplemented from crp::Primitive2D.
void crp::Container2D::set_color |
( |
double |
r, |
|
|
double |
g, |
|
|
double |
b, |
|
|
double |
opacity = 1.0 |
|
) |
| [inline] |
Sets the color of the primitive.
- Parameters:
-
r | Red amount between 0.0 and 1.0 |
g | Green amount between 0.0 and 1.0 |
b | Blue amount between 0.0 and 1.0 |
opacity | Opacity value between 0.0 and 1.0 |
Reimplemented from crp::Primitive2D.
virtual void crp::Container2D::set_index |
( |
int |
index | ) |
[inline, virtual] |
Sets the index of the primitive.
- Parameters:
-
Reimplemented from crp::Primitive2D.
Field Documentation
The documentation for this class was generated from the following file: