sogrey

第 422 位会员

会员
个人信息
  • 加入于 2019-11-09 11:43:36
  • GitHub Sogrey
  • 最后登录时间 1个月前
个人简介
Cesium新手
个人成就
  • 发表文章次数 6
  • 发布回复次数 29
  • 个人主页浏览次数 2
关于线、管线的渐变问题2年前

几何体 改变材质

czm_material czm_getMaterial(czm_materialInput materialInput){
     czm_material material = czm_getDefaultMaterial(materialInput);
     vec2 st = materialInput.st; 
	 
	 // 这里st 在 [0,1] 之间
	 // TODO texture2D 采样吧

     return material; 
}

有多个坐标点,想移动相机位置使得一个屏幕中把所有点位都显示出来2年前

可以使用一个取巧的办法,求得最大点坐标、最小点坐标后,求得包围盒中心点和尺寸,画个 box ,zoomto 到这个 box,这实在是个取巧的办法,勿喷

var outlineOnly = viewer.entities.add({
  name: "Yellow box outline",
  position: Cesium.Cartesian3.fromDegrees(-100.0, 40.0, 300000.0),
  box: {
    dimensions: new Cesium.Cartesian3(400000.0, 300000.0, 500000.0),
    fill: false,
    outline: true,
    outlineColor: Cesium.Color.YELLOW,
  },
});

viewer.zoomTo(viewer.entities);

cesuim 怎么获得斜圆锥2年前

最新的文档上看到 entity 可以设置方向了,https://cesium.com/learn/cesiumjs/ref-doc/Entity.html#.ConstructorOptions ,注意 orientation <可选> 指定实体方向的属性。

官网文有提:

https://cesium.com/learn/cesiumjs-learn/cesiumjs-creating-entities/#3d-models

默认情况下,模型是直立面向东的。通过Quaternion 为Entity.orientation属性指定 a来控制模型的方向。这控制了模型的航向、俯仰和滚动。

var viewer = new Cesium.Viewer('cesiumContainer');
var position = Cesium.Cartesian3.fromDegrees(-123.0744619, 44.0503706);
var heading = Cesium.Math.toRadians(45.0);
var pitch = Cesium.Math.toRadians(15.0);
var roll = Cesium.Math.toRadians(0.0);
var orientation = Cesium.Transforms.headingPitchRollQuaternion(position, new Cesium.HeadingPitchRoll(heading, pitch, roll));

var entity = viewer.entities.add({
    position : position,
    orientation : orientation,
    model : {
        uri : '../../../../Apps/SampleData/models/GroundVehicle/GroundVehicle.glb'
    }
});
viewer.trackedEntity = entity;

请问,cesium的有可视区域分析吗?2年前

最近也有这方面需求,顺带研究下,找到这个文章,希望对诸君有用 Cesium深入浅出之可视域分析

使用`GroundPolylinePrimitive`创建贴地线,怎么动态改变其线宽4年前

搞了许久,也没实现使用GroundPolylinePrimitive创建贴地线动态改变其线宽,已改为使用viewer.entities.add方式加载Entity类型的polyline

绘制圆柱钻孔,本来连续的为什么中间差很多4年前

你是看到了有断开的部分,其实你应该发现上面几个圆柱已经重合了。

拿第一段来说:

entities.add({
    position : Cesium.Cartesian3.fromDegrees(116.472305, 35.416434, -965),
    cylinder : {      
            length: 200,
            topRadius: 10,
            bottomRadius: 10,
        material : Cesium.Color.fromRandom({alpha : 1.0})
    }
});

高程为 -965,高度为 200,那么这段圆柱的最低点高程为 -965-200/2 = -1065;最高点高程为 -965+200/2 = -865;也就是说它是以 -965 为中心向两头延伸。

因此该这么计算

https://sogrey.top/Cesium-start-Example/examples/other/cylinders.html

大家有在cesium上用体绘制方法实现这种效果的吗4年前

同求,之前有过需要实现立体温度场需求,与此效果相似

cesuim 怎么获得斜圆锥4年前

这个viewer.entities应该不能满足,可以使用scene.primitives。只要给位置矩阵设置旋转就行。

示例地址(需要npm run build编译源码后可见): http://localhost:8080/Apps/Sandcastle/index.html?src=development/Cylinder.html&label=Development

我简单修改了官方源码,只加了一行代码:

//在 41 行后加上
Cesium.Matrix4.multiplyByMatrix3(modelMatrix,
                                 Cesium.Matrix3.fromRotationY(Math.PI/4),//绕Y轴旋转 π/4
                                 modelMatrix);

https://sogrey.top/Cesium-start-Example/examples/model/development_Cylinder.html

插件 Sandcastle报空值,怎么解决?4年前

可以再详细描述下,到底是什么报空了,或截图看下错误日志和相关代码

请问cesium怎么绘制带箭头的线段4年前

官方有 polyline添加材质Cesium.PolylineArrowMaterialProperty,这样的箭头在一端,看你的貌似在中间

cesium建筑物特效4年前

示例中人家是封装的,渐变色有一个状态位控制

Cesium.ExpandByMars.styleBM = !0

cesium 中可查阅 Cesium3DTileStyle

https://github.com/AnalyticalGraphicsInc/3d-tiles/tree/master/specification/Styling

pickedFeature.getProperty('name'); name 是如何创建的4年前

模型默认就有这个属性字段,默认值为空字符,创建时若设置了,就是设置后的值。

鼠标点击可以选中 为什么直接传位置 选中 就返回undefined4年前

从楼主提供的代码看,是想模拟鼠标点击画布中心点来拾取模型,如果中心点处确实有模型应该能拾取到,亲测过: 但如果中心点没有模型,那就拾取不到。

关于粒子销毁时报错问题4年前

@admin #10楼

Cesium 我也是刚入门,之前是做Three.js的,理解起来可能容易些。

cesium怎么显示las数据(转成3d tiles?)4年前

欢迎入群 QQ群: 807482793

群文件里有 激光点云las处理工具

cesium的las、点云之前涉及很少,不过在GitHub发现个工具开源库:https://github.com/mattshax/cesium_pnt_generator

看看对你有没有帮助。

Your Site Analytics