Fawkes API
Fawkes Development Version
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
transformable.h
1
2
/***************************************************************************
3
* transformable.h - Transformable interface
4
*
5
* Created: Thu Oct 02 16:53:27 2008
6
* Copyright 2008 Daniel Beck
7
*
8
****************************************************************************/
9
10
/* This program is free software; you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation; either version 2 of the License, or
13
* (at your option) any later version. A runtime exception applies to
14
* this software (see LICENSE.GPL_WRE file mentioned below for details).
15
*
16
* This program is distributed in the hope that it will be useful,
17
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
* GNU Library General Public License for more details.
20
*
21
* Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22
*/
23
24
#ifndef __GEOMETRY_TRANSFORMABLE_H_
25
#define __GEOMETRY_TRANSFORMABLE_H_
26
27
#include <geometry/hom_transform.h>
28
#include <geometry/hom_coord.h>
29
30
#include <vector>
31
32
namespace
fawkes {
33
34
class
Transformable
35
{
36
friend
class
HomTransform
;
37
38
public
:
39
Transformable
();
40
virtual
~Transformable
();
41
42
protected
:
43
void
transform
(
const
HomTransform
& t);
44
void
add_primitive
(
HomCoord
* c);
45
void
clear_primitives
();
46
47
virtual
void
register_primitives
() =0;
48
virtual
void
post_transform
() =0;
49
50
private
:
51
std::vector<HomCoord*> m_primitives;
52
};
53
54
}
55
56
#endif
/* __GEOMETRY_TRANSFORMABLE_H_ */
fawkes::Transformable::transform
void transform(const HomTransform &t)
Apply the transform to all registered primitives and call the post_transform() method.
Definition:
transformable.cpp:79
fawkes::Transformable::Transformable
Transformable()
Constructor.
Definition:
transformable.cpp:48
fawkes::Transformable::clear_primitives
void clear_primitives()
Clear the list of primitives.
Definition:
transformable.cpp:69
fawkes::Transformable::~Transformable
virtual ~Transformable()
Destructor.
Definition:
transformable.cpp:54
fawkes::HomTransform
This class describes a homogeneous transformation.
Definition:
hom_transform.h:31
fawkes::HomCoord
Base class for homogeneous primitives (vector and point).
Definition:
hom_coord.h:34
fawkes::Transformable
Interface class for all transformable objects.
Definition:
transformable.h:34
fawkes::Transformable::register_primitives
virtual void register_primitives()=0
Here, a derived class should register its primitives (HomPoints and HomVectors) by calling add_primit...
fawkes::Transformable::add_primitive
void add_primitive(HomCoord *c)
Add a primitive to the list of primitives that is transformed.
Definition:
transformable.cpp:62
fawkes::Transformable::post_transform
virtual void post_transform()=0
This method is called after the primitives are transformed.
src
libs
geometry
transformable.h
Generated by
1.8.5