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));
Implements
System.ComponentModel.INotifyPropertyChanged
Inherited Members
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
Implements
System.ComponentModel.INotifyPropertyChanged