Ejemplo n.º 1
0
/*!
  The shape and size of a tri
  
  Product of the Shape and Relative Size
*/
C_FUNC_DEF double v_tri_shape_and_size( int num_nodes, double coordinates[][3] )
{
  double size, shape;  

  size = v_tri_relative_size_squared( num_nodes, coordinates );
  shape = v_tri_shape( num_nodes, coordinates );
  
  double shape_and_size = size * shape;

  if( shape_and_size > 0 )
    return (double) VERDICT_MIN( shape_and_size, VERDICT_DBL_MAX );
  return (double) VERDICT_MAX( shape_and_size, -VERDICT_DBL_MAX );

}
double avtVMetricRelativeSize::Metric (double coords[][3], int type)
{
#ifdef HAVE_VERDICT 
    switch (type)
    {
        case VTK_HEXAHEDRON:
        case VTK_VOXEL:
            return v_hex_relative_size_squared(8, coords);
        
        case VTK_TETRA:
            return v_tet_relative_size_squared(4,coords);

        case VTK_QUAD:
            return v_quad_relative_size_squared(4, coords);
            
        case VTK_TRIANGLE:
            return v_tri_relative_size_squared(3, coords);
    }
#endif
    return -1;
}