1 #define __PERSPECTIVE_LINE_C__
3 /*
4 * Perspective line for 3D perspectives
5 *
6 * Authors:
7 * Maximilian Albert <Anhalter42@gmx.de>
8 *
9 * Copyright (C) 2007 authors
10 *
11 * Released under GNU GPL, read the file 'COPYING' for more information
12 */
14 #include "perspective-line.h"
15 #include "persp3d.h"
17 namespace Box3D {
19 PerspectiveLine::PerspectiveLine (Geom::Point const &pt, Proj::Axis const axis, Persp3D *persp) :
20 Line (pt, persp3d_get_VP(persp, axis).affine(), true)
21 {
22 g_assert (persp != NULL);
24 if (!persp3d_get_VP(persp, axis).is_finite()) {
25 Proj::Pt2 vp(persp3d_get_VP(persp, axis));
26 this->set_direction(Geom::Point(vp[Proj::X], vp[Proj::Y]));
27 }
28 this->vp_dir = axis;
29 this->persp = persp;
30 }
32 } // namespace Box3D
34 /*
35 Local Variables:
36 mode:c++
37 c-file-style:"stroustrup"
38 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
39 indent-tabs-mode:nil
40 fill-column:99
41 End:
42 */
43 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :