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

add methods for getting coordinates of component center, corners etc. #11

Open
Acce0ss opened this issue Apr 18, 2014 · 0 comments
Open

Comments

@Acce0ss
Copy link

Acce0ss commented Apr 18, 2014

I think being able to place components relative to other components coordinates would be simplified greatly by this and the amount of literal double/int values in the design would decrease significantly.

Making something like

Component cube = Cube::create(5.0, 5.0, 5.0);

CompositeComponent cubes = Union::create();
cubes << cube;
for(int i = 0; i < cube.corners.size(); i++)
{
cubes << Cube::create(2.0, 2.0, 2.0).translate( cube.corners.at(i) );
}

another example would be placing a component on the surface of a sphere by giving coordinates in spherical system with origin attached to the center of the sphere.

The schemes illustrated by the examples are of course something I came up with very quickly, and we could think of some more clever solution for placing components relative to each other in a way that the computer would calculate the coordinates for us based on the already placed components.

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

No branches or pull requests

1 participant