Show / Hide Table of Contents

    Class AnalysisImage

    A visualization of computed values at locations in space. Use this instead of AnalysisMesh to create a lightweight mesh with an image texture, rather than mesh faces for each pixel.

    Examples
    var origin = new Vector3(0, 0);
    var size = 900;
    var shape = Polygon.Rectangle(900, 900);
    
    Func<Vector3, double> analyze = (v) =>
    {
        return Math.Min(v.DistanceTo(origin) / size * 2, 1);
    };
    
    var colorScale = new ColorScale(new List<Elements.Geometry.Color>() { Colors.Magenta, Colors.Yellow, Colors.Lime, Colors.Teal });
    
    var analysisImage = new AnalysisImage(shape, 10, 10, colorScale, analyze);
    analysisImage.Analyze();
    this.Model.AddElement(analysisImage);
    
    Inheritance
    System.Object
    Element
    GeometricElement
    AnalysisMesh
    AnalysisImage
    Implements
    System.ComponentModel.INotifyPropertyChanged
    ITessellate
    Inherited Members
    AnalysisMesh._results
    AnalysisMesh._analyze
    AnalysisMesh._min
    AnalysisMesh._max
    AnalysisMesh.TotalAnalysisLocations
    AnalysisMesh.ULength
    AnalysisMesh.VLength
    AnalysisMesh.Perimeter
    AnalysisMesh.ColorScale
    GeometricElement.Bounds
    GeometricElement.Transform
    GeometricElement.Material
    GeometricElement.Representation
    GeometricElement.IsElementDefinition
    GeometricElement.ModifyVertexAttributes
    GeometricElement.UpdateRepresentations()
    GeometricElement.UpdateBoundsAndComputeSolid(Boolean)
    GeometricElement.CreateInstance(Transform, String)
    GeometricElement.ToMesh(Boolean)
    GeometricElement.HasGeometry()
    GeometricElement.Intersects(Plane, Dictionary<Guid, List<Polygon>>, Dictionary<Guid, List<Polygon>>, Dictionary<Guid, List<Line>>)
    GeometricElement.TryToGraphicsBuffers(List<GraphicsBuffers>, String, Nullable<MeshPrimitive.ModeEnum>)
    Element.Id
    Element.Name
    Element.AdditionalProperties
    Element.PropertyChanged
    Element.RaisePropertyChanged(String)
    Element.SetMapping(String, MappingBase)
    Element.GetMapping(String)
    Element.GetMapping<T>(String)
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Elements.Analysis
    Assembly: Hypar.Elements.dll
    Syntax
    public class AnalysisImage : AnalysisMesh, INotifyPropertyChanged, ITessellate

    Constructors

    AnalysisImage(Polygon, Double, Double, ColorScale, Func<Vector3, Double>, Guid, String)

    An AnalysisImage is similar to an AnalysisMesh in that it renders a mesh with analysis colors. However, it uses a mapped image texture rather than mesh vertex colors to lighten the resulting geometry.

    Declaration
    public AnalysisImage(Polygon perimeter, double uLength, double vLength, ColorScale colorScale, Func<Vector3, double> analyze, Guid id = default(Guid), string name = null)
    Parameters
    Type Name Description
    Polygon perimeter

    The perimeter of the mesh image.

    System.Double uLength

    The number of divisions in the u direction.

    System.Double vLength

    The number of divisions in the v direction.

    ColorScale colorScale

    The color scale to be used in the visualization.

    System.Func<Vector3, System.Double> analyze

    A function which takes a location and computes a value.

    System.Guid id

    The id of the analysis image.

    System.String name

    The name of the analysis image.

    Properties

    InterpolateTexture

    Should the texture be interpolated? False by default.

    Declaration
    public bool InterpolateTexture { get; set; }
    Property Value
    Type Description
    System.Boolean

    If false, renders hard pixels in the texture rather than fading between adjacent pixels.

    Methods

    Analyze()

    Compute a value for each grid cell, and create the required material.

    Declaration
    public override void Analyze()
    Overrides
    AnalysisMesh.Analyze()

    Tessellate(ref Mesh, Transform, Color)

    Gives an element with a mapped texture.

    Declaration
    public override void Tessellate(ref Mesh mesh, Transform transform = null, Color color = default(Color))
    Parameters
    Type Name Description
    Mesh mesh
    Transform transform
    Color color
    Overrides
    AnalysisMesh.Tessellate(ref Mesh, Transform, Color)

    Implements

    System.ComponentModel.INotifyPropertyChanged
    ITessellate

    Extension Methods

    ElementProxyExtensions.Proxy<T>(T, String)
    Identity.AddOverrideIdentity(Element, IOverride)
    Identity.AddOverrideIdentity(Element, String, String, Object)
    Identity.AddOverrideValue(Element, String, Object)
    Identity.OverrideIds<T>(Element, String)
    In This Article
    • Constructors
      • AnalysisImage(Polygon, Double, Double, ColorScale, Func<Vector3, Double>, Guid, String)
    • Properties
      • InterpolateTexture
    • Methods
      • Analyze()
      • Tessellate(ref Mesh, Transform, Color)
    • Implements
    • Extension Methods