import Segments from '@mobilizing/library/js/Mobilizing/renderer/3D/three/shape/3D/primitive/Segments.js'
Segments
Extends:
Constructor Summary
Public Constructor | ||
public | constructor(params: Object) |
Member Summary
Method Summary
Public Methods | ||
public | addPoint(point: *, index: *) | |
public | getPointColor(index: Number): Color | |
public | Get the array of points | |
public | getPointsColor(): * | |
public | Set the coordinates of the points at index of the line | |
public | setPointColor(index: Number, point: Vector3) Set the color of the points at index of the line |
Inherited Summary
From class Mesh | ||
public static | generateStrokeMesh(mesh: Mesh, inflateValue: Number): Mesh Static Utils to generate the stroke Mesh from a given shape | |
public static | generateStrokeShape(mesh: Mesh, inflateValue: Number): * Static Utils to generate the stroke for the given vertices with the given stroke width | |
public static | geometryIsCW(geometry: Geometry): Boolean Static Utils to check the direction of a geometry (ccw o cw) | |
public | events: * | |
public | geometry: * | |
public | ||
public | ||
public | ||
public | ||
public | indices: *[] | |
public | material: * | |
public | maxVertices: * | |
public | name: * | |
public | ||
public | rootName: * | |
public | transform: * | |
public | type: * | |
public | ||
public | ||
private | _mesh: * | |
public | attachMaterial(material: Material) Attach the material to this mesh. | |
public | clone(): * deep clone this Mesh return {Mesh} a new clone (copy) of this Mesh in a new Mesh object | |
public | compute Face and Vertex Normals for the current geometry | |
public | Call this method to construct a custom mesh | |
public | Erase this mesh's geometry and material from memory | |
public | generateFillMesh(vertices: *) Generate the mesh for the given vertices and generates flat uvs for it. | |
public | Generate the flat uvs for this mesh. | |
public | genereate a mesh from already made geometry and material | |
public | getBoundingBox(force: Boolean): Object Compute and returns the bounding box of the current geometry or Node, which is an object made of 2 Vector3. | |
public | getBoundingSphere(force: Boolean): Object Compute and returns the bounding sphere of the current geometry or Node, which is an object with a radius : | |
public | Returns the center of the geometry (vertices) based on boundingbox | |
public | Shortcut for getSize().y | |
public | Shortcut for getSize().z | |
public | getNativeGeometry(): * | |
public | getNativeObject(): * | |
public | Returns the size of the geometry (vertices) based on boundingbox | |
public | Get the UV of this mesh geometry | |
public | Get the vertexColors of this mesh geometry's vertices | |
public | getVertices(): Array Get the vertices of this mesh geometry | |
public | Get the visibility of this mesh | |
public | Shortcut for getSize().x | |
public | Generate Float32Array and BufferAttribute for this geometry | |
public | pushNormal(n1: Vector2, n2: Vector2, n3: Vector2) Adds a Normal to the current geometry | |
public | Adds a Quad to the current geometry | |
public | pushTriangle(v1: Vector3, v2: Vector3, v3: Vector3) Adds a triangle to the current geometry | |
public | Adds a UV to the current geometry | |
public | pushVertex(v: Vector3) Adds a vertex to the current geometry | |
public | convinient method to reverse this Mesh geometry's normals | |
public | setCastShadow(enabled: Boolean) setCastShadow | |
public | Defines the position of the geometry's center (NOT the transform!). | |
public | setEventEmitterTrigger(scope: *, eventType: *) | |
public | setMaterial(material: Material | String) Sets this Mesh material. | |
public | setMaxVertices(val: *) | |
public | setReceiveShadow(enabled: Boolean) setReceiveShadow | |
public | setRootName(name: String) | |
public | setRotationX(value: float) Set the rotation around x axis of the vertices (not the transform!) | |
public | setRotationY(value: float) Set the rotation around y axis of the vertices (not the transform!) | |
public | setRotationZ(value: float) Set the rotation around z axis of the vertices (not the transform!) | |
public | Set the scale of the geometry (vertices) - this is not like scaling the transform. | |
public | setTranslation(value: float, value: float, value: float) Set the translation along all axis of the vertices (not the transform!) | |
public | Set the UV of this mesh geometry | |
public | setVertex(index: *, vertex: *) | |
public | setVertexColors(colors: Array<Color>) Set the vertexColors of this mesh geometry's vertices | |
public | setVertices(vertices: Object) Set the vertices of this mesh geometry | |
public | setVisible(value: Boolean) Set the visibility of this mesh | |
private | Updates this mesh material |
Public Constructors
public constructor(params: Object) source
Construct an empty and unfinished Mesh for which a geometry must be constructed. Once filled with vertices, constructMesh method must be called, or a method generating a complete Mesh must be used (i.e generateFillMesh)
Override:
Mesh#constructorPublic Members
public colors: * source
public material: * source
Override:
Mesh#materialpublic points: * source
public transform: * source
Override:
Mesh#transformPrivate Members
private _mesh: * source
Override:
Mesh#_meshprivate _points: *[] source
Public Methods
public addPoint(point: *, index: *) source
Params:
Name | Type | Attribute | Description |
point | * | ||
index | * |
public getPointColor(index: Number): Color source
Params:
Name | Type | Attribute | Description |
index | Number |
Return:
Color | Color |
public getPointsColor(): * source
Return:
* |