Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Common Graphical Translation #57

Open
qualiaa opened this issue Dec 13, 2013 · 5 comments
Open

Common Graphical Translation #57

qualiaa opened this issue Dec 13, 2013 · 5 comments
Assignees
Milestone

Comments

@qualiaa
Copy link
Member

qualiaa commented Dec 13, 2013

Graphics classes show a lot of repetition from my rather hacky approach to getting them to actually work with SFML. This is leading to errors and a lot more effort than necessary.

@ghost ghost assigned qualiaa Dec 13, 2013
This was referenced Dec 13, 2013
@qualiaa
Copy link
Member Author

qualiaa commented Dec 13, 2013

Finished to some extent when fixing #62. Going to keep it open, because ultimately a full transformation class would be nice for #63.

@Anstow
Copy link
Contributor

Anstow commented May 7, 2014

I have written a common graphical translation class (or two) see coord_systems. I'm not going to merge this immediately because it is a rather huge change and I'd like some input.

@qualiaa
Copy link
Member Author

qualiaa commented Aug 3, 2014

@Anstow I wasn't a fan of your coordinate systems approach - maybe next time we meet you can convince me. I ripped your transform class out, made a Transformable class which essentially aggregates a transform, and has a pointer to a parent - so is in many ways similar.

This all seems to work nicely, and so I'm closing this as an issue.

@qualiaa qualiaa closed this as completed Aug 3, 2014
@qualiaa
Copy link
Member Author

qualiaa commented Aug 4, 2014

Okay, I spoke too soon. What I've done has reintroduced bugs relating to camera movement. I'd really appreciate it if @Anstow could take a look and fix what I'm doing wrong.

I'm testing this in http://github.com/tank-dev/demos/tree/Camera

Relevant functions are Transform::operator(Transform const&), Transformable::getWorldTransform() and Graphic::transform.

Edit: I've reverted my changes
@Anstow: your mission, if you choose to accept it, is to make Transformable store a single parent and compose transformations sensibly, with Camera parent of Entities, and Entities parent of Graphics.

@qualiaa qualiaa reopened this Aug 4, 2014
@qualiaa qualiaa assigned Anstow and unassigned qualiaa Aug 23, 2014
@Anstow
Copy link
Contributor

Anstow commented Dec 5, 2014

So this is pretty much what the coordinate systems does anyway just with slightly different names. The only difference is there is a separate transformation class as a transform shouldn't really know anything about what its transforming.

Also sorry it took me such a long time to reply to this I've been busy.

Edit: The rest of the bloat is to make it do sensible things when you remove the parent and the like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants