61 m_location(relative_location),
62 m_layer(relative_layer),
63 m_point(relative_point),
128 if (
this != &source) {
177 FL_WARN(
_log,
LMsg(
"RendererNode::setRelative(Location) - ") <<
"No instance attached.");
183 FL_WARN(
_log,
LMsg(
"RendererNode::setRelative(Location, Point) - ") <<
"No instance attached.");
190 FL_WARN(
_log,
LMsg(
"RendererNode::setRelative(Point) - ") <<
"No instance or location attached.");
197 FL_WARN(
_log,
LMsg(
"RendererNode::getAttachedInstance() - ") <<
"No instance attached.");
203 FL_WARN(
_log,
LMsg(
"RendererNode::getAttachedLocation() - ") <<
"No location attached.");
209 FL_WARN(
_log,
LMsg(
"RendererNode::getAttachedLayer() - ") <<
"No layer attached.");
215 FL_WARN(
_log,
LMsg(
"RendererNode::getAttachedPoint() - ") <<
"No point attached.");
222 FL_WARN(
_log,
LMsg(
"RendererNode::getOffsetLocation() - ") <<
"No location as offset used.");
228 FL_WARN(
_log,
LMsg(
"RendererNode::getOffsetPoint() - ") <<
"No point as offset used.");
308 FL_WARN(
_log,
LMsg(
"RendererNode::getCalculatedPoint(Camera, Layer) - ") <<
"No layer attached. So we use the first active layer of the renderer.");
#define FL_WARN(logger, msg)
InstanceDeleteListener * m_listener
Layer * getLayer() const
Gets the layer where this location is pointing to.
Location getAttachedLocation()
void removeInstance(Instance *instance, bool listener=true)
Helper class to create log strings out from separate parts Usage: LMsg("some text") << variable << "...
void addDeleteListener(InstanceDeleteListener *listener)
Adds new instance delete listener.
RendererNode(Instance *attached_instance, const Location &relative_location, Layer *relative_layer, const Point &relative_point=Point(0, 0))
Point getCalculatedPoint(Camera *cam, Layer *layer, const bool zoomed=false)
void setRelative(const Location &relative_location)
void addInstance(Instance *instance)
static Logger _log(LM_AUDIO)
Camera describes properties of a view port shown in the main screen Main screen can have multiple cam...
const Point & getPointRef()
Location & getLocationRef()
Gets reference of current location of instance.
void removeDeleteListener(InstanceDeleteListener *listener)
Removes associated instance delete listener.
PointType2D< int32_t > Point
NodeInstanceDeleteListener(RendererNode *node)
Location getOffsetLocation()
void changeInstance(Instance *instance)
const Location & getLocationRef()
Layer * getAttachedLayer()
double getZoom() const
Gets camera zoom.
ScreenPoint toScreenCoordinates(const ExactModelCoordinate &map_coords)
Transforms given point from map coordinates to screen coordinates.
void checkDeleteListener()
ExactModelCoordinate getMapCoordinates() const
Gets map coordinates set to this location.
Instance * getAttachedInstance()
void setAttached(Instance *attached_instance, const Location &relative_location, const Point &relative_point)
RendererNode & operator=(const RendererNode &source)
An Instance is an "instantiation" of an Object at a Location.
virtual void onInstanceDeleted(Instance *instance)
virtual ~NodeInstanceDeleteListener()