Main Page   Class Hierarchy   Compound List   File List   Compound Members  

linesegment.h

00001 /**************************************************************************\
00002  *
00003  *  This source file is part of DIME.
00004  *  Copyright (C) 1998-2001 by Systems In Motion.  All rights reserved.
00005  *
00006  *  This library is free software; you can redistribute it and/or modify it
00007  *  under the terms of the GNU General Public License, version 2, as
00008  *  published by the Free Software Foundation.
00009  *
00010  *  This library is distributed in the hope that it will be useful, but
00011  *  WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  *  General Public License (the accompanying file named COPYING) for more
00014  *  details.
00015  *
00016  **************************************************************************
00017  *
00018  *  If you need DIME for a non-GPL project, contact Systems In Motion
00019  *  to acquire a Professional Edition License:
00020  *
00021  *  Systems In Motion                                   http://www.sim.no/
00022  *  Prof. Brochs gate 6                                       sales@sim.no
00023  *  N-7030 Trondheim                                   Voice: +47 22114160
00024  *  NORWAY                                               Fax: +47 22207097
00025  *
00026 \**************************************************************************/
00027 
00028 #ifndef _DXF2VRML_LINE_SEGMENT_
00029 #define _DXF2VRML_LINE_SEGMENT_
00030 
00031 #include <dime/util/Linear.h>
00032 class dxfLayerData;
00033 
00034 class dxfLineSegment 
00035 {
00036 public:
00037   void set(const dimeVec3f &p0, const dimeVec3f &p1,
00038            const dxfdouble startWidth, const dxfdouble endwidth,
00039            const dxfdouble thickness);
00040   void convert(dxfLineSegment *prev, dxfLineSegment *next,
00041                dxfLayerData *data, dimeMatrix *matrix);
00042   
00043 private:
00044 
00045   void calculate_v();
00046   void calculate_connect(dxfLineSegment *next);
00047   
00048   dimeVec3f p[2];
00049   dxfdouble w[2];
00050   dxfdouble thickness;
00051   dxfLineSegment *prev;
00052   dimeVec3f e;
00053   dimeVec3f dir;
00054   dimeVec3f wdir;
00055 
00056   // calculated pts
00057   int flags;
00058   dimeVec3f v[4];
00059   dimeVec3f connect[4];
00060 };
00061 
00062 
00063 #endif // _DXF2VRML_LINE_SEGMENT_

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