/** * Assigns the new VertexDescription by adding or dropping attributes. The * Geometry will have the src description as a result. * @param src VertexDescription to assign. */ public void assignVertexDescription(VertexDescription src) { _touch(); if (src == m_description) return; _assignVertexDescriptionImpl(src); }
/** * Assigns the new VertexDescription by adding or dropping attributes. The * Geometry will have the src description as a result. * @param src VertexDescription to assign. */ public void assignVertexDescription(VertexDescription src) { _touch(); if (src == m_description) return; _assignVertexDescriptionImpl(src); }
/** * Merges the new VertexDescription by adding missing attributes from the * src. The Geometry will have a union of the current and the src * descriptions. * @param src VertexDescription to merge. */ public void mergeVertexDescription(VertexDescription src) { _touch(); if (src == m_description) return; // check if we need to do anything (if the src has same attributes) VertexDescription newdescription = VertexDescriptionDesignerImpl.getMergedVertexDescription(m_description, src); if (newdescription == m_description) return; _assignVertexDescriptionImpl(newdescription); }
/** * Merges the new VertexDescription by adding missing attributes from the * src. The Geometry will have a union of the current and the src * descriptions. * @param src VertexDescription to merge. */ public void mergeVertexDescription(VertexDescription src) { _touch(); if (src == m_description) return; // check if we need to do anything (if the src has same attributes) VertexDescription newdescription = VertexDescriptionDesignerImpl.getMergedVertexDescription(m_description, src); if (newdescription == m_description) return; _assignVertexDescriptionImpl(newdescription); }
/** * Adds a new attribute to the Geometry. * * @param semantics The VertexDescription.Semantics to add. */ public void addAttribute(int semantics) { _touch(); if (m_description.hasAttribute(semantics)) return; VertexDescription newvd = VertexDescriptionDesignerImpl.getMergedVertexDescription(m_description, semantics); _assignVertexDescriptionImpl(newvd); }
/** * Adds a new attribute to the Geometry. * * @param semantics The VertexDescription.Semantics to add. */ public void addAttribute(int semantics) { _touch(); if (m_description.hasAttribute(semantics)) return; VertexDescription newvd = VertexDescriptionDesignerImpl.getMergedVertexDescription(m_description, semantics); _assignVertexDescriptionImpl(newvd); }
/** * Drops an attribute from the Geometry. Dropping the attribute is * equivalent to setting the attribute to the default value for each vertex, * However, it is faster and the result Geometry has smaller memory * footprint and smaller size when persisted. * @param semantics The VertexDescription.Semantics to drop. */ public void dropAttribute(int semantics) { _touch(); if (!m_description.hasAttribute(semantics)) return; VertexDescription newvd = VertexDescriptionDesignerImpl.removeSemanticsFromVertexDescription(m_description, semantics); _assignVertexDescriptionImpl(newvd); }
/** * Drops an attribute from the Geometry. Dropping the attribute is * equivalent to setting the attribute to the default value for each vertex, * However, it is faster and the result Geometry has smaller memory * footprint and smaller size when persisted. * @param semantics The VertexDescription.Semantics to drop. */ public void dropAttribute(int semantics) { _touch(); if (!m_description.hasAttribute(semantics)) return; VertexDescription newvd = VertexDescriptionDesignerImpl.removeSemanticsFromVertexDescription(m_description, semantics); _assignVertexDescriptionImpl(newvd); }