public String appendDiagnostics(StringBuilder builder) { builder.append("\t"); if (!isActive()) { builder.append("*"); } builder.append(name == null ? "-" : name); builder.append("\n\tComponents ["); for (SceneNodeComponent component : components) { builder.append("\n\t\t"); if (!component.isActive()) { builder.append("*"); } builder.append(component.getClass().getSimpleName()); } builder.append("]"); builder.append("\n\tChildren ["); for (SceneNode child : _childNodes) { builder.append("\n\t\t"); builder.append(child.appendDiagnostics(builder)); } builder.append("]"); return builder.toString(); }
public <T extends SceneNodeComponent> boolean hasComponent( Class<T> type, boolean includeInactive) { int typeId = ComponentType.findType(type); SceneNodeComponent value = _components.get(ComponentType.findBaseType(typeId)); return value != null && (includeInactive || value.isActive()) && isSubtype(typeId, value.componentType); }
public <T extends SceneNodeComponent> T getComponent(int typeId, boolean includeInactive) { SceneNodeComponent value = _components.get(ComponentType.findBaseType(typeId)); return value != null && (includeInactive || value.isActive()) && isSubtype(typeId, value.componentType) ? Values.<T>cast(value) : null; }
public boolean hasComponent(int typeId, boolean includeInactive) { SceneNodeComponent value = _components.get(ComponentType.findBaseType(typeId)); return value != null && (includeInactive || value.isActive()) && isSubtype(typeId, value.componentType); }