WallPane3D
Summary
3D decorable wall panes.
Constructor
WallPane3D
Syntax
WallPane3D
-
points
-
parent
-
parentWallSide
Summary
Parameters:
-
points
BABYLON.Vector2Array of 2 vectors, for the 2 endings of the wall pane.
-
parent
WallStructureParent wall, which induced the wall pane.
-
parentWallSide
BABYLON.Vector2A normal vector to the wall pane. It indicates on which side of the parent wall the pane lies.
Item Index
Methods
Properties
Methods
add
Syntax
add
-
propertyName
-
value
Summary
Adds an element to the collection in parameter.Returns:
addMaterial
Syntax
addMaterial
-
material
Summary
Adds or changes a material for the wall pane.
Parameters:
-
material
BABYLON.MaterialThe new Material.
Returns:
The old material, null if the WallPane did not have a material.
apply
Syntax
apply
()
Summary
Applies the material of the pane onto the wall mesh
center
Syntax
center
()
BABYLON.Vector2
Summary
Returns the center of the measure.Returns:
deserialize
Syntax
Summary
Deserializes the object (from JSON).Parameters:
-
hybrid
ObjectJSON describing the object, built with the method serialize.
Returns:
The Structure object built from the deserialization
getElementByName
Syntax
Summary
Gets an element of the collection by its name.Parameters:
Returns:
getFloor
Syntax
Summary
Gets the floor referencing this objectParameters:
-
collection
StringCollection to search within.
Returns:
The floor containing this structure, -1 if the object has not been added to any floor collection.
getMaterial
Syntax
getMaterial
()
BABYLON.Material
Summary
Returns the material of this wall pane.
Returns:
The material, null if the WallPane does not have a material.
identifyWithPanes
Syntax
Summary
Identifies the wallpane with a set of wallpanes. Returns the pane the more similar with this pane, comparing the center and normal.
Parameters:
-
panes
WallPane3D[]The list of panes to compare with.
Returns:
The index in the list pointing to the most alike wallpane.
initialize
Syntax
initialize
()
private
Summary
Method called after the loading of the componentmergeMeasures
Syntax
mergeMeasures
-
measures
Summary
Tries to merge this measure with a set of measures.Parameters:
-
measures
MeasureStructure[]An array of measures.
nearestMaterial
Syntax
Summary
Compares this wallPane's materialInfo to a list a materialInfos. Returns the materialInfo geometrically closest to this wallPane's materialInfo.
Parameters:
-
materialInfos
MaterialInfo[]The materialInfo list to compare with.
Returns:
The index of the closest materialInfo.
needToDelete
Syntax
Summary
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:
normal
Syntax
normal
()
BABYLON.Vector2
Summary
Returns a normal vector to the measure. NB : The direction of this vector is away from the wall carrying the measure.Returns:
serialize
Syntax
Summary
Serializes the object (to JSON)Returns:
setMaterial
Syntax
setMaterial
-
material
Summary
Adds or changes a material for the wall pane. This is an alias for addMaterial
.
Parameters:
-
material
BABYLON.MaterialThe new Material.
Returns:
The old material, null if the WallPane did not have a material.
setRoom
Syntax
setRoom
-
room
Summary
Sets the parent room reference.
Parameters:
-
room
RoomStructureThe new parent room.
tryMerge
Syntax
Summary
Tries to merge this measure with another measure. Only merges if the measures are aligned and touch each other.Parameters:
-
measure
MeasureStructureAnother measure.
Returns:
update
Syntax
update
()
Summary
Generic update method, must be overridden.updateReferences
Syntax
updateReferences
-
structure
Summary
Generic method for rebuilding references after the deserialization. For example : restoring the link between a PointStructure and its parent WallStructureParameters:
-
structure
wnp.StructureFloor Structure to work with
Properties
offsetVector
Syntax
offsetVector
BABYLON.Vector2
Summary
Normalized vector indicating in which direction to offset the display of the measure in relation to the wall.points
Syntax
points
BABYLON.Vector2
Summary
Contains all the points where to split the measure, ordered by increasing distance to points[0].wallMesh
Syntax
wallMesh
BABYLON.Mesh
Summary
A reference to the wall mesh carrying the pane