blob: 007b02df19c4af82663b1d3a5c0eebc791d10448 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
/*
* 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
*/
#ifndef SEEN_PERSPECTIVE3D_H
#define SEEN_PERSPECTIVE3D_H
#include "vanishing-point.h"
namespace Box3D {
NR::Point perspective_intersection (NR::Point pt1, Box3D::Axis dir1, NR::Point pt2, Box3D::Axis dir2);
NR::Point perspective_line_snap (NR::Point pt, Box3D::Axis dir, NR::Point ext_pt);
class PerspectiveLine;
class Perspective3D {
public:
Perspective3D(VanishingPoint const &pt_x, VanishingPoint const &pt_y, VanishingPoint const &pt_z);
VanishingPoint *get_vanishing_point (Box3D::Axis const dir);
void set_vanishing_point (Box3D::Axis const dir, VanishingPoint const &pt);
private:
VanishingPoint vp_x;
VanishingPoint vp_y;
VanishingPoint vp_z;
};
} // namespace Box3D
/** A function to print out the VanishingPoint (prints the coordinates) **/
/***
inline std::ostream &operator<< (std::ostream &out_file, const VanishingPoint &vp) {
out_file << vp;
return out_file;
}
***/
#endif /* !SEEN_PERSPECTIVE3D_H */
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :
|