Show / Hide Table of Contents

    Class ModelLines

    A collection of lines which are visible in 3D.

    Examples
    var lines = new List<Line>()
    {
        new Line(new Vector3(0, 0), new Vector3(0, 5)),
        new Line(new Vector3(0, 0), new Vector3(5, 0)),
        new Line(new Vector3(0, 5), new Vector3(5, 5)),
        new Line(new Vector3(5, 0), new Vector3(5, 5)),
        new Line(new Vector3(0, 0), new Vector3(5, 5))
    };
    
    var modelLines = new ModelLines(lines, new Material("Yellow", Colors.Yellow));
    
    Inheritance
    System.Object
    Element
    GeometricElement
    ModelLines
    Implements
    System.ComponentModel.INotifyPropertyChanged
    Inherited Members
    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>>)
    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
    Assembly: Hypar.Elements.dll
    Syntax
    public class ModelLines : GeometricElement, INotifyPropertyChanged

    Constructors

    ModelLines(IList<Line>, Material, Transform, Boolean, Guid, String)

    Create a collection of lines. They share Material, Transformation and other parameters.

    Declaration
    [JsonConstructor]
    public ModelLines(IList<Line> lines = null, Material material = null, Transform transform = null, bool isElementDefinition = false, Guid id = default(Guid), string name = null)
    Parameters
    Type Name Description
    System.Collections.Generic.IList<Line> lines

    The lines.

    Material material

    The material. Specular and glossiness components will be ignored.

    Transform transform

    The model lines transform.

    System.Boolean isElementDefinition

    Is this an element definition?

    System.Guid id

    The id of the model lines.

    System.String name

    The name of the model lines.

    Properties

    Lines

    The lines.

    Declaration
    public IList<Line> Lines { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IList<Line>

    Methods

    SetSelectable(Boolean)

    Set whether these model lines should be selectable in the web UI. Lines are not selectable by default.

    Declaration
    public void SetSelectable(bool selectable)
    Parameters
    Type Name Description
    System.Boolean selectable

    TryToGraphicsBuffers(out List<GraphicsBuffers>, out String, out Nullable<MeshPrimitive.ModeEnum>)

    Get graphics buffers and other metadata required to modify a GLB.

    Declaration
    public override bool TryToGraphicsBuffers(out List<GraphicsBuffers> graphicsBuffers, out string id, out MeshPrimitive.ModeEnum? mode)
    Parameters
    Type Name Description
    System.Collections.Generic.List<GraphicsBuffers> graphicsBuffers
    System.String id
    System.Nullable<glTFLoader.Schema.MeshPrimitive.ModeEnum> mode
    Returns
    Type Description
    System.Boolean

    True if there is graphicsbuffers data applicable to add, false otherwise. Out variables should be ignored if the return value is false.

    Overrides
    GeometricElement.TryToGraphicsBuffers(out List<GraphicsBuffers>, out String, out Nullable<MeshPrimitive.ModeEnum>)

    Implements

    System.ComponentModel.INotifyPropertyChanged

    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)