Games::LatticeGenerator::Model - The Games::LatticeGenerator::Model.
A constructor. It calls the superconstructor and adds a hash "coordinates".
The knowledge about the solids is added to the overall knowledge about the object.
Returns the amount of solids within the object.
Returns a list of planes connected to the lattice that have a common edge with the given plane.
Creates an img object (an image).
Saves an image into a file.
Adds given knowledge (Prolog facts and rules) to the description.
Returns all edges belonging to this object.
Returns all planes belonging to this object.
Sets the point coordinates. It refers to the points on the lattice (not in the 3D space!), so the points are denoted with their respective plane.
It creates two additional overlap points and calculates their coordinates.
Given an edge of a plane it determines the coordinates of the vertices of the planes adjacent to it.
Determine the coordinates of the vertices beginning at the first and second one.
Determine the coordinates of the vertices of the first visible plane (and the others).
Given a plane and its vertex (first) select randomly another vertex adjacent to it.
Creates a lattice for the given model.
Stores the knowledge about common edges of visible planes in a separate structure so that we do not need to call Prolog afterwards.
Stores the knowledge about internal angles in a separate structure.
Finds te candidates and adds them to the lattice.
Returns true if and only if the two planes are identical.
Returns the internal angle given a plane and vertex.
Checks whether a candidate can be connected to the lattice. It calculates the sum of internal angles adjacent to a vertex and responds true if and only if it is not greater than 360 degrees.
Checks whether a candidate plane can be connected to the lattice. It checks the vertex.
Checks whether a candidate plane can be connected to lattice.
Returns the vertices of an edge.
Given two planes it returns the length of the common edge.
Adds subsequent candidate planes to the lattice.
Checks whether all the planes have been connected.
Calculates an angle between two vectors (in degrees).
Calculates the distance between two points.
Activates the planes of the given sheet.
Scales the lattice.
Finds the optimal angle to rotate the active planes coordinates.
Returns the coordinate of a point.
Draws the lines of the visible planes.