PyVMF.Vertex

class Vertex(x=0, y=0, z=0)

Corresponds to a single position on the Hammer grid

Parameters:
  • x (int or float) – x position
  • y (int or float) – y position
  • z (int or float) – z position
__init__(x=0, y=0, z=0)

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__([x, y, z]) Initialize self.
align_to_grid() Turns x, y and z into integers
copy() Copies the class using deepcopy()
diff(other)
param other:The vertex to differentiate with
divide(amount) Divides all the axes uniformly by the given amount (for separate division see divide_separate())
divide_separate(x, y, z) Divides all the axes separatedly by the given amounts (for uniform division see divide())
export() Gets all the variables than need to be exported into the .VMF file
export_children() Gets all the children classes
flip([x, y, z])
ids()
move(x, y, z) Moves the vertex by the given amount
multiply(amount) Multiplies all the axes uniformly by the given amount
rotate_x(center, angle) Rotates the vertex around the x axis
rotate_y(center, angle) Rotates the vertex around the y axis
rotate_z(center, angle) Rotates the vertex around the z axis
set(x, y, z) Sets the vertex position to the given position
similar(other[, accuracy]) Compares the current vertex with the given one to see if they are similar

Attributes

ID