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

平台搭建与拆除流程黄冈网站seo

平台搭建与拆除流程,黄冈网站seo,网站建站步骤,做婚礼效果图的网站有哪些文章目录 基本控件创建创建文本框创建button创建布局 绘制形状绘制线段绘制点云 设置属性设置线宽设置点大小 可用Shader汇总GUI框架 基本控件创建 创建文本框 push_edit gui.TextEdit()创建button push_button gui.Button(...) push_button.horizontal_padding_em 0.5 p…

文章目录

  • 基本控件创建
    • 创建文本框
    • 创建button
    • 创建布局
  • 绘制形状
    • 绘制线段
    • 绘制点云
  • 设置属性
    • 设置线宽
    • 设置点大小
  • 可用Shader汇总
  • GUI框架

基本控件创建

创建文本框

push_edit = gui.TextEdit()

创建button

push_button = gui.Button('...')
push_button.horizontal_padding_em = 0.5
push_button.vertical_padding_em = 0
push_button.set_on_clicked(self._on_push_button) # 设置回调函数

创建布局

# 文本框和按钮水平布局
push_button_layout = gui.Horiz()
push_button_layout.add_child(gui.Label('Push Button'))
push_button_layout.add_child(self._push_edit)
push_button_layout.add_fixed(0.25*em)
push_button_layout.add_child(push_button)# 总体垂直布局
self.pannel = gui.Vert()
self.pannel.add_fixed(0.5*em)
self.pannel.add_child(push_button_layout)
self.window.add_child(self.pannel)

绘制形状

绘制线段

import open3d.visualization.gui as gui
points = [[0,0,0],[1,0,0],[0,1,0],[1,1,0],[0,0,1],[1,0,1],[0,1,1],[1,1,1]]
lines = [[0,1],[0,2],[1,3],[2,3],[4,5],[4,6],[5,7],[6,7],[0,4],[1,5],[2,6],[3,7]]
object_lines = o3d.geometry.LineSet(points=o3d.utility.Vector3dVector(points),lines=o3d.utility.Vector2iVector(lines),
)
# define material
material = rendering.MaterialRecord()
material.shader = 'defaultLit'# insert into scene
my_scene = gui.SceneWidget()
my_scene.scene = rendering.Open3DScene(w.renderer)
my_scene.scene.add_geometry('lines',object_lines ,material)
bounds = object_lines.get_axis_aligned_bounding_box()
my_scene.setup_camera(60,bounds,bounds.get_center())
my_scene.force_redraw()

绘制点云

import numpy as np
import open3d as o3d
import open3d.visualization.rendering as renderingcloud=o3d.io.read_point_cloud("your_path_to_point_cloud")
cloud_xyz=np.asarray(cloud.points)# define material
material = rendering.MaterialRecord()
material.shader = 'defaultLit'# define colors
ctmp=np.zeros((len(cloud_xyz),3))
ctmp[:,0]=1# rendering
object_pts=o3d.geometry.PointCloud()
object_pts.points=o3d.utility.Vector3dVector(cloud_xyz)
object_pts.colors=o3d.utility.Vector3dVector(ctmp)

设置属性

设置线宽

material_default = rendering.MaterialRecord()
material_default.shader = 'unlitLine'
material_default.line_width = 3
self._scene.scene.add_geometry('lines', object_lines,  material_default)

设置点大小

material = o3d.visualization.rendering.Material()
material.shader = "defaultLit"
material.base_color = color
material.point_size = size
scene.add_geometry(name, cloud, material)

可用Shader汇总

参考网址

类型
适用shader
网格defaultLit/defaultLitTransparencynormals
点云defaultLit/defaultLitTransparencynormalsdefaultUnlit/defaultUnlitTransparency
线段最好unlitLine,只有这个可以控制线宽

GUI框架

main_window.py

import open3d.visualization.gui as guiclass App:count = 0def __init__(self):# 初始化gui.Application.instance.initialize()self.window = gui.Application.instance.create_window("Event and Widget", 300, 600)# 使用相对大小避免直接设置像素,因为不同显示器像素大小可能不同em = self.window.theme.font_size# 文本框和按钮self._push_edit = gui.TextEdit()push_button = gui.Button('...')push_button.horizontal_padding_em = 0.5push_button.vertical_padding_em = 0push_button.set_on_clicked(self._on_push_button)# 文本框和按钮水平布局push_button_layout = gui.Horiz()push_button_layout.add_child(gui.Label('Push Button'))push_button_layout.add_child(self._push_edit)push_button_layout.add_fixed(0.25*em)push_button_layout.add_child(push_button)# 总体垂直布局self.pannel = gui.Vert()self.pannel.add_fixed(0.5*em)self.pannel.add_child(push_button_layout)self.window.add_child(self.pannel)def _on_push_button(self):self.count += 1# 设置文本框文字self._push_edit.text_value = f'push count {self.count}'# 弹出消息框self.window.show_message_box('Push Info', 'Hello World!')def run(self):gui.Application.instance.run()if __name__ == "__main__":app = App()app.run()
http://www.tj-hxxt.cn/news/78134.html

相关文章:

  • 如何搭建网站服务器天天自学网网址
  • 建立一个网站怎么做怎样申请网站注册
  • 北京手机网站设计电话关键词首页排名代发
  • 58网站怎么做优化免费seo关键词优化排名
  • 揭阳网站制作托管河南做网站的公司
  • 做网站的公司需要什么资质专门做排行榜的软件
  • 站酷网logo素材图库企业网站的优化建议
  • 网站建设电子书资料江西优化中心
  • 联系昆明网站建设免费seo营销软件
  • 如何做好网站关键词优化sem招聘
  • 深圳前十设计公司黑河seo
  • 前端容易被裁还是后端seo专业论坛
  • 太原做网站公司app推广一手单
  • 门户网站开发设计方案公关公司经营范围
  • 网站做互动百度pc版网页
  • 建立网站有什么作用百度广告业务
  • 安防公司做网站图片网页快速收录
  • 网站建设公司的年报互联网去哪里学
  • 茶叶手机网站建设新闻软文推广案例
  • 手机网站欣赏手机网站制作平台
  • 做网站需要那些软件市场调研怎么做
  • 外贸网站怎么做企业推广软文范文
  • 公司网站建设全包常见的搜索引擎有哪些?
  • 大型的网站建设公司卢镇seo网站优化排名
  • 雄县网站建设免费长尾词挖掘工具
  • 婚纱摄影网站seo方案永久免费wap自助建站
  • 短网址生成源码作品提示优化要删吗
  • 学畅留学招聘网站开发主管seo公司推荐
  • 梁山手机网站建设铜川网络推广
  • 个人备案网站 做资讯培训报名