添加删除控制点数量

This commit is contained in:
ljqing 2023-02-10 14:07:33 +08:00
parent c88033899b
commit da82416bd1
5 changed files with 113 additions and 25 deletions

View File

@ -1333,6 +1333,7 @@ export default class ClientConnection {
row: number, row: number,
column: number, column: number,
correction_type: number, correction_type: number,
control_point_count: number,
control_point: number, control_point: number,
x: number, x: number,
y: number y: number
@ -1342,6 +1343,7 @@ export default class ClientConnection {
row, row,
column, column,
correction_type, correction_type,
control_point_count,
control_point, control_point,
x, x,
y y
@ -1440,6 +1442,7 @@ export default class ClientConnection {
public async SetBlendingHorDensity( public async SetBlendingHorDensity(
row: number, row: number,
column: number, column: number,
control_point_count: number,
control_point: number, control_point: number,
value: number value: number
) { ) {
@ -1447,6 +1450,7 @@ export default class ClientConnection {
new Protocol.SetBlendingHorDensityRequestEntity( new Protocol.SetBlendingHorDensityRequestEntity(
row, row,
column, column,
control_point_count,
control_point, control_point,
value value
) )
@ -1456,6 +1460,7 @@ export default class ClientConnection {
public async SetBlendingVerDensity( public async SetBlendingVerDensity(
row: number, row: number,
column: number, column: number,
control_point_count: number,
control_point: number, control_point: number,
value: number value: number
) { ) {
@ -1463,6 +1468,7 @@ export default class ClientConnection {
new Protocol.SetBlendingVerDensityRequestEntity( new Protocol.SetBlendingVerDensityRequestEntity(
row, row,
column, column,
control_point_count,
control_point, control_point,
value value
) )
@ -1505,6 +1511,18 @@ export default class ClientConnection {
); );
} }
public async AddBlendingCtrlPoint(type: string, row: number, column: number, count: number) {
return await this.doRpc<Protocol.GetBlendingConfigResponseEntity>(
new Protocol.AddBlendingCtrlPointRequestEntity(type, row, column, count)
);
}
public async DelBlendingCtrlPoint(type: string, row: number, column: number, count: number) {
return await this.doRpc<Protocol.GetBlendingConfigResponseEntity>(
new Protocol.DelBlendingCtrlPointRequestEntity(type, row, column, count)
);
}
public destory() { public destory() {
this.ws?.close(); this.ws?.close();
if (this.ws) { if (this.ws) {

View File

@ -327,6 +327,7 @@ export default defineComponent({
set?.SetBlendingVerDensity( set?.SetBlendingVerDensity(
$store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[0],
$store.getters.GetTheCurrentlySelectedCamera[1], $store.getters.GetTheCurrentlySelectedCamera[1],
5,
-1, 0 -1, 0
); );
}; };
@ -341,6 +342,7 @@ export default defineComponent({
set?.SetBlendingHorDensity( set?.SetBlendingHorDensity(
$store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[0],
$store.getters.GetTheCurrentlySelectedCamera[1], $store.getters.GetTheCurrentlySelectedCamera[1],
5,
index - 5 + 1, index - 5 + 1,
Number(value[index].x) Number(value[index].x)
); );
@ -353,6 +355,7 @@ export default defineComponent({
set?.SetBlendingVerDensity( set?.SetBlendingVerDensity(
$store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[0],
$store.getters.GetTheCurrentlySelectedCamera[1], $store.getters.GetTheCurrentlySelectedCamera[1],
5,
index + 1, index + 1,
Number(value[index].y) Number(value[index].y)
); );
@ -470,6 +473,7 @@ export default defineComponent({
set?.SetBlendingVerDensity( set?.SetBlendingVerDensity(
$store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[0],
$store.getters.GetTheCurrentlySelectedCamera[1], $store.getters.GetTheCurrentlySelectedCamera[1],
5,
index+1, index+1,
Number(value) Number(value)
); );
@ -478,6 +482,7 @@ export default defineComponent({
set?.SetBlendingHorDensity( set?.SetBlendingHorDensity(
$store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[0],
$store.getters.GetTheCurrentlySelectedCamera[1], $store.getters.GetTheCurrentlySelectedCamera[1],
5,
index>4?index-4:index+1, index>4?index-4:index+1,
Number(value) Number(value)
); );

View File

@ -310,7 +310,7 @@ export default defineComponent({
set?.setBlendingCorrection( set?.setBlendingCorrection(
$store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[0],
$store.getters.GetTheCurrentlySelectedCamera[1], $store.getters.GetTheCurrentlySelectedCamera[1],
4, 4, 4,
1, 1,
Number(newVal.x), Number(newVal.x),
Number(newVal.y) Number(newVal.y)
@ -338,7 +338,7 @@ export default defineComponent({
set?.setBlendingCorrection( set?.setBlendingCorrection(
$store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[0],
$store.getters.GetTheCurrentlySelectedCamera[1], $store.getters.GetTheCurrentlySelectedCamera[1],
4, 4, 4,
2, 2,
Number(newVal.x), Number(newVal.x),
Number(newVal.y) Number(newVal.y)
@ -366,7 +366,7 @@ export default defineComponent({
set?.setBlendingCorrection( set?.setBlendingCorrection(
$store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[0],
$store.getters.GetTheCurrentlySelectedCamera[1], $store.getters.GetTheCurrentlySelectedCamera[1],
4, 4, 4,
3, 3,
Number(newVal.x), Number(newVal.x),
Number(newVal.y) Number(newVal.y)
@ -396,7 +396,7 @@ export default defineComponent({
set?.setBlendingCorrection( set?.setBlendingCorrection(
$store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[0],
$store.getters.GetTheCurrentlySelectedCamera[1], $store.getters.GetTheCurrentlySelectedCamera[1],
4, 4, 4,
4, 4,
Number(newVal.x), Number(newVal.x),
Number(newVal.y) Number(newVal.y)
@ -500,7 +500,7 @@ export default defineComponent({
set?.setBlendingCorrection( set?.setBlendingCorrection(
$store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[0],
$store.getters.GetTheCurrentlySelectedCamera[1], $store.getters.GetTheCurrentlySelectedCamera[1],
4, 4, 4,
index + 1, index + 1,
Number(config.point4[index].def_x), Number(config.point4[index].def_x),
Number(config.point4[index].def_y) Number(config.point4[index].def_y)
@ -520,7 +520,7 @@ export default defineComponent({
set?.setBlendingCorrection( set?.setBlendingCorrection(
$store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[0],
$store.getters.GetTheCurrentlySelectedCamera[1], $store.getters.GetTheCurrentlySelectedCamera[1],
4, 0, 0, 0 4, 4, 0, 0, 0
); );
}; };

View File

@ -543,7 +543,7 @@ export default defineComponent({
set?.setBlendingCorrection( set?.setBlendingCorrection(
$store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[0],
$store.getters.GetTheCurrentlySelectedCamera[1], $store.getters.GetTheCurrentlySelectedCamera[1],
9, 9, 9,
index + 1, index + 1,
Number(config.point9[index].def_x), Number(config.point9[index].def_x),
Number(config.point9[index].def_y) Number(config.point9[index].def_y)
@ -562,7 +562,7 @@ export default defineComponent({
set?.setBlendingCorrection( set?.setBlendingCorrection(
$store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[0],
$store.getters.GetTheCurrentlySelectedCamera[1], $store.getters.GetTheCurrentlySelectedCamera[1],
9, 0, 0, 0 9, 9, 0, 0, 0
); );
}; };
watch( watch(
@ -572,7 +572,7 @@ export default defineComponent({
set?.setBlendingCorrection( set?.setBlendingCorrection(
$store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[0],
$store.getters.GetTheCurrentlySelectedCamera[1], $store.getters.GetTheCurrentlySelectedCamera[1],
9, 9, 9,
1, 1,
Number(newVal.x), Number(newVal.x),
Number(newVal.y) Number(newVal.y)
@ -594,7 +594,7 @@ export default defineComponent({
set?.setBlendingCorrection( set?.setBlendingCorrection(
$store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[0],
$store.getters.GetTheCurrentlySelectedCamera[1], $store.getters.GetTheCurrentlySelectedCamera[1],
9, 9, 9,
2, 2,
Number(newVal.x), Number(newVal.x),
Number(newVal.y) Number(newVal.y)
@ -616,7 +616,7 @@ export default defineComponent({
set?.setBlendingCorrection( set?.setBlendingCorrection(
$store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[0],
$store.getters.GetTheCurrentlySelectedCamera[1], $store.getters.GetTheCurrentlySelectedCamera[1],
9, 9, 9,
3, 3,
Number(newVal.x), Number(newVal.x),
Number(newVal.y) Number(newVal.y)
@ -637,7 +637,7 @@ export default defineComponent({
set?.setBlendingCorrection( set?.setBlendingCorrection(
$store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[0],
$store.getters.GetTheCurrentlySelectedCamera[1], $store.getters.GetTheCurrentlySelectedCamera[1],
9, 9, 9,
4, 4,
Number(newVal.x), Number(newVal.x),
Number(newVal.y) Number(newVal.y)
@ -658,7 +658,7 @@ export default defineComponent({
set?.setBlendingCorrection( set?.setBlendingCorrection(
$store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[0],
$store.getters.GetTheCurrentlySelectedCamera[1], $store.getters.GetTheCurrentlySelectedCamera[1],
9, 9, 9,
5, 5,
Number(newVal.x), Number(newVal.x),
Number(newVal.y) Number(newVal.y)
@ -679,7 +679,7 @@ export default defineComponent({
set?.setBlendingCorrection( set?.setBlendingCorrection(
$store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[0],
$store.getters.GetTheCurrentlySelectedCamera[1], $store.getters.GetTheCurrentlySelectedCamera[1],
9, 9, 9,
6, 6,
Number(newVal.x), Number(newVal.x),
Number(newVal.y) Number(newVal.y)
@ -700,7 +700,7 @@ export default defineComponent({
set?.setBlendingCorrection( set?.setBlendingCorrection(
$store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[0],
$store.getters.GetTheCurrentlySelectedCamera[1], $store.getters.GetTheCurrentlySelectedCamera[1],
9, 9, 9,
7, 7,
Number(newVal.x), Number(newVal.x),
Number(newVal.y) Number(newVal.y)
@ -721,7 +721,7 @@ export default defineComponent({
set?.setBlendingCorrection( set?.setBlendingCorrection(
$store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[0],
$store.getters.GetTheCurrentlySelectedCamera[1], $store.getters.GetTheCurrentlySelectedCamera[1],
9, 9, 9,
8, 8,
Number(newVal.x), Number(newVal.x),
Number(newVal.y) Number(newVal.y)
@ -742,7 +742,7 @@ export default defineComponent({
set?.setBlendingCorrection( set?.setBlendingCorrection(
$store.getters.GetTheCurrentlySelectedCamera[0], $store.getters.GetTheCurrentlySelectedCamera[0],
$store.getters.GetTheCurrentlySelectedCamera[1], $store.getters.GetTheCurrentlySelectedCamera[1],
9, 9, 9,
9, 9,
Number(newVal.x), Number(newVal.x),
Number(newVal.y) Number(newVal.y)

View File

@ -535,6 +535,12 @@ export namespace Protocol {
public static get kDeleteBlendingScene() { public static get kDeleteBlendingScene() {
return Commands.PROTOCOL_PREFIX + "DeleteBlendingScene"; return Commands.PROTOCOL_PREFIX + "DeleteBlendingScene";
} }
public static get kAddBlendingCtrlPoint() {
return Commands.PROTOCOL_PREFIX + "AddBlendingCtrlPoint";
}
public static get kDelBlendingCtrlPoint() {
return Commands.PROTOCOL_PREFIX + "DelBlendingCtrlPoint";
}
static _all_commands = new Set([ static _all_commands = new Set([
Commands.kUnKnowCommand, Commands.kUnKnowCommand,
@ -671,6 +677,8 @@ export namespace Protocol {
Commands.kEnumBlendingScene, Commands.kEnumBlendingScene,
Commands.kApplyBlendingScene, Commands.kApplyBlendingScene,
Commands.kDeleteBlendingScene, Commands.kDeleteBlendingScene,
Commands.kAddBlendingCtrlPoint,
Commands.kDelBlendingCtrlPoint,
]); ]);
public static get AllCommands() { public static get AllCommands() {
return this._all_commands; return this._all_commands;
@ -3242,6 +3250,7 @@ export namespace Protocol {
row: number, row: number,
column: number, column: number,
correction_type: number, correction_type: number,
control_point_count: number,
control_point: number, control_point: number,
x: number, x: number,
y: number, y: number,
@ -3256,12 +3265,14 @@ export namespace Protocol {
this.y = y ?? 0; this.y = y ?? 0;
this.row = row ?? 0; this.row = row ?? 0;
this.column = column ?? 0; this.column = column ?? 0;
this.correction_type = correction_type ?? 0; this.correction_type = correction_type ?? 0;
this.control_point_count = control_point_count ?? 0;
this.control_point = control_point ?? 0; this.control_point = control_point ?? 0;
} }
row = 0; row = 0;
column = 0; column = 0;
correction_type = 0; //4四点校正9曲面校正 correction_type = 0; //4四点校正9曲面校正
control_point_count = 0;
control_point = 0; //控制点编号1开始从上到下从左到右 control_point = 0; //控制点编号1开始从上到下从左到右
x = 0; x = 0;
y = 0; y = 0;
@ -3432,7 +3443,8 @@ export namespace Protocol {
export class SetBlendingHorDensityRequestEntity extends PacketEntity { export class SetBlendingHorDensityRequestEntity extends PacketEntity {
constructor( constructor(
row: number, row: number,
column: number, column: number,
control_point_count: number,
control_point: number, control_point: number,
value: number, value: number,
rpc_id = 0 rpc_id = 0
@ -3443,12 +3455,14 @@ export namespace Protocol {
super.rpc_id = rpc_id; super.rpc_id = rpc_id;
this.row = row ?? 0; this.row = row ?? 0;
this.column = column ?? 0; this.column = column ?? 0;
this.control_point_count = control_point_count ?? 0;
this.control_point = control_point ?? 0; this.control_point = control_point ?? 0;
this.value = value ?? 0; this.value = value ?? 0;
} }
row = 0; row = 0;
column = 0; column = 0;
control_point_count = 0;
control_point = 0; //控制点编号1开始从上到下从左到右 control_point = 0; //控制点编号1开始从上到下从左到右
value = 0; value = 0;
} }
@ -3456,7 +3470,8 @@ export namespace Protocol {
export class SetBlendingVerDensityRequestEntity extends PacketEntity { export class SetBlendingVerDensityRequestEntity extends PacketEntity {
constructor( constructor(
row: number, row: number,
column: number, column: number,
control_point_count: number,
control_point: number, control_point: number,
value: number, value: number,
rpc_id = 0 rpc_id = 0
@ -3467,12 +3482,14 @@ export namespace Protocol {
super.rpc_id = rpc_id; super.rpc_id = rpc_id;
this.row = row ?? 0; this.row = row ?? 0;
this.column = column ?? 0; this.column = column ?? 0;
this.control_point_count = control_point_count ?? 0;
this.control_point = control_point ?? 0; this.control_point = control_point ?? 0;
this.value = value ?? 0; this.value = value ?? 0;
} }
row = 0; row = 0;
column = 0; column = 0;
control_point_count = 0;
control_point = 0; //控制点编号1开始从上到下从左到右 control_point = 0; //控制点编号1开始从上到下从左到右
value = 0; value = 0;
} }
@ -3555,4 +3572,52 @@ export namespace Protocol {
} }
name; name;
} }
export class AddBlendingCtrlPointRequestEntity extends PacketEntity {
constructor(
type: string,
row: number,
column: number,
count: number,
rpc_id = 0
) {
super();
super.command = Commands.kAddBlendingCtrlPoint;
super.flag = PacketEntity.FLAG_REQUEST;
super.rpc_id = rpc_id;
this.type = type ?? "";
this.row = row ?? 0;
this.column = column ?? 0;
this.count = count ?? 0;
}
type; //ver_density:垂直疏密hor_density:水平疏密9曲面
row = 0;
column = 0;
count = 0; //控制点数量
}
export class DelBlendingCtrlPointRequestEntity extends PacketEntity {
constructor(
type: string,
row: number,
column: number,
count: number,
rpc_id = 0
) {
super();
super.command = Commands.kDelBlendingCtrlPoint;
super.flag = PacketEntity.FLAG_REQUEST;
super.rpc_id = rpc_id;
this.type = type ?? "";
this.row = row ?? 0;
this.column = column ?? 0;
this.count = count ?? 0;
}
type; //ver_density:垂直疏密hor_density:水平疏密9曲面
row = 0;
column = 0;
count = 0; //控制点数量
}
} }