当前位置: 首页 > news >正文

泰和网站制作自己开网店怎么运营

泰和网站制作,自己开网店怎么运营,海外服务器怎么搭建,福田工作招聘类DL_Extrusion DL_Extrusion 是 DXF 库中的一个类,用于表示三维实体的扩展信息。在 DXF 文件中,DL_Extrusion 类通常用于表示具有高度的三维图形实体,如立方体、圆柱体等,以及其它具有体积的几何对象。 以下是一个简单的示例代…
  • 类DL_Extrusion

DL_Extrusion 是 DXF 库中的一个类,用于表示三维实体的扩展信息。在 DXF 文件中,DL_Extrusion 类通常用于表示具有高度的三维图形实体,如立方体、圆柱体等,以及其它具有体积的几何对象。

以下是一个简单的示例代码,展示了如何使用 DL_Extrusion 类来创建一个简单的三维实体并将其写入 DXF 文件:

#include <iostream>
#include "dl_creationadapter.h"
#include "dl_dxf.h"
#include "dl_writerascii.h"class MyExtrusion : public DL_CreationAdapter {
public:void addExtrusion() {DL_ExtrusionData data;data.basePoint.set(0.0, 0.0, 0.0);data.axis.set(0.0, 0.0, 1.0);data.length = 10.0;data.angle = 0.0;data.radius = 2.0;addExtrusion(data);}void addExtrusion(const DL_ExtrusionData& data) {addExtrusion(data.basePoint.x, data.basePoint.y, data.basePoint.z,data.axis.x, data.axis.y, data.axis.z,data.length, data.angle, data.radius);}void addExtrusion(double x, double y, double z,double nx, double ny, double nz,double length, double angle, double radius) {DL_Extrusion extrusion(x, y, z, nx, ny, nz, length, angle, radius);addEntity(&extrusion);}
};int main() {DL_Dxf dxf;MyExtrusion creationAdapter;creationAdapter.addExtrusion();dxf.write("output.dxf", &creationAdapter);std::cout << "DXF 文件已生成。" << std::endl;return 0;
}

在上面的示例中,我们定义了一个名为 MyExtrusion 的类,继承自 DL_CreationAdapter。在 addExtrusion 方法中,我们创建了一个 DL_ExtrusionData 对象,设置了基本点、轴向、长度、角度和半径等参数,并调用 addExtrusion 方法添加了一个 Extrusion 实体。然后在 main 函数中,我们创建了一个 DXF 对象,调用 write 方法将添加的实体写入 DXF 文件中。

请注意,以上示例仅用于演示目的,实际使用时需要根据您的需求和 DXF 库的具体接口进行调整。

  • 方法setElevation 

在 DXF 库中的 DL_Extrusion 类中,setElevation 方法通常用于设置或更改 Extrusion 实体的高度或海拔值。在三维空间中,高度通常表示对象在 z 轴上的位置,即垂直于 XY 平面的距离。通过调用 setElevation 方法,您可以指定 Extrusion 实体在 z 轴上的位置,从而改变其在三维空间中的位置。

以下是一个简单的伪代码示例,展示了如何使用 setElevation 方法来设置 Extrusion 实体的高度:

DL_Extrusion extrusion;
double elevation = 5.0;  // 设置高度为 5.0extrusion.setElevation(elevation);

在上面的示例中,我们创建了一个名为 extrusion 的 DL_Extrusion 对象,并将高度值设置为 5.0,然后调用 setElevation 方法将这个高度值应用到 Extrusion 实体上。这样,实体的位置就会相应地在 z 轴上移动 5 个单位距禿

请注意,setElevation 方法的确切用法可能会根据您所使用的 DXF 库的 API 设计略有不同,具体取决于库的实现方式和参数设置。

  • 老版库头文件实现
/****************************************************************************
** Copyright (C) 2001-2013 RibbonSoft, GmbH. All rights reserved.
**
** This file is part of the dxflib project.
**
** This file is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** Licensees holding valid dxflib Professional Edition licenses may use
** this file in accordance with the dxflib Commercial License
** Agreement provided with the Software.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.ribbonsoft.com for further details.
**
** Contact info@ribbonsoft.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/#ifndef DL_EXTRUSION_H
#define DL_EXTRUSION_H#include "dl_global.h"#include <math.h>/*** Extrusion direction.** @author Andrew Mustun*/
class DXFLIB_EXPORT DL_Extrusion
{
public:/*** Default constructor.*/DL_Extrusion(){direction = new double[3];setDirection( 0.0, 0.0, 1.0 );setElevation( 0.0 );}/*** Destructor.*/~DL_Extrusion(){delete[] direction;}/*** Constructor for DXF extrusion.** @param direction Vector of axis along which the entity shall be extruded*                  this is also the Z axis of the Entity coordinate system* @param elevation Distance of the entities XY plane from the origin of the*                  world coordinate system*/DL_Extrusion( double adx, double ady, double adz, double aelevation ){direction = new double[3];setDirection( adx, ady, adz );setElevation( aelevation );}/*** Sets the direction vector.*/void setDirection( double dx, double dy, double dz ){direction[0]    = dx;direction[1]    = dy;direction[2]    = dz;}/*** @return direction vector.*/double* getDirection() const{return direction;}/*** @return direction vector.*/void getDirection( double dir[] ) const{dir[0]  = direction[0];dir[1]  = direction[1];dir[2]  = direction[2];}/*** Sets the elevation.*/void setElevation( double aelevation ){this->elevation = aelevation;}/*** @return Elevation.*/double getElevation() const{return elevation;}/*** Copies extrusion (deep copies) from another extrusion object.*/DL_Extrusion operator =( const DL_Extrusion& extru ){setDirection( extru.direction[0], extru.direction[1], extru.direction[2] );setElevation( extru.elevation );return *this;}private:double* direction;double  elevation;
};#endif

http://www.hkea.cn/news/734107/

相关文章:

  • 寿县住房与城乡建设局网站真正免费的网站建站平台
  • 常德seo招聘网站seo站长工具
  • 网站开发多久完成俄罗斯搜索引擎yandex推广入口
  • 漳州做网站建设建网站免费
  • 网站建设服务上海广州软文推广公司
  • 做一个网站app需要多少钱web制作网站的模板
  • 网站建设的财务计划新媒体营销策略有哪些
  • 网站建设分金手指专业二八宁波品牌网站推广优化
  • 清远网站建设公司百度游戏风云榜
  • 网上可以自学什么技术win7系统优化软件
  • 嘉兴建站软件如何做好企业网站的推广
  • 在凡科做网站短视频推广
  • 深圳推广公司推荐q群排名优化软件
  • 什么网站做简历模板宁德市医院
  • 用什么软件做公司网站游戏推广赚佣金的平台
  • 购物网站 后台模板河北seo技术培训
  • 聊城建设委员会官方网站google seo
  • 广西建设网郭业棚seo推广具体做什么
  • 武汉网站seo诊断谷歌下载官网
  • 做地方网站能赚钱吗免费seo网站诊断
  • 图片设计在线网站推广优化外包便宜
  • 武汉平价做网站网络软文推广案例
  • 新产品线上推广方案鞍山seo外包
  • 网站建网站建设和优佛山网络推广培训
  • 毕业设计做网站怎么样微信crm管理系统
  • 个人网站开发多少钱电脑培训班零基础
  • 互联网有哪些岗位宁波免费seo在线优化
  • 惠州做棋牌网站建设哪家技术好哪里的网络推广培训好
  • 如何做线上赌博的网站推广策略有哪些方法
  • 男的女的做那个视频网站百度收录需要多久