Lumiera  0.pre.03
»edit your freedom«
relativelocation.hpp
Go to the documentation of this file.
1 /*
2  RELATIVELOCATION.hpp - Placement implementation attaching MObjects relative to another one
3 
4  Copyright (C) Lumiera.org
5  2008, Hermann Vosseler <Ichthyostega@web.de>
6 
7  This program is free software; you can redistribute it and/or
8  modify it under the terms of the GNU General Public License as
9  published by the Free Software Foundation; either version 2 of
10  the License, or (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 
21 */
22 
23 
30 #ifndef MOBJECT_SESSION_RELATIVELOCATION_H
31 #define MOBJECT_SESSION_RELATIVELOCATION_H
32 
35 
36 
37 
38 
39 namespace steam {
40 namespace mobject {
41 namespace session {
42 
43  using lib::time::Offset;
44 
45 
52  {
53 // const PMO & anchor_; ////////////TODO: ooooops, this is a nasty design problem!!!
54 
55  const PlaRef anchor_;
56 
57  public:
58 
62  enum RelType
64  , ATTACH
65  };
66 
67  protected:
68  RelativeLocation (PlaRef const& a, Offset const& ofs) : anchor_(a), offset_(ofs) { }
69  friend class LocatingPin;
70 
73 
76  //TODO: suitable representation?
77 
78 
79  virtual void intersect (LocatingSolution&) const;
80 
81 
82  public:
83  virtual RelativeLocation* clone () const;
84 
85  };
86 
87 
88 
89 }}} // namespace steam::mobject::session
90 #endif
RelType
the possible kinds of RelativePlacements
Offset offset_
Offset the actual position by this (time) value relative to the anchor point.
Positioning specification, possibly chained to further specifications.
Definition: locatingpin.hpp:97
Steam-Layer implementation namespace root.
Implementing the Placement mechanics.
place subject at the same time as the anchor
Namespace of Session and user visible high-level objects.
Definition: sequence.hpp:74
A generic reference mechanism for Placements, as added to the current session.
Offset measures a distance in time.
Definition: timevalue.hpp:367
RelType relType
the kind of relation denoted by this Placement