Ejemplo n.º 1
0
/*!
  the relative shape and size of a quad

  Product of Shape and Relative Size
*/
C_FUNC_DEF VERDICT_REAL v_quad_shape_and_size( int num_nodes, VERDICT_REAL coordinates[][3] )
{
  double shape, size;
  size = v_quad_relative_size_squared( num_nodes, coordinates );
  shape = v_quad_shape( num_nodes, coordinates );

  double shape_and_size = shape * size;
  
  if( shape_and_size > 0 )
    return (VERDICT_REAL) VERDICT_MIN( shape_and_size, VERDICT_DBL_MAX );
  return (VERDICT_REAL) VERDICT_MAX( shape_and_size, -VERDICT_DBL_MAX );

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

        case VTK_QUAD:
            return v_quad_shape(4, coords);

        case VTK_TRIANGLE:
            return v_tri_shape(3, coords);
    }
#endif
    return -1;
}