|
Revision 13041, 1.6 kB
(checked in by robert, 14 months ago)
|
|
Ran script to remove trailing spaces and tabs
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
| Line | |
|---|
| 1 | |
|---|
| 2 | |
|---|
| 3 | |
|---|
| 4 | |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | |
|---|
| 9 | |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | |
|---|
| 14 | #include "dxfBlock.h" |
|---|
| 15 | #include "dxfFile.h" |
|---|
| 16 | #include "codeValue.h" |
|---|
| 17 | #include "dxfEntity.h" |
|---|
| 18 | |
|---|
| 19 | using namespace std; |
|---|
| 20 | |
|---|
| 21 | void |
|---|
| 22 | dxfBlock::assign(dxfFile* dxf, codeValue& cv) |
|---|
| 23 | { |
|---|
| 24 | string s = cv._string; |
|---|
| 25 | if (cv._groupCode == 0) { |
|---|
| 26 | if (_currentEntity && _currentEntity->done()) { |
|---|
| 27 | _currentEntity = new dxfEntity(s); |
|---|
| 28 | _entityList.push_back(_currentEntity); |
|---|
| 29 | } else if (_currentEntity) { |
|---|
| 30 | _currentEntity->assign(dxf, cv); |
|---|
| 31 | } else { |
|---|
| 32 | _currentEntity = new dxfEntity(s); |
|---|
| 33 | _entityList.push_back(_currentEntity); |
|---|
| 34 | } |
|---|
| 35 | } else if (_currentEntity) { |
|---|
| 36 | _currentEntity->assign(dxf, cv); |
|---|
| 37 | } else if (cv._groupCode != 0) { |
|---|
| 38 | double d = cv._double; |
|---|
| 39 | switch (cv._groupCode) { |
|---|
| 40 | case 2: |
|---|
| 41 | _name = s; |
|---|
| 42 | case 10: |
|---|
| 43 | _position.x() = d; |
|---|
| 44 | break; |
|---|
| 45 | case 20: |
|---|
| 46 | _position.y() = d; |
|---|
| 47 | break; |
|---|
| 48 | case 30: |
|---|
| 49 | _position.z() = d; |
|---|
| 50 | break; |
|---|
| 51 | default: |
|---|
| 52 | |
|---|
| 53 | break; |
|---|
| 54 | } |
|---|
| 55 | } |
|---|
| 56 | } |
|---|
| 57 | |
|---|
| 58 | const osg::Vec3d& dxfBlock::getPosition() const { return _position; } |
|---|