cross_product3D Function

public pure function cross_product3D(a, b) result(cross)

This function calculate the cross product of two 3D vector

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(in) :: a(3)

input vector a

real(kind=rk), intent(in) :: b(3)

input vector b

Return Value real(kind=rk), (3)

resulting cross produkt


Called by

proc~~cross_product3d~~CalledByGraph proc~cross_product3d cross_product3D proc~axistest Axistest proc~axistest->proc~cross_product3d proc~intersect_raytriangle intersect_RayTriangle proc~intersect_raytriangle->proc~cross_product3d proc~tem_calctriaareas tem_calcTriaAreas proc~tem_calctriaareas->proc~cross_product3d proc~tem_createplane tem_createPlane proc~tem_createplane->proc~cross_product3d proc~tem_dump_stlb tem_dump_stlb proc~tem_dump_stlb->proc~cross_product3d proc~tem_triangle_normal_proximity tem_triangle_normal_proximity proc~tem_triangle_normal_proximity->proc~cross_product3d proc~triboxoverlap_loc triBoxOverlap_loc proc~triboxoverlap_loc->proc~cross_product3d proc~triboxoverlap_loc->proc~axistest proc~tem_createbox tem_createBox proc~tem_createbox->proc~tem_createplane proc~tem_load_onecanonicalnd tem_load_oneCanonicalND proc~tem_load_onecanonicalnd->proc~tem_createplane proc~tem_load_onecanonicalnd->proc~tem_createbox proc~tem_trianglecubeoverlap tem_triangleCubeOverlap proc~tem_trianglecubeoverlap->proc~triboxoverlap_loc interface~tem_load_canonicalnd tem_load_canonicalND interface~tem_load_canonicalnd->proc~tem_load_onecanonicalnd proc~tem_load_canonicalnd_vec tem_load_canonicalND_vec interface~tem_load_canonicalnd->proc~tem_load_canonicalnd_vec proc~tem_load_canonicalnd_vec->proc~tem_load_onecanonicalnd proc~tem_planecubeoverlap tem_planeCubeOverlap proc~tem_planecubeoverlap->proc~tem_trianglecubeoverlap proc~tem_shape_subtreefromgeominters tem_shape_subTreeFromGeomInters proc~tem_shape_subtreefromgeominters->proc~tem_trianglecubeoverlap proc~tem_stlcubeoverlap tem_stlCubeOverlap proc~tem_shape_subtreefromgeominters->proc~tem_stlcubeoverlap proc~tem_stlcubeoverlap->proc~tem_trianglecubeoverlap proc~tem_boxcubeoverlap tem_boxCubeOverlap proc~tem_boxcubeoverlap->proc~tem_planecubeoverlap proc~tem_cano_initsubtree tem_cano_initSubTree proc~tem_cano_initsubtree->proc~tem_planecubeoverlap proc~tem_load_shape_single tem_load_shape_single proc~tem_load_shape_single->interface~tem_load_canonicalnd proc~tem_shape2subtree tem_shape2subTree proc~tem_shape2subtree->proc~tem_shape_subtreefromgeominters

Source Code

  pure function cross_product3D(a, b) result( cross )
    ! ---------------------------------------------------------------------------
    !> resulting cross produkt
    real(kind=rk) :: cross(3)
    !> input vector a
    real(kind=rk), intent(in) :: a(3)
    !> input vector b
    real(kind=rk), intent(in) :: b(3)
    ! ---------------------------------------------------------------------------

    cross(1) = a(2) * b(3) - a(3) * b(2)
    cross(2) = a(3) * b(1) - a(1) * b(3)
    cross(3) = a(1) * b(2) - a(2) * b(1)

  end function cross_product3D