lib/measures/tbd/resources/psi.rb
##
# Return site-specific (or absolute) Topolys surface normal; nil unsuccessful
#
# @param [OpenStudio::Model::PlanarSurface] s An OS planar surface
# @param [Float] r A rotation angle [0,360) degrees
#
# @return [OpenStudio::Vector3D] Returns normal vector <x,y,z> of s
Return site-specific (or absolute) Topolys surface normal; nil unsuccessful
Return site - specific ( or absolute ) Topolys surface normal ; nil unsuccessful
def trueNormal(s, r)
  unless s && r && s.is_a?(OpenStudio::Model::PlanarSurface) && r.is_a?(Numeric)
    TBD.log(TBD::DEBUG,
      "Invalid arguments for true normals - skipping")
    return nil
  end
  r = -r * Math::PI / 180.0
  Topolys::Vector3D.new(s.outwardNormal.x * Math.cos(r) -
                        s.outwardNormal.y * Math.sin(r),                     
                        s.outwardNormal.x * Math.sin(r) +
                        s.outwardNormal.y * Math.cos(r),                     
                        s.outwardNormal.z)                                   
end
def trueNormal ( s , r ) unless s && r && s . is_a? ( OpenStudio :: Model :: PlanarSurface ) && r . is_a? ( Numeric ) TBD . log ( TBD :: DEBUG , "Invalid arguments for true normals - skipping" ) return nil end r = - r * Math :: PI / 180.0 Topolys :: Vector3D . new ( s . outwardNormal . x * Math . cos ( r ) - s . outwardNormal . y * Math . sin ( r ) , s . outwardNormal . x * Math . sin ( r ) + s . outwardNormal . y * Math . cos ( r ) , s . outwardNormal . z ) end
Return site-specific (or absolute) Topolys surface normal; nil unsuccessful
Return site - specific ( or absolute ) Topolys surface normal ; nil unsuccessful
# x # y # z
Returns normal vector  of s
Returns normal vector of s
OpenStudio::Vector3D
s
r
r A rotation angle [0,360) degrees
r A rotation angle [ 0 360 ) degrees