perspective3d.cpp revision d81a973b81c26fcef48f46fc665eef88d386af07
#define __PERSPECTIVE3D_C__
/*
* Class modelling a 3D perspective
*
* Authors:
* Maximilian Albert <Anhalter42@gmx.de>
*
* Copyright (C) 2007 authors
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include "box3d-context.h"
#include "perspective-line.h"
#include <iostream>
#include "desktop.h"
// can probably be removed later
#include "inkscape.h"
namespace Box3D {
{
return (Perspective3D *) p->data;
}
g_warning ("Stray 3D box!\n");
}
/**
* Computes the intersection of the two perspective lines from pt1 and pt2 to the respective
* vanishing points in the given directions.
*/
// FIXME: This has been moved to a virtual method inside PerspectiveLine; can probably be purged
perspective_intersection (NR::Point pt1, Box3D::Axis dir1, NR::Point pt2, Box3D::Axis dir2, Perspective3D *persp)
{
// FIXME: How to handle parallel lines (also depends on the type of the VPs)?
return *meet;
}
/**
* Find the point on the perspective line from line_pt to the
* vanishing point in direction dir that is closest to ext_pt.
*/
{
}
Perspective3D::Perspective3D (VanishingPoint const &pt_x, VanishingPoint const &pt_y, VanishingPoint const &pt_z)
{
}
{
desktop->remove_perspective (this);
}
{
// FIXME: Also handle value 'NONE' in switch
switch (dir) {
case X:
return &vp_x;
break;
case Y:
return &vp_y;
break;
case Z:
return &vp_z;
break;
}
}
{
switch (dir) {
case X:
break;
case Y:
break;
case Z:
break;
case NONE:
// no vanishing point to set
break;
}
}
void
{
// Don't add the same box twice
g_warning ("Box already uses the current perspective. We don't add it again.\n");
return;
}
}
void
{
g_warning ("Could not find box that is to be removed in the current perspective.\n");
}
}
bool
{
}
} // namespace Box3D
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :