projects/angular-cesium/src/lib/angular-cesium-widgets/models/edit-arc.ts
Properties |
Methods |
|
Accessors |
constructor(entityId: string, center: Cartesian3, radius: number, delta: number, angle: number, _arcProps: PolylineProps)
|
|||||||||||||||||||||
Parameters :
|
Private _angle |
_angle:
|
Type : number
|
Private _center |
_center:
|
Type : Cartesian3
|
Private _delta |
_delta:
|
Type : number
|
Private _radius |
_radius:
|
Type : number
|
Static counter |
counter:
|
Type : number
|
Default value : 0
|
Private editedEntityId |
editedEntityId:
|
Type : string
|
Private id |
id:
|
Type : string
|
Private generateId |
generateId()
|
Returns :
string
|
getId |
getId()
|
Returns :
string
|
updateCenter | ||||||
updateCenter(center: Cartesian3)
|
||||||
Parameters :
Returns :
void
|
Static create | ||||||||
create(json?: any)
|
||||||||
Inherited from
AcEntity
|
||||||||
Defined in AcEntity:18
|
||||||||
Creates entity from a json
Parameters :
Returns :
any
entity as AcEntity |
props | ||||
getprops()
|
||||
setprops(props)
|
||||
Parameters :
Returns :
void
|
angle | ||||||
getangle()
|
||||||
setangle(value: number)
|
||||||
Parameters :
Returns :
void
|
delta | ||||||
getdelta()
|
||||||
setdelta(value: number)
|
||||||
Parameters :
Returns :
void
|
radius | ||||||
getradius()
|
||||||
setradius(value: number)
|
||||||
Parameters :
Returns :
void
|
center | ||||
getcenter()
|
||||
setcenter(value)
|
||||
Parameters :
Returns :
void
|
import { AcEntity } from '../../angular-cesium/models/ac-entity';
import { Cartesian3 } from '../../angular-cesium/models/cartesian3';
import { PolylineProps } from './polyline-edit-options';
export class EditArc extends AcEntity {
static counter = 0;
private id: string;
private editedEntityId: string;
private _center: Cartesian3;
private _radius: number;
private _delta: number;
private _angle: number;
constructor(entityId: string, center: Cartesian3, radius: number, delta: number, angle: number, private _arcProps: PolylineProps) {
super();
this.id = this.generateId();
this.editedEntityId = entityId;
this._center = center;
this._radius = radius;
this._delta = delta;
this._angle = angle;
}
get props() {
return this._arcProps;
}
set props(props: PolylineProps) {
this._arcProps = props;
}
get angle(): number {
return this._angle;
}
set angle(value: number) {
this._angle = value;
}
get delta(): number {
return this._delta;
}
set delta(value: number) {
this._delta = value;
}
get radius(): number {
return this._radius;
}
set radius(value: number) {
this._radius = value;
}
get center(): Cartesian3 {
return this._center;
}
set center(value: Cartesian3) {
this._center = value;
}
updateCenter(center: Cartesian3) {
this._center.x = center.x;
this._center.y = center.y;
this._center.z = center.z;
}
getId(): string {
return this.id;
}
private generateId(): string {
return 'edit-arc-' + EditArc.counter++;
}
}