1 /*
2 * Class modelling a 3D perspective
3 *
4 * Authors:
5 * Maximilian Albert <Anhalter42@gmx.de>
6 *
7 * Copyright (C) 2007 authors
8 *
9 * Released under GNU GPL, read the file 'COPYING' for more information
10 */
12 #ifndef SEEN_PERSPECTIVE3D_H
13 #define SEEN_PERSPECTIVE3D_H
15 #include "vanishing-point.h"
17 namespace Box3D {
19 NR::Point perspective_intersection (NR::Point pt1, Box3D::PerspDir dir1, NR::Point pt2, Box3D::PerspDir dir2);
20 NR::Point perspective_line_snap (NR::Point pt, PerspDir dir, NR::Point ext_pt);
22 class PerspectiveLine;
24 class Perspective3D {
25 public:
26 Perspective3D(VanishingPoint const &pt_x, VanishingPoint const &pt_y, VanishingPoint const &pt_z);
28 VanishingPoint *get_vanishing_point (PerspDir const dir);
29 void set_vanishing_point (PerspDir const dir, VanishingPoint const &pt);
31 private:
32 VanishingPoint vp_x;
33 VanishingPoint vp_y;
34 VanishingPoint vp_z;
35 };
38 } // namespace Box3D
41 /** A function to print out the VanishingPoint (prints the coordinates) **/
42 /***
43 inline std::ostream &operator<< (std::ostream &out_file, const VanishingPoint &vp) {
44 out_file << vp;
45 return out_file;
46 }
47 ***/
50 #endif /* !SEEN_PERSPECTIVE3D_H */
52 /*
53 Local Variables:
54 mode:c++
55 c-file-style:"stroustrup"
56 c-file-offsets:((innamespace . 0)(inline-open . 0))
57 indent-tabs-mode:nil
58 fill-column:99
59 End:
60 */
61 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :