cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
SFML adding an object with respect to ot
SFML adding an object with respect to other ones
Mar 27, 2020 at 2:25pm UTC
Utku
(19)
In my SFML application, I want to add waypoints to the specific coordinates. However, I want to add them with respect to other objects.
For example;
https://imgur.com/cD4F9Xg
I want to add them according to roadtiles' coordinates, not absolute coordinates.
How can I add them?
Mar 28, 2020 at 2:52pm UTC
coder777
(8437)
I'm not sure what you are asking. How to organize data structure?
If so you may have a class with basic data like position and extent. One inheritance might contain a std::vector with [smart] pointer to sub items,
Mar 28, 2020 at 5:19pm UTC
Utku
(19)
I want to add an image and set its position according to another object:
https://imgur.com/880egaq
I do not want to add them according to absolute coordinate.
Mar 28, 2020 at 6:16pm UTC
ne555
(10692)
so instead of
1
2
a.x = X a.y = Y
you want to do
1
2
a.x = b.x + offset_x a.y = b.y + offset_y
¿what's the problem?
Topic archived. No new replies allowed.