Esempio n. 1
0
 def addXMLSection(self, depth, output):
     "Add the xml section for this object."
     xml_writer.addBeginXMLTag({}, depth, 'vertices', output)
     vertices = self.originalVertices
     if vertices == None:
         vertices = self.vertices
     for vertex in vertices:
         attributeTable = {
             'x': str(vertex.x),
             'y': str(vertex.y),
             'z': str(vertex.z)
         }
         xml_writer.addClosedXMLTag(attributeTable, depth + 1, 'vector3',
                                    output)
     xml_writer.addEndXMLTag(depth, 'vertices', output)
     xml_writer.addBeginXMLTag({}, depth, 'faces', output)
     for face in self.faces:
         attributeTable = {}
         for vertexIndexIndex in xrange(len(face.vertexIndexes)):
             vertexIndex = face.vertexIndexes[vertexIndexIndex]
             attributeTable['vertex' +
                            str(vertexIndexIndex)] = str(vertexIndex)
         xml_writer.addClosedXMLTag(attributeTable, depth + 1, 'face',
                                    output)
     xml_writer.addEndXMLTag(depth, 'faces', output)
Esempio n. 2
0
	def addXML( self, depth, output ):
		"Add xml for this object."
		attributeTable = self.getAttributeTable()
		attributeTable[ 'id' ] = self.getName()
		xml_writer.addBeginXMLTag( attributeTable, depth, self.getXMLClassName(), output )
		if self.matrix4X4 != None:
			self.matrix4X4.addXML( depth + 1, output )
		self.addXMLSection( depth + 1, output )
		xml_writer.addEndXMLTag( depth, self.getXMLClassName(), output )
Esempio n. 3
0
 def addXML(self, depth, output):
     "Add xml for this object."
     attributeTable = self.getAttributeTable()
     attributeTable['id'] = self.getName()
     xml_writer.addBeginXMLTag(attributeTable, depth,
                               self.getXMLClassName(), output)
     if self.matrix4X4 != None:
         self.matrix4X4.addXML(depth + 1, output)
     self.addXMLSection(depth + 1, output)
     xml_writer.addEndXMLTag(depth, self.getXMLClassName(), output)
Esempio n. 4
0
	def addXMLSection( self, depth, output ):
		"Add the xml section for this object."
		xml_writer.addBeginXMLTag( {}, depth, 'vertices', output )
		vertices = self.originalVertices
		if vertices == None:
			vertices = self.vertices
		for vertex in vertices:
			attributeTable = { 'x' : str( vertex.x ), 'y' : str( vertex.y ), 'z' : str( vertex.z ) }
			xml_writer.addClosedXMLTag( attributeTable, depth + 1, 'vector3', output )
		xml_writer.addEndXMLTag( depth, 'vertices', output )
		xml_writer.addBeginXMLTag( {}, depth, 'faces', output )
		for face in self.faces:
			attributeTable = {}
			for vertexIndexIndex in xrange( len( face.vertexIndexes ) ):
				vertexIndex = face.vertexIndexes[ vertexIndexIndex ]
				attributeTable[ 'vertex' + str( vertexIndexIndex ) ] = str( vertexIndex )
			xml_writer.addClosedXMLTag( attributeTable, depth + 1, 'face', output )
		xml_writer.addEndXMLTag( depth, 'faces', output )
Esempio n. 5
0
def getEndGeometryXMLString(output):
    "Get the string representation of this object info."
    xml_writer.addEndXMLTag(0, 'booleangeometry', output)
    return output.getvalue()
Esempio n. 6
0
def getEndGeometryXMLString( output ):
	"Get the string representation of this object info."
	xml_writer.addEndXMLTag( 0, 'booleangeometry', output )
	return output.getvalue()