FOSSIL, facet class definition.
FOSSIL, facet class.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(vector_R8P), | public | :: | normal | Facet (outward) normal (versor), |
|||
| type(vector_R8P), | public | :: | vertex_1 | Facet vertex 1. |
|||
| type(vector_R8P), | public | :: | vertex_2 | Facet vertex 2. |
|||
| type(vector_R8P), | public | :: | vertex_3 | Facet vertex 3. |
|||
| type(vector_R8P), | public | :: | E12 | Edge 1-2, |
|||
| type(vector_R8P), | public | :: | E13 | Edge 1-3, |
|||
| real(kind=R8P), | public | :: | a | = | 0._R8P |
|
|
| real(kind=R8P), | public | :: | b | = | 0._R8P |
|
|
| real(kind=R8P), | public | :: | c | = | 0._R8P |
|
|
| real(kind=R8P), | public | :: | det | = | 0._R8P |
|
|
| real(kind=R8P), | public | :: | d | = | 0._R8P |
|
|
| type(vector_R8P), | public | :: | bb(2) | Axis-aligned bounding box (AABB), bb(1)=min, bb(2)=max. |
|||
| integer(kind=I4P), | public | :: | id | Facet global ID. |
|||
| integer(kind=I4P), | public | :: | fcon_edge_12 | = | 0_I4P | Connected face ID along edge 1-2. |
|
| integer(kind=I4P), | public | :: | fcon_edge_23 | = | 0_I4P | Connected face ID along edge 2-3. |
|
| integer(kind=I4P), | public | :: | fcon_edge_31 | = | 0_I4P | Connected face ID along edge 3-1. |
|
| integer(kind=I4P), | public, | allocatable | :: | vertex_1_occurrence(:) | List of vertex 1 "occurrencies", list of facets global ID containing it. |
||
| integer(kind=I4P), | public, | allocatable | :: | vertex_2_occurrence(:) | List of vertex 2 "occurrencies", list of facets global ID containing it. |
||
| integer(kind=I4P), | public, | allocatable | :: | vertex_3_occurrence(:) | List of vertex 3 "occurrencies", list of facets global ID containing it. |
| procedure, public, pass(self) :: add_vertex_occurrence | Add vertex occurence. |
| procedure, public, pass(self) :: check_normal | Check normal consistency. |
| procedure, public, pass(self) :: check_vertices_occurrencies | Check if vertices of facet are identical to ones of other facet. |
| procedure, public, pass(self) :: compute_metrix | Compute local (plane) metrix. |
| procedure, public, pass(self) :: compute_normal | Compute normal by means of vertices data. |
| procedure, public, pass(self) :: destroy | Destroy facet. |
| procedure, public, pass(self) :: distance | Compute the (unsigned, squared) distance from a point to facet. |
| procedure, public, pass(self) :: do_ray_intersect | Return true if facet is intersected by a ray. |
| procedure, public, pass(self) :: initialize | Initialize facet. |
| procedure, public, pass(self) :: load_from_file_ascii | Load facet from ASCII file. |
| procedure, public, pass(self) :: load_from_file_binary | Load facet from binary file. |
| procedure, public, pass(self) :: make_normal_consistent | Make normal of other facet consistent with self. |
| generic, public :: mirror => mirror_by_normal, mirror_by_matrix | Mirror facet. |
| procedure, public, pass(self) :: reverse_normal | Reverse facet normal. |
| procedure, public, pass(self) :: resize | Resize (scale) facet by x or y or z or vectorial factors. |
| generic, public :: rotate => rotate_by_axis_angle, rotate_by_matrix | Rotate facet. |
| procedure, public, pass(self) :: save_into_file_ascii | Save facet into ASCII file. |
| procedure, public, pass(self) :: save_into_file_binary | Save facet into binary file. |
| procedure, public, pass(self) :: solid_angle | Return the (projected) solid angle of the facet with respect point. |
| procedure, public, pass(self) :: tetrahedron_volume | Return the volume of tetrahedron built by facet and a given apex. |
| procedure, public, pass(self) :: translate | Translate facet given vectorial delta. |
| procedure, public, pass(self) :: update_connectivity | Update facet connectivity. |
| procedure, public, pass(self) :: vertex_global_id | Return the vertex global id given the local one. |
| generic, public :: assignment(=) => facet_assign_facet | Overload |
| procedure, private, pass(self) :: edge_connection_in_other_ref | Return the edge of connection in the other reference. |
| procedure, private, pass(lhs) :: facet_assign_facet | Operator |
| procedure, private, pass(self) :: flip_edge | Flip facet edge. |
| procedure, private, pass(self) :: mirror_by_normal | Mirror facet given normal of mirroring plane. |
| procedure, private, pass(self) :: mirror_by_matrix | Mirror facet given matrix. |
| procedure, private, pass(self) :: rotate_by_axis_angle | Rotate facet given axis and angle. |
| procedure, private, pass(self) :: rotate_by_matrix | Rotate facet given matrix. |
Check normal consistency.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(facet_object), | intent(in) | :: | self | Facet. |
Consistency check result.
Compute the (unsigned, squared) distance from a point to the facet surface.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(facet_object), | intent(in) | :: | self | Facet. |
||
| type(vector_R8P), | intent(in) | :: | point | Point. |
Closest distance from point to the facet.
Return true if facet is intersected by ray from origin and oriented as ray direction vector.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(facet_object), | intent(in) | :: | self | Facet. |
||
| type(vector_R8P), | intent(in) | :: | ray_origin | Ray origin. |
||
| type(vector_R8P), | intent(in) | :: | ray_direction | Ray direction. |
Intersection test result.
Return the (projected) solid angle of the facet with respect the point.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(facet_object), | intent(in) | :: | self | Facet. |
||
| type(vector_R8P), | intent(in) | :: | point | Point. |
Solid angle.
Return the volume of tetrahedron built by facet and a given apex.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(facet_object), | intent(in) | :: | self | Facet. |
||
| type(vector_R8P), | intent(in) | :: | apex | Tetrahedron apex. |
Tetrahedron volume.
Return the vertex global id given the local one.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(facet_object), | intent(in) | :: | self | Facet. |
||
| integer(kind=I4P), | intent(in) | :: | vertex_id | Local vertex id. |
Gloval vertex id.
Add vertex occurrence.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(facet_object), | intent(inout) | :: | self | Facet. |
||
| integer(kind=I4P), | intent(in) | :: | vertex_id | Vertex ID in local numeration, 1, 2 or 3. |
||
| integer(kind=I4P), | intent(in) | :: | facet_id | Other facet ID containing vertex. |
Check if vertices of facet are identical (with tollerance) to the ones of other facet.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(facet_object), | intent(inout) | :: | self | Facet. |
||
| type(facet_object), | intent(inout) | :: | other | Other facet. |
Compute local (plane) metrix.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(facet_object), | intent(inout) | :: | self | Facet. |
Compute normal by means of vertices data.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(facet_object), | intent(inout) | :: | self | Facet. |
Destroy AABB.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(facet_object), | intent(inout) | :: | self | Facet. |
Initialize facet.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(facet_object), | intent(inout) | :: | self | Facet. |
Load facet from ASCII file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(facet_object), | intent(inout) | :: | self | Facet. |
||
| integer(kind=I4P), | intent(in) | :: | file_unit | File unit. |
Load facet from binary file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(facet_object), | intent(inout) | :: | self | Facet. |
||
| integer(kind=I4P), | intent(in) | :: | file_unit | File unit. |
Make normal of other facet consistent with self.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(facet_object), | intent(in) | :: | self | Facet. |
||
| character(len=*), | intent(in) | :: | edge_dir | Edge (in self numeration) along which other is connected. |
||
| type(facet_object), | intent(inout) | :: | other | Other facet to make consistent with self. |
Resize (scale) facet by x or y or z or vectorial factors.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(facet_object), | intent(inout) | :: | self | Facet |
||
| type(vector_R8P), | intent(in) | :: | factor | Vectorial factor. |
||
| logical, | intent(in), | optional | :: | recompute_metrix | Sentinel to activate metrix recomputation. |
Reverse facet normal.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(facet_object), | intent(inout) | :: | self | Facet. |
Save facet into ASCII file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(facet_object), | intent(in) | :: | self | Facet. |
||
| integer(kind=I4P), | intent(in) | :: | file_unit | File unit. |
Save facet into binary file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(facet_object), | intent(in) | :: | self | Facet. |
||
| integer(kind=I4P), | intent(in) | :: | file_unit | File unit. |
Translate facet given vectorial delta.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(facet_object), | intent(inout) | :: | self | Facet. |
||
| type(vector_R8P), | intent(in) | :: | delta | Translation delta. |
||
| logical, | intent(in), | optional | :: | recompute_metrix | Sentinel to activate metrix recomputation. |
Update facet connectivity.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(facet_object), | intent(inout) | :: | self | Facet. |
Flip facet edge.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(facet_object), | intent(inout) | :: | self | Facet. |
||
| character(len=*), | intent(in) | :: | edge_dir | Edge to be flipped. |
Mirror facet given normal of mirroring plane.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(facet_object), | intent(inout) | :: | self | Facet. |
||
| type(vector_R8P), | intent(in) | :: | normal | Normal of mirroring plane. |
||
| logical, | intent(in), | optional | :: | recompute_metrix | Sentinel to activate metrix recomputation. |
Mirror facet given matrix (of mirroring).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(facet_object), | intent(inout) | :: | self | Facet. |
||
| real(kind=R8P), | intent(in) | :: | matrix(3,3) | Mirroring matrix. |
||
| logical, | intent(in), | optional | :: | recompute_metrix | Sentinel to activate metrix recomputation. |
Rotate facet given axis and angle.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(facet_object), | intent(inout) | :: | self | Facet. |
||
| type(vector_R8P), | intent(in) | :: | axis | Axis of rotation. |
||
| real(kind=R8P), | intent(in) | :: | angle | Angle of rotation. |
||
| logical, | intent(in), | optional | :: | recompute_metrix | Sentinel to activate metrix recomputation. |
Rotate facet given matrix (of ratation).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(facet_object), | intent(inout) | :: | self | Facet. |
||
| real(kind=R8P), | intent(in) | :: | matrix(3,3) | Rotation matrix. |
||
| logical, | intent(in), | optional | :: | recompute_metrix | Sentinel to activate metrix recomputation. |
Return the edge of connection in the other reference.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(facet_object), | intent(in) | :: | self | Facet. |
||
| type(facet_object), | intent(in) | :: | other | Other facet. |
||
| character(len=*), | intent(out) | :: | edge_dir | Edge (in other numeration) along which self is connected. |
||
| type(vector_R8P), | intent(out) | :: | edge | Edge (in other numeration) along which self is connected. |
Operator =.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(facet_object), | intent(inout) | :: | lhs | Left hand side. |
||
| type(facet_object), | intent(in) | :: | rhs | Right hand side. |