C++ 3D - 2D projection class
$30-100 USD
Pagado a la entrega
I need a C++ "Projector" class that will receive the coordinates of a 3D point and return its projection in a plane. The projector object will be initialized with 4 pairs 3D -> 2D, and based on these it will calculate the position of the projection plane. After this initialization, it should be able to project any 3D point in the plane.
The interface will be something like this:
class Projector {
public:
Projector();
void* feed(double 3dx, double 3dy, double 3dz, int 2dx, int 2dy);
// returns null if there hasn't been enough calls to feed() to build the model
2DPoint project(double 3dx, double 3dy, double 3dz);
}
## Deliverables
The class should be enough for deliverable, but in case I have difficulties testing, you should also provide a [url removed, login to view] wrapper that will compile in Linux with g++ 4.2, and read from STDIN in the following format:
3dx, 3dy, 3dz, 2dx, 2dy
3dx, 3dy, 3dz, 2dx, 2dy
3dx, 3dy, 3dz, 2dx, 2dy
3dx, 3dy, 3dz, 2dx, 2dy
3dx, 3dy, 3dz
3dx, 3dy, 3dz
3dx, 3dy, 3dz
3dx, 3dy, 3dz
3dx, 3dy, 3dz
and will output 2d coordinates after reading each line after the 4th one.
Nº del proyecto: #3911114