dxfblock.cpp

来自「最新osg包」· C++ 代码 · 共 59 行

CPP
59
字号
/* dxfReader for OpenSceneGraph  Copyright (C) 2005 by GraphArchitecture ( grapharchitecture.com ) * Programmed by Paul de Repentigny <pdr@grapharchitecture.com> *  * OpenSceneGraph is (C) 2004 Robert Osfield *  * This library is provided as-is, without support of any kind. * * Read DXF docs or OSG docs for any related questions. *  * You may contact the author if you have suggestions/corrections/enhancements. */#include "dxfBlock.h"#include "dxfFile.h"#include "codeValue.h"#include "dxfEntity.h"using namespace std;void dxfBlock::assign(dxfFile* dxf, codeValue& cv){    string s = cv._string;    if (cv._groupCode == 0) {        if (_currentEntity && _currentEntity->done()) {            _currentEntity = new dxfEntity(s);            _entityList.push_back(_currentEntity);        } else if (_currentEntity) {            _currentEntity->assign(dxf, cv);        } else {            _currentEntity = new dxfEntity(s);            _entityList.push_back(_currentEntity);        }    } else if (_currentEntity) {        _currentEntity->assign(dxf, cv);    } else if (cv._groupCode != 0) {        double d = cv._double;        switch (cv._groupCode) {            case 2:                _name = s;            case 10:                _position.x() = d;                break;            case 20:                _position.y() = d;                break;            case 30:                _position.z() = d;                break;            default:                // dxf garble                break;        }    }}const osg::Vec3d& dxfBlock::getPosition() const { return _position; }

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?