ducjs
Version:
The duc 2D CAD file format is a cornerstone of our advanced design system, conceived to cater to professionals seeking precision and efficiency in their design work.
49 lines (48 loc) • 1.83 kB
JavaScript
// automatically generated by the FlatBuffers compiler, do not modify
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
import * as flatbuffers from 'flatbuffers';
export class PointBindingPoint {
constructor() {
this.bb = null;
this.bb_pos = 0;
}
__init(i, bb) {
this.bb_pos = i;
this.bb = bb;
return this;
}
static getRootAsPointBindingPoint(bb, obj) {
return (obj || new PointBindingPoint()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
static getSizePrefixedRootAsPointBindingPoint(bb, obj) {
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
return (obj || new PointBindingPoint()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
index() {
const offset = this.bb.__offset(this.bb_pos, 4);
return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;
}
offset() {
const offset = this.bb.__offset(this.bb_pos, 6);
return offset ? this.bb.readFloat64(this.bb_pos + offset) : 0.0;
}
static startPointBindingPoint(builder) {
builder.startObject(2);
}
static addIndex(builder, index) {
builder.addFieldInt32(0, index, 0);
}
static addOffset(builder, offset) {
builder.addFieldFloat64(1, offset, 0.0);
}
static endPointBindingPoint(builder) {
const offset = builder.endObject();
return offset;
}
static createPointBindingPoint(builder, index, offset) {
PointBindingPoint.startPointBindingPoint(builder);
PointBindingPoint.addIndex(builder, index);
PointBindingPoint.addOffset(builder, offset);
return PointBindingPoint.endPointBindingPoint(builder);
}
}