Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | private | :: | itype | = | 0 | ||
type(cylinder), | private, | pointer | :: | my_cylinder | => | null() | |
type(plane), | private, | pointer | :: | my_plane | => | null() | |
logical, | private | :: | set | = | .false. |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(surface), | intent(inout) | :: | this_surface |
Returns the point on a surface that is closest to the given point
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(surface), | intent(in) | :: | this_surface | |||
type(vector), | intent(in) | :: | point |
moves the given vertex onto the closest point on the surface
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(surface), | intent(in) | :: | this_surface | |||
type(vertex), | intent(inout) | :: | vtx |
Move a surface by translating it in 3D space
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(surface), | intent(inout) | :: | this_surface | |||
type(vector), | intent(in) | :: | offset |
Returns the surface normal at an appropriately close point We assume that the point is actually on the surface
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(surface), | intent(in) | :: | this_surface | |||
type(vector), | intent(in) | :: | this_point |
Returns the goodness of fit, R2 value, from 0 to 1
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(surface), | intent(in) | :: | this_surface |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(surface), | intent(in) | :: | this_surface |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(surface), | intent(in) | :: | surf |
TYPE surface
PRIVATE
! Surface holds one of these three kinds of surface.
! PLANE is-a SURFACE, A_CYLINDER is-a SURFACE, etc.
TYPE( plane ), POINTER :: my_plane =>null()
TYPE( cylinder ), POINTER :: my_cylinder => NULL()
! type( sphere ), pointer :: my_sphere => null() ! not yet written
LOGICAL :: set = .FALSE. ! true if this surface has already been created
INTEGER :: itype = 0 ! indicates the type of surface
CONTAINS
PROCEDURE :: free_surface ! Destructor
PROCEDURE, PRIVATE :: get_surface_type ! Returns Int. ID #
GENERIC, PUBLIC :: type_ => get_surface_type
PROCEDURE, PRIVATE :: get_surface_normal, get_surface_r2 ! Getters
GENERIC, PUBLIC :: normal_ => get_surface_normal
GENERIC, PUBLIC :: r2_ => get_surface_r2
PROCEDURE :: get_closest_point ! Getters, cont.
PROCEDURE :: reform_vertex, translate_surface ! Setters.
PROCEDURE, PRIVATE :: nemo_surface_sizeof
GENERIC, PUBLIC :: nemo_sizeof => nemo_surface_sizeof
END TYPE surface