/** * Indicates the accessor for texture coordinates. * * @param semantic Semantic that identifies the texture coordinates. May be null, in which case the semantic * "TEXCOORD" is used. * * @return The texture coordinates accessor, or null if the accessor cannot be resolved. */ public ColladaAccessor getTexCoordAccessor(String semantic) { if (semantic == null) { semantic = DEFAULT_TEX_COORD_SEMANTIC; } String sourceUri = null; foreach (ColladaInput input in this.getInputs()) { if (semantic.Equals(input.getSemantic())) { sourceUri = input.getSource(); break; } } if (sourceUri == null) { return(null); } ColladaSource source = (ColladaSource)this.getRoot().resolveReference(sourceUri); return((source != null) ? source.getAccessor() : null); }
public ColladaAccessor getNormalAccessor() { String sourceUri = null; foreach (ColladaInput input in this.getInputs()) { if ("NORMAL".Equals(input.getSemantic())) { sourceUri = input.getSource(); break; } } if (sourceUri == null) { return(null); } ColladaSource source = (ColladaSource)this.getRoot().resolveReference(sourceUri); return((source != null) ? source.getAccessor() : null); }
public ColladaAccessor getVertexAccessor() { String vertexUri = null; foreach (ColladaInput input in this.getInputs()) { if ("VERTEX".Equals(input.getSemantic())) { vertexUri = input.getSource(); break; } } if (vertexUri == null) { return(null); } String positionUri = null; ColladaVertices vertices = (ColladaVertices)this.getRoot().resolveReference(vertexUri); foreach (ColladaInput input in vertices.getInputs()) { if ("POSITION".Equals(input.getSemantic())) { positionUri = input.getSource(); break; } } if (positionUri == null) { return(null); } ColladaSource source = (ColladaSource)this.getRoot().resolveReference(positionUri); return((source != null) ? source.getAccessor() : null); }