MeasureStructure Class
The measure structure. Allows to merge and split measures.
Constructor
MeasureStructure
-
points
-
parent
-
offsetVector
Parameters:
-
points
BABYLON.Vector2The points where to split the measure, ordered by increasing distance to points[0].
-
parent
WallStructureParent wall inducing the measure.
-
offsetVector
BABYLON.Vector2Normalized vector indicating in which direction to offset the display of the measure in relation to the wall.
Item Index
Methods
Properties
Methods
add
-
propertyName
-
value
Returns:
center
()
BABYLON.Vector2
Returns the center of the measure.
Returns:
The center.
deserialize
-
hybrid
Parameters:
-
hybrid
ObjectJSON describing the object, built with the method serialize.
Returns:
The Structure object built from the deserialization
getElementByName
-
name
-
collection
Parameters:
Returns:
getFloor
-
collection
Parameters:
-
collection
StringCollection to search within.
Returns:
The floor containing this structure, -1 if the object has not been added to any floor collection.
initialize
()
private
mergeMeasures
-
measures
Tries to merge this measure with a set of measures.
Parameters:
-
measures
MeasureStructure[]An array of measures.
needToDelete
-
measure
Determine if 2 measures are very close together If it is the case, we delete one of the two measures.
Parameters:
-
measure
MeasureStructureAnother measure.
Returns:
True if measures are close.
normal
()
BABYLON.Vector2
Returns a normal vector to the measure. NB : The direction of this vector is away from the wall carrying the measure.
Returns:
The normal vector.
serialize
()
Object
Returns:
tryMerge
-
measure
Tries to merge this measure with another measure. Only merges if the measures are aligned and touch each other.
Parameters:
-
measure
MeasureStructureAnother measure.
Returns:
True if the measure has been merged, false otherwise.
update
()
updateReferences
-
structure
Parameters:
-
structure
wnp.StructureFloor Structure to work with
Properties
offsetVector
BABYLON.Vector2
Normalized vector indicating in which direction to offset the display of the measure in relation to the wall.
points
BABYLON.Vector2
Contains all the points where to split the measure, ordered by increasing distance to points[0].