Commit e42dd624 authored by 张博's avatar 张博

chongtu

parents 7c2292bf 52aea240
# 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware
# ļ:03.06.2020 11:50:46
newmtl fireEquip
Ns 10.0000
Ni 1.5000
d 1.0000
Tr 0.0000
Tf 1.0000 1.0000 1.0000
illum 2
Ka 0.5880 0.5880 0.5880
Kd 0.5880 0.5880 0.5880
Ks 0.0000 0.0000 0.0000
Ke 0.0000 0.0000 0.0000
map_Ka fireEquip.png
map_Kd fireEquip.png
map_d fireEquip.png
# 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware
# ļ:03.06.2020 11:50:46
mtllib fireEquip.mtl
#
# object fireEquip
#
v -1.6371 -0.5656 0.0000
v -0.8185 -0.5656 0.0000
v -0.8185 0.3553 0.0000
v -1.6371 0.3553 0.0000
v 0.0000 -0.5656 0.0000
v 0.0000 0.3553 0.0000
v 0.8185 -0.5656 0.0000
v 0.8185 0.3553 0.0000
v 1.6371 -0.5656 0.0000
v 1.6371 0.3553 0.0000
v -0.8185 1.2761 0.0000
v -1.6371 1.2761 0.0000
v 0.0000 1.2761 0.0000
v 0.8185 1.2761 0.0000
v 1.6371 1.2761 0.0000
v -0.8185 2.1970 0.0000
v -1.6371 2.1970 0.0000
v 0.0000 2.1970 0.0000
v 0.8185 2.1970 0.0000
v 1.6371 2.1970 0.0000
v -0.8185 3.1178 0.0000
v -1.6371 3.1178 0.0000
v 0.0000 3.1178 0.0000
v 0.8185 3.1178 0.0000
v 1.6371 3.1178 0.0000
# 25 vertices
vn 0.0000 -0.0000 1.0000
# 1 vertex normals
vt 0.0000 0.0000 0.0000
vt 0.2500 0.0000 0.0000
vt 0.2500 0.2500 0.0000
vt 0.0000 0.2500 0.0000
vt 0.5000 0.0000 0.0000
vt 0.5000 0.2500 0.0000
vt 0.7500 0.0000 0.0000
vt 0.7500 0.2500 0.0000
vt 1.0000 0.0000 0.0000
vt 1.0000 0.2500 0.0000
vt 0.2500 0.5000 0.0000
vt 0.0000 0.5000 0.0000
vt 0.5000 0.5000 0.0000
vt 0.7500 0.5000 0.0000
vt 1.0000 0.5000 0.0000
vt 0.2500 0.7500 0.0000
vt 0.0000 0.7500 0.0000
vt 0.5000 0.7500 0.0000
vt 0.7500 0.7500 0.0000
vt 1.0000 0.7500 0.0000
vt 0.2500 1.0000 0.0000
vt 0.0000 1.0000 0.0000
vt 0.5000 1.0000 0.0000
vt 0.7500 1.0000 0.0000
vt 1.0000 1.0000 0.0000
# 25 texture coords
g fireEquip
usemtl fireEquip
s 1
f 1/1/1 2/2/1 3/3/1 4/4/1
f 2/2/1 5/5/1 6/6/1 3/3/1
f 5/5/1 7/7/1 8/8/1 6/6/1
f 7/7/1 9/9/1 10/10/1 8/8/1
f 4/4/1 3/3/1 11/11/1 12/12/1
f 3/3/1 6/6/1 13/13/1 11/11/1
f 6/6/1 8/8/1 14/14/1 13/13/1
f 8/8/1 10/10/1 15/15/1 14/14/1
f 12/12/1 11/11/1 16/16/1 17/17/1
f 11/11/1 13/13/1 18/18/1 16/16/1
f 13/13/1 14/14/1 19/19/1 18/18/1
f 14/14/1 15/15/1 20/20/1 19/19/1
f 17/17/1 16/16/1 21/21/1 22/22/1
f 16/16/1 18/18/1 23/23/1 21/21/1
f 18/18/1 19/19/1 24/24/1 23/23/1
f 19/19/1 20/20/1 25/25/1 24/24/1
# 16 polygons
# 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware
# ļ:03.06.2020 11:52:49
newmtl fireFoam
Ns 10.0000
Ni 1.5000
d 1.0000
Tr 0.0000
Tf 1.0000 1.0000 1.0000
illum 2
Ka 0.5880 0.5880 0.5880
Kd 0.5880 0.5880 0.5880
Ks 0.0000 0.0000 0.0000
Ke 0.0000 0.0000 0.0000
map_Ka fireFoam.png
map_Kd fireFoam.png
map_d fireFoam.png
# 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware
# ļ:03.06.2020 11:52:49
mtllib fireFoam.mtl
#
# object fireFoam
#
v -1.6371 -0.5656 0.0000
v -0.8185 -0.5656 0.0000
v -0.8185 0.3553 0.0000
v -1.6371 0.3553 0.0000
v 0.0000 -0.5656 0.0000
v 0.0000 0.3553 0.0000
v 0.8185 -0.5656 0.0000
v 0.8185 0.3553 0.0000
v 1.6371 -0.5656 0.0000
v 1.6371 0.3553 0.0000
v -0.8185 1.2761 0.0000
v -1.6371 1.2761 0.0000
v 0.0000 1.2761 0.0000
v 0.8185 1.2761 0.0000
v 1.6371 1.2761 0.0000
v -0.8185 2.1970 0.0000
v -1.6371 2.1970 0.0000
v 0.0000 2.1970 0.0000
v 0.8185 2.1970 0.0000
v 1.6371 2.1970 0.0000
v -0.8185 3.1178 0.0000
v -1.6371 3.1178 0.0000
v 0.0000 3.1178 0.0000
v 0.8185 3.1178 0.0000
v 1.6371 3.1178 0.0000
# 25 vertices
vn 0.0000 -0.0000 1.0000
# 1 vertex normals
vt 0.0000 0.0000 0.0000
vt 0.2500 0.0000 0.0000
vt 0.2500 0.2500 0.0000
vt 0.0000 0.2500 0.0000
vt 0.5000 0.0000 0.0000
vt 0.5000 0.2500 0.0000
vt 0.7500 0.0000 0.0000
vt 0.7500 0.2500 0.0000
vt 1.0000 0.0000 0.0000
vt 1.0000 0.2500 0.0000
vt 0.2500 0.5000 0.0000
vt 0.0000 0.5000 0.0000
vt 0.5000 0.5000 0.0000
vt 0.7500 0.5000 0.0000
vt 1.0000 0.5000 0.0000
vt 0.2500 0.7500 0.0000
vt 0.0000 0.7500 0.0000
vt 0.5000 0.7500 0.0000
vt 0.7500 0.7500 0.0000
vt 1.0000 0.7500 0.0000
vt 0.2500 1.0000 0.0000
vt 0.0000 1.0000 0.0000
vt 0.5000 1.0000 0.0000
vt 0.7500 1.0000 0.0000
vt 1.0000 1.0000 0.0000
# 25 texture coords
g fireFoam
usemtl fireFoam
s 1
f 1/1/1 2/2/1 3/3/1 4/4/1
f 2/2/1 5/5/1 6/6/1 3/3/1
f 5/5/1 7/7/1 8/8/1 6/6/1
f 7/7/1 9/9/1 10/10/1 8/8/1
f 4/4/1 3/3/1 11/11/1 12/12/1
f 3/3/1 6/6/1 13/13/1 11/11/1
f 6/6/1 8/8/1 14/14/1 13/13/1
f 8/8/1 10/10/1 15/15/1 14/14/1
f 12/12/1 11/11/1 16/16/1 17/17/1
f 11/11/1 13/13/1 18/18/1 16/16/1
f 13/13/1 14/14/1 19/19/1 18/18/1
f 14/14/1 15/15/1 20/20/1 19/19/1
f 17/17/1 16/16/1 21/21/1 22/22/1
f 16/16/1 18/18/1 23/23/1 21/21/1
f 18/18/1 19/19/1 24/24/1 23/23/1
f 19/19/1 20/20/1 25/25/1 24/24/1
# 16 polygons
...@@ -6,7 +6,7 @@ import { connect3D } from 'amos-3d/lib/designer'; ...@@ -6,7 +6,7 @@ import { connect3D } from 'amos-3d/lib/designer';
import { RiskPoint, PatrolPoint, PersonPoint3D, MonitorPoint, ProbePoint, import { RiskPoint, PatrolPoint, PersonPoint3D, MonitorPoint, ProbePoint,
FireResourcePoint, EquipmentPoint, FireCar3D, FirePoint, PointStatistics, ImpEquipmentMode } from './points'; FireResourcePoint, EquipmentPoint, FireCar3D, FirePoint, PointStatistics, ImpEquipmentMode } from './points';
import { eventTopics, isPointEvent , isLevelFilter } from './consts'; import { eventTopics, isPointEvent , isLevelFilter } from './consts';
import { parseMarkers, parseLevelFilter } from './dataProcessor'; import { parseMarkers, parseLevelFilter, changeMarkerPosition } from './dataProcessor';
const loginUserName = Store.lsTool.read('userName'); const loginUserName = Store.lsTool.read('userName');
const filterUser = ['tianbo', 'opera1', 'opera2']; const filterUser = ['tianbo', 'opera1', 'opera2'];
...@@ -50,6 +50,10 @@ class PointsPool extends Component { ...@@ -50,6 +50,10 @@ class PointsPool extends Component {
// } // }
// } // }
// }); // });
this.props.subscribe(eventTopics.point_position_change, (topic, data) => {
changeMarkerPosition(this, topic, data);
});
} }
onMarkersCreated = (type, { markersCache }) => { onMarkersCreated = (type, { markersCache }) => {
......
...@@ -22,7 +22,8 @@ import { ...@@ -22,7 +22,8 @@ import {
tirggerPlanTopic, tirggerPlanTopic,
tirggerTransTopic, tirggerTransTopic,
cacheObjsSave, cacheObjsSave,
flyToSubView flyToSubView,
convertMarkerType
} from './dataProcessor'; } from './dataProcessor';
import { import {
dealTroubleMarkers, dealTroubleMarkers,
...@@ -142,7 +143,8 @@ class View3D extends Component { ...@@ -142,7 +143,8 @@ class View3D extends Component {
type: 'region', type: 'region',
btnType: 'isOk', btnType: 'isOk',
isback: false isback: false
} },
isOutterView: true //控制进入层级后是否显示marker
}; };
getObjFromNet(view3dFile, (objs, asyncModels) => { getObjFromNet(view3dFile, (objs, asyncModels) => {
...@@ -274,6 +276,7 @@ class View3D extends Component { ...@@ -274,6 +276,7 @@ class View3D extends Component {
this.initModelDisplay(); this.initModelDisplay();
this.outlineFactory.toggleOutline([]);//清除选中 this.outlineFactory.toggleOutline([]);//清除选中
this.lensLevel = LENS_LEVEL.ROOT; this.lensLevel = LENS_LEVEL.ROOT;
this.setState({ isOutterView: true });//恢复marker显示
} }
}); });
}; };
...@@ -569,7 +572,7 @@ class View3D extends Component { ...@@ -569,7 +572,7 @@ class View3D extends Component {
treeData.forEach( t => { treeData.forEach( t => {
if (t.isRegion && t.children && t.children.length > 0){ if (t.isRegion && t.children && t.children.length > 0){
this.getPointLoop( { markers }, pointType, t.children); this.getPointLoop( { markers }, pointType, t.children);
} else if (t.position3d && !t.isRegion){ } else if (t.position3d && t.position3d.length > 0 && !t.isRegion){
t.position = t.position3d; t.position = t.position3d;
t.key = `${t.type}-${t.id}`; t.key = `${t.type}-${t.id}`;
t.label = t.name; t.label = t.name;
...@@ -1348,10 +1351,10 @@ class View3D extends Component { ...@@ -1348,10 +1351,10 @@ class View3D extends Component {
changeMarkersData = (position,type,id) => { changeMarkersData = (position,type,id) => {
const me = this; const me = this;
const { markers, selectPoints } = me.state; const { markers, selectPoints } = me.state;
const index = markers[type].findIndex(e=>e.id === id); const index = markers[convertMarkerType(type)].findIndex(e=>e.id === id && e.type === type);
if (index >= 0){ if (index >= 0){
markers[type][index].position = position; markers[convertMarkerType(type)][index].position = position;
markers[type][index].isEdit = true; markers[convertMarkerType(type)][index].isEdit = true;
selectPoints.position = position; selectPoints.position = position;
me.setState({ me.setState({
markers, markers,
...@@ -1718,7 +1721,8 @@ class View3D extends Component { ...@@ -1718,7 +1721,8 @@ class View3D extends Component {
rightHeight, rightHeight,
treeDataList, treeDataList,
promptData, promptData,
pointType pointType,
isOutterView
} = this.state; } = this.state;
const { dimension, hiddenScreenSaver, editModelChange } = this.props; const { dimension, hiddenScreenSaver, editModelChange } = this.props;
const graphicProps = { const graphicProps = {
...@@ -1813,23 +1817,12 @@ class View3D extends Component { ...@@ -1813,23 +1817,12 @@ class View3D extends Component {
> >
{startAsyncLoad && this.multLoadWorkerObjContent(asyncModels)} {startAsyncLoad && this.multLoadWorkerObjContent(asyncModels)}
{isEditMode && pageType === 'region' ? '' : {isEditMode && pageType === 'region' ? '' :
<PointsPool isOutterView && <PointsPool showRightPanelOnclick={this.showRightPanelOnclick} markers={markers} isEditMode={isEditMode} selectPoints={selectPoints} updateMarker={this.updateMarker} planStarted={alarmStarted} stagePilot={this.stagePilot} positionCtl={this.positionCtl} addMarker={this.addMarker} ref={node => this.pointsPool = node} />}
markers={markers}
isEditMode={isEditMode}
selectPoints={selectPoints}
updateMarker={this.updateMarker}
planStarted={alarmStarted}
stagePilot={this.stagePilot}
positionCtl={this.positionCtl}
addMarker={this.addMarker}
showRightPanelOnclick={this.showRightPanelOnclick}
ref={node => this.pointsPool = node}
/>}
{fireTruckRoute && <FatLine {...lineData.fatLineConf} linePath={JSON.parse(fireTruckRoute)} visible={showFireTruckRoute} />} {fireTruckRoute && <FatLine {...lineData.fatLineConf} linePath={JSON.parse(fireTruckRoute)} visible={showFireTruckRoute} />}
<FlameFire position={firePosition} width={10} height={20} depth={8} sliceSpacing={1} visible={planStarted} /> <FlameFire position={firePosition} width={10} height={20} depth={8} sliceSpacing={1} visible={planStarted} />
{isEditMode && this.renderAreas()} {isEditMode && this.renderAreas()}
{this.renderPolygonRegion(exceptionAreas)} {this.renderPolygonRegion(exceptionAreas)}
{startLoadExceptionArea && <ExceptionArea markers={exceptionMarkers} handleExceptModel={this.handleExceptModel} focusObject={this.focusObject} />} {isOutterView && startLoadExceptionArea && <ExceptionArea markers={exceptionMarkers} handleExceptModel={this.handleExceptModel} focusObject={this.focusObject} />}
</A3DDesigner> </A3DDesigner>
</div> </div>
{ isEditMode && { isEditMode &&
......
...@@ -47,7 +47,7 @@ export const eventTopics = { ...@@ -47,7 +47,7 @@ export const eventTopics = {
point_change: 'base3d.view.point_change', // marker 点变化 point_change: 'base3d.view.point_change', // marker 点变化
batch_point_change: 'base3d.view.batch_point_change', // 批量 marker 点变化 batch_point_change: 'base3d.view.batch_point_change', // 批量 marker 点变化
linkdata_change: 'base3d.view.linkdata_change', // marker 点变化 linkdata_change: 'base3d.view.linkdata_change', // marker 点变化
point_position_change: 'base3d.view.point_change', // marker 点变化 point_position_change: 'base3d.view.position_change', // markerPostion 点变化
point_patrol: 'base3d.view.point_patrol', // 巡检点 point_patrol: 'base3d.view.point_patrol', // 巡检点
point_risk: 'base3d.view.point_risk', // 风险点 point_risk: 'base3d.view.point_risk', // 风险点
......
...@@ -392,8 +392,24 @@ export const flyToSubView = (instance,obj,LENS_LEVEL) =>{ ...@@ -392,8 +392,24 @@ export const flyToSubView = (instance,obj,LENS_LEVEL) =>{
// 镜头切换 // 镜头切换
fitView && instance.cameraFactory.fitView(fitView);//视角调整为最近视角 fitView && instance.cameraFactory.fitView(fitView);//视角调整为最近视角
instance.lensLevel = LENS_LEVEL.SUB; instance.lensLevel = LENS_LEVEL.SUB;
instance.setState({ isOutterView: false });
} else { } else {
instance.focusObject(obj); instance.focusObject(obj);
} }
}; };
//改变marker坐标
export const changeMarkerPosition = (instance,obj,data) => {
const { id, type, position } = data;
(instance.markerList[convertMarkerType(type)] || []).forEach( mc => {
const extData = mc.getExtData();
if (extData.id === id && extData.type === type) {
mc.baseObjHelper.position = position;
}
});
};
export const convertMarkerType = (type) => {
const fireEquipmentStr = 'fireCar,fireEquipment,fireChamber,fireFoamRoom,hydrant,pool';
return fireEquipmentStr.indexOf(type) > -1 ? 'fireEquipment' : type ;
};
...@@ -80,11 +80,11 @@ class RightEditPointPanel extends Component { ...@@ -80,11 +80,11 @@ class RightEditPointPanel extends Component {
onChangePosition = ( inputType , value ) => { onChangePosition = ( inputType , value ) => {
let { positionX, positionY, positionZ } = this.state; let { positionX, positionY, positionZ } = this.state;
if (inputType === 'positionX'){ if (inputType === 'positionX'){
positionX = value; positionX = Number(value);
} else if (inputType === 'positionY'){ } else if (inputType === 'positionY'){
positionY = value; positionY = Number(value);
} else { } else {
positionZ = value; positionZ = Number(value);
} }
const position = [positionX,positionY,positionZ]; const position = [positionX,positionY,positionZ];
this.mreageMarkerPosition(position); this.mreageMarkerPosition(position);
...@@ -92,7 +92,7 @@ class RightEditPointPanel extends Component { ...@@ -92,7 +92,7 @@ class RightEditPointPanel extends Component {
mreageMarkerPosition = ( position ) => { mreageMarkerPosition = ( position ) => {
const { detailData } = this.state; const { detailData } = this.state;
PubSub.publish(eventTopics.point_position_change, { id: detailData.id, position }); PubSub.publish(eventTopics.point_position_change, { id: detailData.id, type: detailData.type , position });
this.props.changeMarkersData(position,detailData.type,detailData.id); this.props.changeMarkersData(position,detailData.type,detailData.id);
} }
......
...@@ -134,9 +134,9 @@ export default function marker3DFactory(WrappedComponent = 'div', options) { ...@@ -134,9 +134,9 @@ export default function marker3DFactory(WrappedComponent = 'div', options) {
obj.baseObjHelper.titleConfig = { obj.baseObjHelper.titleConfig = {
// 顶牌平面参数 // 顶牌平面参数
planeOptions: { planeOptions: {
width: 40, width: 20,
height: 20, height: 10,
position: [0, 20, 0], position: [0, 10, 0],
doubleSide: true doubleSide: true
}, },
canvasOptions: { canvasOptions: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment