Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
LocatingPin Class Reference

#include "steam/mobject/session/locatingpin.hpp"

Description

Positioning specification, possibly chained to further specifications.

The base class LocatingPin is a "no-op" specification which doesn't constrain the possible locations and thus can be embedded into pristine Placement by default. The Functor operators provide a way to add concrete positioning specifications, thereby defining the position of the MObject to be placed.

Note
to the implementer of subclasses: LocatingPins are copyable and need to handle cloning (incl the chain)

Definition at line 88 of file locatingpin.hpp.

Classes

struct  LocatingSolution
 

Public Member Functions

const SolutionData resolve () const
 implementing the core Placement functionality.
 
bool isOverdetermined () const
 
FixedLocationoperator() (Time start, Fork track=0)
 
RelativeLocationoperator() (PlacementRef< MObject > &refObj, Offset const &offset=Offset(Time::ZERO))
 
 LocatingPin (const LocatingPin &)
 it's OK to copy a LocainngPin, causing duplication of any chained lPins
 
LocatingPinoperator= (const LocatingPin &)
 
virtual LocatingPinclone () const
 
virtual ~LocatingPin ()
 
 LocatingPin ()
 

Friends

bool operator== (LocatingPin const &, LocatingPin const &)
 check for equivalent definition of a complete locating chain
 

Protected Types

typedef lib::time::Time Time
 
typedef lib::time::TimeVar TimeVar
 
typedef lib::time::Offset Offset
 
typedef TimeFork
 
typedef std::shared_ptr< asset::PipePipe
 
typedef std::pair< Time, PipeSolutionData
 

Protected Member Functions

virtual int getPrioLevel () const
 order to consider when resolving.
 
LocatingPinaddChain (LocatingPin *)
 
void resolve (LocatingSolution &) const
 
virtual void intersect (LocatingSolution &) const
 

Protected Attributes

std::unique_ptr< LocatingPinnext_
 next additional Pin, if any
 

Constructor & Destructor Documentation

◆ LocatingPin() [1/2]

LocatingPin ( const LocatingPin other)

it's OK to copy a LocainngPin, causing duplication of any chained lPins

Definition at line 49 of file locatingpin.cpp.

◆ ~LocatingPin()

virtual ~LocatingPin ( )
inlinevirtual

Definition at line 122 of file locatingpin.hpp.

◆ LocatingPin() [2/2]

LocatingPin ( )
inline

Definition at line 125 of file locatingpin.hpp.

Referenced by LocatingPin::clone().

+ Here is the caller graph for this function:

Member Typedef Documentation

◆ Time

typedef lib::time::Time Time
protected

Definition at line 91 of file locatingpin.hpp.

◆ TimeVar

typedef lib::time::TimeVar TimeVar
protected

Definition at line 92 of file locatingpin.hpp.

◆ Offset

typedef lib::time::Offset Offset
protected

Definition at line 93 of file locatingpin.hpp.

◆ Fork

typedef Time* Fork
protected

Definition at line 94 of file locatingpin.hpp.

◆ Pipe

typedef std::shared_ptr<asset::Pipe> Pipe
protected

Definition at line 95 of file locatingpin.hpp.

◆ SolutionData

typedef std::pair<Time,Pipe> SolutionData
protected

Definition at line 96 of file locatingpin.hpp.

Member Function Documentation

◆ getPrioLevel()

virtual int getPrioLevel ( ) const
inlineprotectedvirtual

order to consider when resolving.

0=highest

Definition at line 103 of file locatingpin.hpp.

Referenced by LocatingPin::addChain().

+ Here is the caller graph for this function:

◆ addChain()

LocatingPin & addChain ( LocatingPin newLp)
protected
Parameters
newLp
Note
we take ownership of newLp

Definition at line 72 of file locatingpin.cpp.

References LocatingPin::getPrioLevel(), and LocatingPin::next_.

Referenced by LocatingPin::operator()().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resolve() [1/2]

void resolve ( LocatingSolution solution) const
protected

Definition at line 118 of file locatingpin.cpp.

References LocatingPin::intersect(), LocatingPin::next_, and LocatingPin::LocatingSolution::still_to_solve().

+ Here is the call graph for this function:

◆ intersect()

void intersect ( LocatingSolution solution) const
protectedvirtual

Reimplemented in Allocation, FixedLocation, and RelativeLocation.

Definition at line 129 of file locatingpin.cpp.

References LocatingPin::LocatingSolution::still_to_solve().

Referenced by Allocation::intersect(), FixedLocation::intersect(), RelativeLocation::intersect(), and LocatingPin::resolve().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resolve() [2/2]

const LocatingPin::SolutionData resolve ( ) const

implementing the core Placement functionality.

By combining all the chained locating pins, try to get at a definite position (for this chain and consequently for the MObject handled by the enclosing Placement object).

Todo:

this could/should be replaced by a full-blown constraint solver at some point in the future

we are packing and unpacking the information (time,track) several times. Ichthyo considers a more elegant solution.

Definition at line 100 of file locatingpin.cpp.

References LocatingPin::LocatingSolution::getPipe(), LocatingPin::LocatingSolution::getTime(), and LocatingPin::resolve().

Referenced by LocatingPin::isOverdetermined(), and LocatingPin::resolve().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isOverdetermined()

bool isOverdetermined ( ) const

Definition at line 108 of file locatingpin.cpp.

References LocatingPin::LocatingSolution::is_impossible(), and LocatingPin::resolve().

+ Here is the call graph for this function:

◆ operator()() [1/2]

FixedLocation & operator() ( Time  start,
Fork  track = 0 
)

Definition at line 186 of file locatingpin.cpp.

References LocatingPin::addChain().

+ Here is the call graph for this function:

◆ operator()() [2/2]

RelativeLocation & operator() ( PlacementRef< MObject > &  refObj,
Offset const &  offset = Offset(Time::ZERO) 
)

◆ operator=()

LocatingPin & operator= ( const LocatingPin other)

Definition at line 55 of file locatingpin.cpp.

References steam::mobject::session::cloneChain(), and LocatingPin::next_.

+ Here is the call graph for this function:

◆ clone()

LocatingPin * clone ( ) const
virtual

Reimplemented in FixedLocation, RelativeLocation, and Allocation.

Definition at line 64 of file locatingpin.cpp.

References LocatingPin::LocatingPin().

Referenced by steam::mobject::session::cloneChain().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ next_

std::unique_ptr<LocatingPin> next_
protected

next additional Pin, if any

Definition at line 100 of file locatingpin.hpp.

Referenced by LocatingPin::addChain(), LocatingPin::operator=(), and LocatingPin::resolve().

Friends And Related Symbol Documentation

◆ operator==

bool operator== ( LocatingPin const &  pin1,
LocatingPin const &  pin2 
)
friend

check for equivalent definition of a complete locating chain

Definition at line 173 of file locatingpin.hpp.

+ Inheritance diagram for LocatingPin:
+ Collaboration diagram for LocatingPin:

The documentation for this class was generated from the following files: