cesium-剖面分析

直接上代码

<template>
	<div id="cesiumContainer" class="content"></div>
	<div id="toolbar" class="nameButton">
		<el-breadcrumb :separator-icon="ArrowRight">
			<el-breadcrumb-item>三维分析</el-breadcrumb-item>
			<el-breadcrumb-item>剖面分析</el-breadcrumb-item>
		</el-breadcrumb>
		<el-row class="mb-4 nameButton1">
			<el-button type="primary" @click="handleProfile">剖面</el-button><!--
			<el-button type="primary" @click="handleProfileCancel">清除</el-button>-->
		</el-row>
	</div>
	<div id="profileChart" ref="echartsRef" style="position:fixed;bottom:0;right:0;width:50vw;height: 200px;"></div>
</template>
<script setup>
import {ArrowRight} from '@element-plus/icons-vue'
import {onMounted, ref} from "vue";
import * as Cesium from "cesium";
import InitCesium from "../js/InitCesiumHide.js";
import ProfileAnalysis from '@/view/cesiumDemoG/js/8/007/ProfileAnalysis.js'

let viewer = null;
let tileset = null;


onMounted(() => {
	let initCesium = new InitCesium('cesiumContainer');
	viewer = initCesium.initViewer({});
	flyToRight2();
	viewer.scene.globe.depthTestAgainstTerrain = true;
})

const handleProfile = () => {
	let profileAnalysis = new ProfileAnalysis(viewer, document.getElementById("profileChart"));
	profileAnalysis.start();
}

const flyToRight2 = async () => {
	tileset = await Cesium.Cesium3DTileset.fromUrl('/src/assets/tileset/12/tileset.json', {});

	update3dtilesMaxtrix(tileset);
	viewer.scene.primitives.add(tileset);
	viewer.flyTo(tileset);

	/*viewer.camera.flyTo({
		destination: Cesium.Cartesian3.fromDegrees(113.06408124924124, 22.64479293609514, 800.0), // 设置位置
		orientation: {
			heading: Cesium.Math.toRadians(20.0), // 方向
			pitch: Cesium.Math.toRadians(-90.0),// 倾斜角度
			roll: 0
		},
		duration: 5, // 设置飞行持续时间,默认会根据距离来计算
		complete: function () {
			// 到达位置后执行的回调函数
		},
		cancle: function () {
			// 如果取消飞行则会调用此函数
		},
		pitchAdjustHeight: -90, // 如果摄像机飞越高于该值,则调整俯仰俯仰的俯仰角度,并将地球保持在视口中。
		maximumHeight: 5000, // 相机最大飞行高度
		flyOverLongitude: 100, // 如果到达目的地有2种方式,设置具体值后会强制选择方向飞过这个经度(这个,很好用)
	});*/
}

function update3dtilesMaxtrix(tileSet) {
	//调整参数
	let params = {
		tx: 113.06265738392063, //模型中心X轴坐标(经度,单位:十进制度)
		ty: 22.646603971034342, //模型中心Y轴坐标(纬度,单位:十进制度)
		tz: 45, //模型中心Z轴坐标(高程,单位:米)
		rx: 0, //X轴(经度)方向旋转角度(单位:度)
		ry: 0, //Y轴(纬度)方向旋转角度(单位:度)
		rz: 0, //Z轴(高程)方向旋转角度(单位:度)
		scale: 1.35, //缩放比例
	};
	//旋转
	const mx = Cesium.Matrix3.fromRotationX(Cesium.Math.toRadians(params.rx));
	const my = Cesium.Matrix3.fromRotationY(Cesium.Math.toRadians(params.ry));
	const mz = Cesium.Matrix3.fromRotationZ(Cesium.Math.toRadians(params.rz));
	const rotationX = Cesium.Matrix4.fromRotationTranslation(mx);
	const rotationY = Cesium.Matrix4.fromRotationTranslation(my);
	const rotationZ = Cesium.Matrix4.fromRotationTranslation(mz);
	//平移
	const position = Cesium.Cartesian3.fromDegrees(
		params.tx,
		params.ty,
		params.tz
	);
	const m = Cesium.Transforms.eastNorthUpToFixedFrame(position);
	//旋转、平移矩阵相乘
	Cesium.Matrix4.multiply(m, rotationX, m);
	Cesium.Matrix4.multiply(m, rotationY, m);
	Cesium.Matrix4.multiply(m, rotationZ, m);
	//比例缩放
	const scale = Cesium.Matrix4.fromUniformScale(params.scale);
	Cesium.Matrix4.multiply(m, scale, m);
	// console.log("矩阵m:", m);
	//赋值给tileset
	tileSet._root.transform = m;
}
</script>
<style scoped>
#cesiumContainer {
	overflow: hidden;
}
</style>
<style>
.el-breadcrumb__inner, .el-breadcrumb__separator {
	color: #ffffff !important;
}
</style>

效果图

  • 3
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Cesium剖面分析是一种利用离子轨迹法研究材料剖面结构的分析方法。在这个过程中,通过将样品暴露于一个具有较高能量的离子束中,离子束会与样品表面的原子发生相互作用,引起剖面的改变。剖面形成过程中会发生离子在材料中的输运和沉积,从而形成一个复杂的剖面结构。 cesium剖面分析的原理是通过控制离子辐照能量、剂量和离子束的角度等参数,以及利用离子或电子束扫描进行表征和分析。具体而言,离子束轰击样品表面后,会发生离子表面相互作用、散射和快速输运等过程,从而形成剖面结构。这个过程可以通过离子束激发发射光谱(IBED)、离子退火和电子显微镜等技术进行表征和分析。 在cesium剖面分析中,常用的表征技术有二次离子质谱(SIMS)、弹性反冲离子散射(ERD)、能量分散X射线光谱(EDX)和透射电子显微镜等。这些技术可以提供样品剖面的元素分布、化学组成和晶体结构等信息,从而帮助研究人员了解材料的结构、性能和性质。 通过cesium剖面分析,可以研究材料的界面、薄膜、气敏性、杂质分布、化学反应机制等问题。这对于材料科学和表面化学的研究具有重要意义。同时,cesium剖面分析也广泛应用于半导体、光电子器件、电池、涂层材料、生物材料等领域的研究和开发中。 总之,cesium剖面分析是一种重要的材料剖面结构分析方法,可以通过离子束的辐照和相关表征技术,提供材料的剖面元素分布、化学组成和晶体结构等信息,有助于研究人员深入了解材料的结构和性能特点。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值