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

商业门户网站是什么意思口碑营销的缺点

商业门户网站是什么意思,口碑营销的缺点,网站建设思路梳理,想找人做公司网站要注意什么文章目录 基本控件创建创建文本框创建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.dt0577.cn/news/52509.html

相关文章:

  • 做网站怎样赚卖流量北京搜索排名优化
  • 律师做推广宣传的网站免费站长统计工具
  • 做网站需要那些东西长春网站优化
  • 安徽网站建设哪家好站长工具seo综合查询引流
  • 用ai做网站各个广告联盟的标识
  • 常熟网站制作设计网络营销到底是个啥
  • 建设部网站社保联网域名查询平台
  • 做网站域名选择百度渠道开户哪里找
  • 孟村网站建设价格澳门seo关键词排名
  • asp做网站优点软文一般发布在哪些平台
  • 做视频网站的条件苏州seo关键词优化软件
  • 移动电子商务网站建设研究互联网营销师证书是国家认可的吗
  • 郑州做网站哪个公司好seo黑帽教学网
  • 宜昌教育培训网站建设网站域名购买
  • 网站管理的内容网站免费进入窗口软件有哪些
  • 丹阳做网站的公司凡客建站
  • 做脚垫版型的网站风云榜百度
  • jsp商务网站建设比较好网站制作公司
  • 做暑假工的网站网络营销成功的原因
  • 创办网站的步骤app拉新推广平台
  • 立方集团 网站地推项目平台
  • 建设做网站沈阳seo收费
  • 网站制作 商务苏州百度代理公司
  • 房产网站建设方案自己创建网页
  • 网站开发思维导图网站收录查询
  • 网页制作软件2023网站seo哪家做的好
  • wordpress幻灯片怎么建优化网站首页
  • 做网站服务器配置应该怎么选西安网络优化哪家好
  • 福州交通建设集团官方网站网络优化报告
  • 微信营销要怎么做如何优化关键词