本文整理汇总了Java中org.bimserver.models.ifc2x3tc1.IfcRelDecomposes.getRelatedObjects方法的典型用法代码示例。如果您正苦于以下问题:Java IfcRelDecomposes.getRelatedObjects方法的具体用法?Java IfcRelDecomposes.getRelatedObjects怎么用?Java IfcRelDecomposes.getRelatedObjects使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.bimserver.models.ifc2x3tc1.IfcRelDecomposes
的用法示例。
在下文中一共展示了IfcRelDecomposes.getRelatedObjects方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: writeIfcTreeDecomposedBy
import org.bimserver.models.ifc2x3tc1.IfcRelDecomposes; //导入方法依赖的package包/类
/**
* Writes the list of {@Link IfcObject}s that decomposes another parent {@Link IfcObject}.
*
* @param jsonWriter
* @param objectDefinition The parent {@Link IfcObject}.
* @throws IOException
*/
private void writeIfcTreeDecomposedBy(JsonWriter jsonWriter, IfcObjectDefinition objectDefinition)
throws IOException {
EList<IfcRelDecomposes> relList = objectDefinition.getIsDecomposedBy();
if (relList != null && !relList.isEmpty()) {
jsonWriter.name("decomposedBy").beginArray();
for (IfcRelDecomposes rel : relList) {
EList<IfcObjectDefinition> relatedObjects = rel.getRelatedObjects();
for (IfcObjectDefinition relatedObject : relatedObjects) {
if (relatedObject instanceof IfcObject) {
writeIfcTreeObject(jsonWriter, (IfcObject) relatedObject);
}
}
}
jsonWriter.endArray();
}
}
示例2: buildSceneGraphFor
import org.bimserver.models.ifc2x3tc1.IfcRelDecomposes; //导入方法依赖的package包/类
private void buildSceneGraphFor(IfcObjectDefinition spatialParent, BranchGroup sceneParent) {
for (IfcRelDecomposes relation : spatialParent.getIsDecomposedBy()) {
for (IfcObjectDefinition spatialChild : relation.getRelatedObjects()) {
BranchGroup sceneChild = createdBranchGroupFor(spatialChild);
sceneParent.addChild(sceneChild);
buildSceneGraphFor(spatialChild, sceneChild);
}
}
}
示例3: getDecomposition
import org.bimserver.models.ifc2x3tc1.IfcRelDecomposes; //导入方法依赖的package包/类
public static List<IfcProduct> getDecomposition(IfcBuildingStorey ifcBuildingStorey) {
List<IfcProduct> list = new ArrayList<>();
for (IfcRelDecomposes ifcRelDecomposes : ifcBuildingStorey.getIsDecomposedBy()) {
for (IfcObjectDefinition ifcObjectDefinition : ifcRelDecomposes.getRelatedObjects()) {
if (ifcObjectDefinition instanceof IfcProduct) {
list.add((IfcProduct) ifcObjectDefinition);
}
}
}
return list;
}