WallPane3D Class
3D decorable wall panes.
Constructor
WallPane3D
-
points
-
parent
-
parentWallSide
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
-
propertyName
-
value
Returns:
addMaterial
-
material
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
()
Applies the material of the pane onto the wall mesh
center
()
BABYLON.Vector2
Returns:
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.
getMaterial
()
BABYLON.Material
Returns the material of this wall pane.
Returns:
The material, null if the WallPane does not have a material.
identifyWithPanes
-
panes
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
()
private
mergeMeasures
-
measures
Parameters:
-
measures
MeasureStructure[]An array of measures.
nearestMaterial
-
materialInfos
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
-
measure
Parameters:
-
measure
MeasureStructureAnother measure.
Returns:
normal
()
BABYLON.Vector2
Returns:
serialize
()
Object
Returns:
setMaterial
-
material
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
-
room
Sets the parent room reference.
Parameters:
-
room
RoomStructureThe new parent room.
tryMerge
-
measure
Parameters:
-
measure
MeasureStructureAnother measure.
Returns:
update
()
updateReferences
-
structure
Parameters:
-
structure
wnp.StructureFloor Structure to work with
Properties
offsetVector
BABYLON.Vector2
points
BABYLON.Vector2
wallMesh
BABYLON.Mesh
A reference to the wall mesh carrying the pane