• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java AbstractSurfaceData类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中org.citygml4j.model.citygml.appearance.AbstractSurfaceData的典型用法代码示例。如果您正苦于以下问题:Java AbstractSurfaceData类的具体用法?Java AbstractSurfaceData怎么用?Java AbstractSurfaceData使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

AbstractSurfaceData类属于org.citygml4j.model.citygml.appearance包,在下文中一共展示了AbstractSurfaceData类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getOrCreateX3DMaterial

点赞 3

import org.citygml4j.model.citygml.appearance.AbstractSurfaceData; //导入依赖的package包/类
private X3DMaterial getOrCreateX3DMaterial(MaterialType src, int surfaceDataId, Appearance appearance) {
	X3DMaterial dest = null;

	for (SurfaceDataProperty property : appearance.getSurfaceDataMember()) {
		AbstractSurfaceData surfaceData = property.getSurfaceData();
		if (!(surfaceData instanceof X3DMaterial))
			continue;

		X3DMaterial material = (X3DMaterial)surfaceData;
		if ((int)material.getLocalProperty(CityJSONUnmarshaller.SURFACE_DATA_ID) == surfaceDataId) {
			dest = material;
			break;
		}
	}

	if (dest == null) {
		dest = unmarshalMaterial(src);			
		dest.setLocalProperty(CityJSONUnmarshaller.SURFACE_DATA_ID, surfaceDataId);
		appearance.addSurfaceDataMember(new SurfaceDataProperty(dest));
	}

	return dest;
}
 

开发者ID:citygml4j,
项目名称:citygml4j,
代码行数:24,
代码来源:AppearanceUnmarshaller.java

示例2: getOrCreateParameterizedTexture

点赞 3

import org.citygml4j.model.citygml.appearance.AbstractSurfaceData; //导入依赖的package包/类
private ParameterizedTexture getOrCreateParameterizedTexture(TextureType src, int surfaceDataId, Appearance appearance) {
	ParameterizedTexture dest = null;

	for (SurfaceDataProperty property : appearance.getSurfaceDataMember()) {
		AbstractSurfaceData surfaceData = property.getSurfaceData();
		if (!(surfaceData instanceof ParameterizedTexture))
			continue;

		ParameterizedTexture texture = (ParameterizedTexture)surfaceData;
		if ((int)texture.getLocalProperty(CityJSONUnmarshaller.SURFACE_DATA_ID) == surfaceDataId) {
			dest = texture;
			break;
		}
	}

	if (dest == null) {
		dest = unmarshalParameterizedTexture(src);
		if (!dest.isSetImageURI())
			return null;
		
		dest.setLocalProperty(CityJSONUnmarshaller.SURFACE_DATA_ID, surfaceDataId);
		appearance.addSurfaceDataMember(new SurfaceDataProperty(dest));
	}

	return dest;
}
 

开发者ID:citygml4j,
项目名称:citygml4j,
代码行数:27,
代码来源:AppearanceUnmarshaller.java

示例3: generateAbstractSurfaceData

点赞 2

import org.citygml4j.model.citygml.appearance.AbstractSurfaceData; //导入依赖的package包/类
public static CG_AbstractSurfaceData generateAbstractSurfaceData(
    AbstractSurfaceData sD) {

  if (sD instanceof X3DMaterial) {
    return new CG_X3DMaterial((X3DMaterial) sD);
  } else if (sD instanceof AbstractTexture) {
    return CG_AbstractTexture.generateAbstractTexture((AbstractTexture) sD);
  }

  System.out.println("Classe non gérée CG_AbstractSurfaceData "
      + sD.getCityGMLClass());

  return null;
}
 

开发者ID:IGNF,
项目名称:geoxygene,
代码行数:15,
代码来源:CG_AbstractSurfaceData.java

示例4: visit

点赞 2

import org.citygml4j.model.citygml.appearance.AbstractSurfaceData; //导入依赖的package包/类
public void visit(AbstractTexture abstractTexture) {
	visit((AbstractSurfaceData)abstractTexture);

	if (abstractTexture.isSetGenericApplicationPropertyOfTexture())
		for (ADEComponent ade : abstractTexture.getGenericApplicationPropertyOfTexture())
			visit(ade);
}
 

开发者ID:3dcitydb,
项目名称:importer-exporter,
代码行数:8,
代码来源:ADEPropertyCollector.java

示例5: apply

点赞 2

import org.citygml4j.model.citygml.appearance.AbstractSurfaceData; //导入依赖的package包/类
public T apply(AbstractSurfaceData abstractSurfaceData) {
	T object = apply((AbstractFeature)abstractSurfaceData);
	if (object != null)
		return object;

	if (abstractSurfaceData.isSetGenericApplicationPropertyOfSurfaceData()) {
		for (ADEComponent ade : new ArrayList<ADEComponent>(abstractSurfaceData.getGenericApplicationPropertyOfSurfaceData())) {
			object = apply(ade);
			if (object != null)
				return object;
		}
	}		

	return null;
}
 

开发者ID:citygml4j,
项目名称:citygml4j,
代码行数:16,
代码来源:GMLFunctionWalker.java

示例6: visit

点赞 2

import org.citygml4j.model.citygml.appearance.AbstractSurfaceData; //导入依赖的package包/类
public void visit(AbstractSurfaceData abstractSurfaceData) {
	visit((AbstractFeature)abstractSurfaceData);

	if (abstractSurfaceData.isSetGenericApplicationPropertyOfSurfaceData())
		for (ADEComponent ade : new ArrayList<ADEComponent>(abstractSurfaceData.getGenericApplicationPropertyOfSurfaceData()))
			visit(ade);
}
 

开发者ID:citygml4j,
项目名称:citygml4j,
代码行数:8,
代码来源:GMLWalker.java

示例7: marshalAbstractSurfaceData

点赞 2

import org.citygml4j.model.citygml.appearance.AbstractSurfaceData; //导入依赖的package包/类
public void marshalAbstractSurfaceData(AbstractSurfaceData src, AbstractSurfaceDataType dest) {
	jaxb.getGMLMarshaller().marshalAbstractFeature(src, dest);

	if (src.isSetIsFront())
		dest.setIsFront(src.getIsFront());

	if (src.isSetGenericApplicationPropertyOfSurfaceData()) {
		for (ADEComponent adeComponent : src.getGenericApplicationPropertyOfSurfaceData()) {
			JAXBElement<Object> jaxbElement = jaxb.getADEMarshaller().marshalJAXBElement(adeComponent);
			if (jaxbElement != null)
				dest.get_GenericApplicationPropertyOfSurfaceData().add(jaxbElement);
		}
	}
}
 

开发者ID:citygml4j,
项目名称:citygml4j,
代码行数:15,
代码来源:Appearance100Marshaller.java

示例8: unmarshalAbstractSurfaceData

点赞 2

import org.citygml4j.model.citygml.appearance.AbstractSurfaceData; //导入依赖的package包/类
public void unmarshalAbstractSurfaceData(AbstractSurfaceDataType src, AbstractSurfaceData dest) throws MissingADESchemaException {
	jaxb.getGMLUnmarshaller().unmarshalAbstractFeature(src, dest);

	if (src.isSetIsFront())
		dest.setIsFront(src.isIsFront());

	if (src.isSet_GenericApplicationPropertyOfSurfaceData()) {
		for (JAXBElement<Object> elem : src.get_GenericApplicationPropertyOfSurfaceData()) {
			ADEModelObject ade = jaxb.getADEUnmarshaller().unmarshal(elem);
			if (ade != null)
				dest.addGenericApplicationPropertyOfSurfaceData(ade);
		}
	}
}
 

开发者ID:citygml4j,
项目名称:citygml4j,
代码行数:15,
代码来源:Appearance100Unmarshaller.java

示例9: unmarshalSurfaceDataProperty

点赞 2

import org.citygml4j.model.citygml.appearance.AbstractSurfaceData; //导入依赖的package包/类
public SurfaceDataProperty unmarshalSurfaceDataProperty(SurfaceDataPropertyType src) throws MissingADESchemaException {
	SurfaceDataProperty dest = new SurfaceDataProperty(module);

	if (src.isSet_SurfaceData()) {
		ModelObject surfaceData = jaxb.unmarshal(src.get_SurfaceData());
		if (surfaceData instanceof AbstractSurfaceData)
			dest.setSurfaceData((AbstractSurfaceData)surfaceData);
	}

	if (src.isSet_ADEComponent())
		dest.setGenericADEElement(jaxb.getADEUnmarshaller().unmarshal(src.get_ADEComponent()));

	if (src.isSetRemoteSchema())
		dest.setRemoteSchema(src.getRemoteSchema());

	if (src.isSetType())
		dest.setType(XLinkType.fromValue(src.getType().value()));

	if (src.isSetHref())
		dest.setHref(src.getHref());

	if (src.isSetRole())
		dest.setRole(src.getRole());

	if (src.isSetArcrole())
		dest.setArcrole(src.getArcrole());

	if (src.isSetTitle())
		dest.setTitle(src.getTitle());

	if (src.isSetShow())
		dest.setShow(XLinkShow.fromValue(src.getShow().value()));

	if (src.isSetActuate())
		dest.setActuate(XLinkActuate.fromValue(src.getActuate().value()));

	return dest;
}
 

开发者ID:citygml4j,
项目名称:citygml4j,
代码行数:39,
代码来源:Appearance100Unmarshaller.java

示例10: assignGenericProperty

点赞 2

import org.citygml4j.model.citygml.appearance.AbstractSurfaceData; //导入依赖的package包/类
public boolean assignGenericProperty(ADEGenericElement genericProperty, QName substitutionGroup, CityGML dest) {
	String name = substitutionGroup.getLocalPart();
	boolean success = true;

	if (dest instanceof AbstractSurfaceData && name.equals("_GenericApplicationPropertyOfSurfaceData"))
		((AbstractSurfaceData)dest).addGenericApplicationPropertyOfSurfaceData(genericProperty);
	else if (dest instanceof AbstractTexture && name.equals("_GenericApplicationPropertyOfTexture"))
		((AbstractTexture)dest).addGenericApplicationPropertyOfTexture(genericProperty);
	else if (dest instanceof AbstractTextureParameterization && name.equals("_GenericApplicationPropertyOfTextureParameterization"))
		((AbstractTextureParameterization)dest).addGenericApplicationPropertyOfTextureParameterization(genericProperty);
	else if (dest instanceof Appearance && name.equals("_GenericApplicationPropertyOfAppearance"))
		((Appearance)dest).addGenericApplicationPropertyOfAppearance(genericProperty);
	else if (dest instanceof GeoreferencedTexture && name.equals("_GenericApplicationPropertyOfGeoreferencedTexture"))
		((GeoreferencedTexture)dest).addGenericApplicationPropertyOfGeoreferencedTexture(genericProperty);
	else if (dest instanceof ParameterizedTexture && name.equals("_GenericApplicationPropertyOfParameterizedTexture"))
		((ParameterizedTexture)dest).addGenericApplicationPropertyOfParameterizedTexture(genericProperty);
	else if (dest instanceof TexCoordGen && name.equals("_GenericApplicationPropertyOfTexCoordGen"))
		((TexCoordGen)dest).addGenericApplicationPropertyOfTexCoordGen(genericProperty);
	else if (dest instanceof TexCoordList && name.equals("_GenericApplicationPropertyOfTexCoordList"))
		((TexCoordList)dest).addGenericApplicationPropertyOfTexCoordList(genericProperty);
	else if (dest instanceof X3DMaterial && name.equals("_GenericApplicationPropertyOfX3DMaterial"))
		((X3DMaterial)dest).addGenericApplicationPropertyOfX3DMaterial(genericProperty);
	else
		success = false;

	return success;
}
 

开发者ID:citygml4j,
项目名称:citygml4j,
代码行数:28,
代码来源:Appearance100Unmarshaller.java

示例11: CG_AbstractSurfaceData

点赞 2

import org.citygml4j.model.citygml.appearance.AbstractSurfaceData; //导入依赖的package包/类
public CG_AbstractSurfaceData(AbstractSurfaceData sD) {
  super();
  if (sD.isSetIsFront()) {
    this.setIsFront(sD.getIsFront());
  }
}
 

开发者ID:IGNF,
项目名称:geoxygene,
代码行数:7,
代码来源:CG_AbstractSurfaceData.java

示例12: visit

点赞 2

import org.citygml4j.model.citygml.appearance.AbstractSurfaceData; //导入依赖的package包/类
public void visit(AbstractSurfaceData surfaceData) {
	// do not count surface data
}
 

开发者ID:3dcitydb,
项目名称:importer-exporter,
代码行数:4,
代码来源:ExportCounter.java

示例13: CG_CityModel

点赞 1

import org.citygml4j.model.citygml.appearance.AbstractSurfaceData; //导入依赖的package包/类
public CG_CityModel(CityModel impl) {

		super();

		int nbElem = impl.getCityObjectMember().size();

		System.out.println(nbElem);

		if (impl.isSetBoundedBy()) {

			Envelope bS = impl.getBoundedBy().getEnvelope();

			if (bS.getLowerCorner() != null) {

				this.dpLL = new DirectPosition(bS.getLowerCorner().getValue().get(0),
						bS.getLowerCorner().getValue().get(1), bS.getLowerCorner().getValue().get(2));

				this.dpUR = new DirectPosition(bS.getUpperCorner().getValue().get(0),
						bS.getUpperCorner().getValue().get(1), bS.getUpperCorner().getValue().get(2));
			} else {

				List<org.citygml4j.model.gml.geometry.primitives.DirectPosition> lPos = bS.getPos();

				this.dpLL = new DirectPosition(lPos.get(0).getValue().get(0), lPos.get(0).getValue().get(1),
						lPos.get(0).getValue().get(2));

				this.dpUR = new DirectPosition(lPos.get(1).getValue().get(0), lPos.get(1).getValue().get(1),
						lPos.get(1).getValue().get(2));
			}

		}

		if (impl.isSetAppearanceMember()) {

			int nbApp = impl.getAppearanceMember().size();

			for (int i = 0; i < nbApp; i++) {

				Appearance ap = impl.getAppearanceMember().get(i).getFeature();
				if (ap.isSetSurfaceDataMember()) {

					int nbDataMember = ap.getSurfaceDataMember().size();

					for (int j = 0; j < nbDataMember; j++) {

						AbstractSurfaceData abs = ap.getSurfaceDataMember().get(j).getSurfaceData();

						this.getlCGA().add(CG_AbstractSurfaceData.generateAbstractSurfaceData(abs));

					}

				}

			}
		}
		
		int count = 0;
		
		for(CityObjectMember cityObjectMember : impl.getCityObjectMember()){
			
			CG_CityObject object = CG_CityObject.generateCityObject(cityObjectMember.getObject());
			this.add(object);
			System.out.println("Object added ("+(++count)+"/"+ nbElem+") : " + object);
			
			
		}
		
		System.out.println("The end");

	}
 

开发者ID:IGNF,
项目名称:geoxygene,
代码行数:71,
代码来源:CG_CityModel.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)