- NAME
- VERSION
- SUBROUTINES/METHODS
- new
- add_knowledge_about_solids
- get_amount_of_solids
- get_candidates
- create_png
- save_png
- add_knowledge
- get_edges
- get_planes
- set_the_point_coordinates
- make_decision_whether_to_do_an_overlap
- determine_the_coordinates_of_additional_points_for_overlaps
- determine_the_coordinates_of_planes_adjacent_to_the_edge
- determine_the_coordinates_beginning_at
- determine_the_coordinates
- select_the_second_point_when_determining_the_coordinates
- create_a_lattice
- find_common_edges
- find_internal_angles
- add_to_lattice
- get_common_edge
- get_vertex_planes_if_candidate_is_connected
- get_is_connected_with
- get_internal_angle
- get_can_candidate_be_connected_to_lattice_check_vertex_and_plane
- get_can_candidate_be_connected_to_lattice_check_vertex
- get_can_candidate_be_connected_to_lattice
- get_common_edge_vertices
- get_common_edge_length
- add_to_lattice_subsequent_candidates
- get_have_all_planes_been_connected
- get_angle_between_vectors
- get_distance
- activate_the_planes_of
- scale_the_lattice
- rotate_lattice_optimally
- get_coordinate
- draw_overlap_lines
- draw_lines

# NAME

Games::LatticeGenerator::Model - The Games::LatticeGenerator::Model.

# VERSION

Version 0.01

# SUBROUTINES/METHODS

## new

A constructor. It calls the superconstructor and adds a hash "coordinates".

## add_knowledge_about_solids

The knowledge about the solids is added to the overall knowledge about the object.

## get_amount_of_solids

Returns the amount of solids within the object.

## get_candidates

Returns a list of planes connected to the lattice that have a common edge with the given plane.

## create_png

Creates an img object (an image).

## save_png

Saves an image into a file.

## add_knowledge

Adds given knowledge (Prolog facts and rules) to the description.

## get_edges

Returns all edges belonging to this object.

## get_planes

Returns all planes belonging to this object.

## set_the_point_coordinates

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.

## make_decision_whether_to_do_an_overlap

## determine_the_coordinates_of_additional_points_for_overlaps

It creates two additional overlap points and calculates their coordinates.

## determine_the_coordinates_of_planes_adjacent_to_the_edge

Given an edge of a plane it determines the coordinates of the vertices of the planes adjacent to it.

## determine_the_coordinates_beginning_at

Determine the coordinates of the vertices beginning at the first and second one.

## determine_the_coordinates

Determine the coordinates of the vertices of the first visible plane (and the others).

## select_the_second_point_when_determining_the_coordinates

Given a plane and its vertex (first) select randomly another vertex adjacent to it.

## create_a_lattice

Creates a lattice for the given model.

## find_common_edges

Stores the knowledge about common edges of visible planes in a separate structure so that we do not need to call Prolog afterwards.

## find_internal_angles

Stores the knowledge about internal angles in a separate structure.

## add_to_lattice

Finds te candidates and adds them to the lattice.

## get_common_edge

## get_vertex_planes_if_candidate_is_connected

## get_is_connected_with

Returns true if and only if the two planes are identical.

## get_internal_angle

Returns the internal angle given a plane and vertex.

## get_can_candidate_be_connected_to_lattice_check_vertex_and_plane

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.

## get_can_candidate_be_connected_to_lattice_check_vertex

Checks whether a candidate plane can be connected to the lattice. It checks the vertex.

## get_can_candidate_be_connected_to_lattice

Checks whether a candidate plane can be connected to lattice.

## get_common_edge_vertices

Returns the vertices of an edge.

## get_common_edge_length

Given two planes it returns the length of the common edge.

## add_to_lattice_subsequent_candidates

Adds subsequent candidate planes to the lattice.

## get_have_all_planes_been_connected

Checks whether all the planes have been connected.

## get_angle_between_vectors

Calculates an angle between two vectors (in degrees).

## get_distance

Calculates the distance between two points.

## activate_the_planes_of

Activates the planes of the given sheet.

## scale_the_lattice

Scales the lattice.

## rotate_lattice_optimally

Finds the optimal angle to rotate the active planes coordinates.

## get_coordinate

Returns the coordinate of a point.

## draw_overlap_lines

## draw_lines

Draws the lines of the visible planes.