private SMFHeader( SMFTriangles triangles, long vertexCount, SMFSchemaIdentifier schemaIdentifier, SMFCoordinateSystem coordinateSystem, List<SMFAttribute> attributesInOrder, long metaCount) { this.triangles = Objects.requireNonNull(triangles, "triangles"); this.vertexCount = vertexCount; this.schemaIdentifier = Objects.requireNonNull(schemaIdentifier, "schemaIdentifier"); this.coordinateSystem = Objects.requireNonNull(coordinateSystem, "coordinateSystem"); this.attributesInOrder = attributesInOrder_from(attributesInOrder); this.metaCount = metaCount; initShim.setVertexCount(this.vertexCount); initShim.setMetaCount(this.metaCount); this.attributesByName = initShim.attributesByName(); this.initShim = null; }
long metaCount() { if (metaCountBuildStage == STAGE_INITIALIZING) throw new IllegalStateException(formatInitCycleMessage()); if (metaCountBuildStage == STAGE_UNINITIALIZED) { metaCountBuildStage = STAGE_INITIALIZING; this.metaCount = metaCountInitialize(); metaCountBuildStage = STAGE_INITIALIZED; } return this.metaCount; }
private SMFHeader( SMFTriangles triangles, long vertexCount, Optional<SMFSchemaIdentifier> schemaIdentifier, SMFCoordinateSystem coordinateSystem, List<SMFAttribute> attributesInOrder) { this.triangles = Objects.requireNonNull(triangles, "triangles"); this.vertexCount = vertexCount; this.schemaIdentifier = schemaIdentifier.orElse(null); this.coordinateSystem = Objects.requireNonNull(coordinateSystem, "coordinateSystem"); this.attributesInOrder = attributesInOrder_from(attributesInOrder); initShim.setTriangles(this.triangles); initShim.setVertexCount(this.vertexCount); initShim.setCoordinateSystem(this.coordinateSystem); this.attributesByName = initShim.attributesByName(); this.initShim = null; }
private SMFHeader( SMFHeader original, SMFTriangles triangles, long vertexCount, SMFSchemaIdentifier schemaIdentifier, SMFCoordinateSystem coordinateSystem, List<SMFAttribute> attributesInOrder, long metaCount) { this.triangles = triangles; this.vertexCount = vertexCount; this.schemaIdentifier = schemaIdentifier; this.coordinateSystem = coordinateSystem; this.attributesInOrder = attributesInOrder; this.metaCount = metaCount; initShim.setVertexCount(this.vertexCount); initShim.setMetaCount(this.metaCount); this.attributesByName = initShim.attributesByName(); this.initShim = null; }
private SMFHeader(SMFHeader.Builder builder) { this.schemaIdentifier = builder.schemaIdentifier; this.attributesInOrder = builder.attributesInOrder_build(); if (builder.triangles != null) { initShim.setTriangles(builder.triangles); } if (builder.vertexCountIsSet()) { initShim.setVertexCount(builder.vertexCount); } if (builder.coordinateSystem != null) { initShim.setCoordinateSystem(builder.coordinateSystem); } this.triangles = initShim.triangles(); this.vertexCount = initShim.vertexCount(); this.coordinateSystem = initShim.coordinateSystem(); this.attributesByName = initShim.attributesByName(); this.initShim = null; }
private SMFHeader( SMFHeader original, SMFTriangles triangles, long vertexCount, SMFSchemaIdentifier schemaIdentifier, SMFCoordinateSystem coordinateSystem, List<SMFAttribute> attributesInOrder) { this.triangles = triangles; this.vertexCount = vertexCount; this.schemaIdentifier = schemaIdentifier; this.coordinateSystem = coordinateSystem; this.attributesInOrder = attributesInOrder; initShim.setTriangles(this.triangles); initShim.setVertexCount(this.vertexCount); initShim.setCoordinateSystem(this.coordinateSystem); this.attributesByName = initShim.attributesByName(); this.initShim = null; }
private SMFHeader(SMFHeader.Builder builder) { this.triangles = builder.triangles; this.schemaIdentifier = builder.schemaIdentifier; this.coordinateSystem = builder.coordinateSystem; this.attributesInOrder = builder.attributesInOrder_build(); if (builder.vertexCountIsSet()) { initShim.setVertexCount(builder.vertexCount); } if (builder.metaCountIsSet()) { initShim.setMetaCount(builder.metaCount); } this.vertexCount = initShim.vertexCount(); this.metaCount = initShim.metaCount(); this.attributesByName = initShim.attributesByName(); this.initShim = null; }
SortedMap<SMFAttributeName, SMFAttribute> attributesByName() { if (attributesByNameBuildStage == STAGE_INITIALIZING) throw new IllegalStateException(formatInitCycleMessage()); if (attributesByNameBuildStage == STAGE_UNINITIALIZED) { attributesByNameBuildStage = STAGE_INITIALIZING; this.attributesByName = Objects.requireNonNull(attributesByNameInitialize(), "attributesByName"); attributesByNameBuildStage = STAGE_INITIALIZED; } return this.attributesByName; }
long vertexCount() { if (vertexCountBuildStage == STAGE_INITIALIZING) throw new IllegalStateException(formatInitCycleMessage()); if (vertexCountBuildStage == STAGE_UNINITIALIZED) { vertexCountBuildStage = STAGE_INITIALIZING; this.vertexCount = vertexCountInitialize(); vertexCountBuildStage = STAGE_INITIALIZED; } return this.vertexCount; }
SMFTriangles triangles() { if (trianglesBuildStage == STAGE_INITIALIZING) throw new IllegalStateException(formatInitCycleMessage()); if (trianglesBuildStage == STAGE_UNINITIALIZED) { trianglesBuildStage = STAGE_INITIALIZING; this.triangles = Objects.requireNonNull(trianglesInitialize(), "triangles"); trianglesBuildStage = STAGE_INITIALIZED; } return this.triangles; }
/** * @return The number of vertices in the file */ @Override public long vertexCount() { InitShim shim = this.initShim; return shim != null ? shim.vertexCount() : this.vertexCount; }
/** * @return The attributes by name */ @Override public SortedMap<SMFAttributeName, SMFAttribute> attributesByName() { InitShim shim = this.initShim; return shim != null ? shim.attributesByName() : this.attributesByName; }
/** * @return The number of metadata elements in the file */ @Override public long metaCount() { InitShim shim = this.initShim; return shim != null ? shim.metaCount() : this.metaCount; }
long vertexCount() { if (vertexCountBuildStage == STAGE_INITIALIZING) throw new IllegalStateException(formatInitCycleMessage()); if (vertexCountBuildStage == STAGE_UNINITIALIZED) { vertexCountBuildStage = STAGE_INITIALIZING; this.vertexCount = vertexCountInitialize(); vertexCountBuildStage = STAGE_INITIALIZED; } return this.vertexCount; }
SortedMap<SMFAttributeName, SMFAttribute> attributesByName() { if (attributesByNameBuildStage == STAGE_INITIALIZING) throw new IllegalStateException(formatInitCycleMessage()); if (attributesByNameBuildStage == STAGE_UNINITIALIZED) { attributesByNameBuildStage = STAGE_INITIALIZING; this.attributesByName = Objects.requireNonNull(attributesByNameInitialize(), "attributesByName"); attributesByNameBuildStage = STAGE_INITIALIZED; } return this.attributesByName; } private long metaCount;
SMFCoordinateSystem coordinateSystem() { if (coordinateSystemBuildStage == STAGE_INITIALIZING) throw new IllegalStateException(formatInitCycleMessage()); if (coordinateSystemBuildStage == STAGE_UNINITIALIZED) { coordinateSystemBuildStage = STAGE_INITIALIZING; this.coordinateSystem = Objects.requireNonNull(coordinateSystemInitialize(), "coordinateSystem"); coordinateSystemBuildStage = STAGE_INITIALIZED; } return this.coordinateSystem; }
/** * @return The number of vertices in the file */ @Override public long vertexCount() { InitShim shim = this.initShim; return shim != null ? shim.vertexCount() : this.vertexCount; }
/** * @return The coordinate system of the mesh data */ @Override public SMFCoordinateSystem coordinateSystem() { InitShim shim = this.initShim; return shim != null ? shim.coordinateSystem() : this.coordinateSystem; }
/** * @return The triangle information for the file */ @Override public SMFTriangles triangles() { InitShim shim = this.initShim; return shim != null ? shim.triangles() : this.triangles; }
/** * @return The attributes by name */ @Override public SortedMap<SMFAttributeName, SMFAttribute> attributesByName() { InitShim shim = this.initShim; return shim != null ? shim.attributesByName() : this.attributesByName; }