linesegment.h
1 /**************************************************************************\
2  *
3  * This source file is part of DIME.
4  * Copyright (C) 1998-2001 by Systems In Motion. All rights reserved.
5  *
6  * This library is free software; you can redistribute it and/or modify it
7  * under the terms of the GNU General Public License, version 2, as
8  * published by the Free Software Foundation.
9  *
10  * This library is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * General Public License (the accompanying file named COPYING) for more
14  * details.
15  *
16  **************************************************************************
17  *
18  * If you need DIME for a non-GPL project, contact Systems In Motion
19  * to acquire a Professional Edition License:
20  *
21  * Systems In Motion http://www.sim.no/
22  * Prof. Brochs gate 6 sales@sim.no
23  * N-7030 Trondheim Voice: +47 22114160
24  * NORWAY Fax: +47 22207097
25  *
26 \**************************************************************************/
27 
28 #ifndef _DXF2VRML_LINE_SEGMENT_
29 #define _DXF2VRML_LINE_SEGMENT_
30 
31 #include <dime/util/Linear.h>
32 class dxfLayerData;
33 
35 {
36 public:
37  void set(const dimeVec3f &p0, const dimeVec3f &p1,
38  const dxfdouble startWidth, const dxfdouble endwidth,
39  const dxfdouble thickness);
40  void convert(dxfLineSegment *prev, dxfLineSegment *next,
41  dxfLayerData *data, dimeMatrix *matrix);
42 
43 private:
44 
45  void calculate_v();
46  void calculate_connect(dxfLineSegment *next);
47 
48  dimeVec3f p[2];
49  dxfdouble w[2];
50  dxfdouble thickness;
51  dxfLineSegment *prev;
52  dimeVec3f e;
53  dimeVec3f dir;
54  dimeVec3f wdir;
55 
56  // calculated pts
57  int flags;
58  dimeVec3f v[4];
59  dimeVec3f connect[4];
60 };
61 
62 
63 #endif // _DXF2VRML_LINE_SEGMENT_

Copyright © 1998-1999, Systems In Motion <sales@sim.no>. All rights reserved.
System documentation was generated using doxygen.