SwimmingPoolStructure
Summary
SwimmingPool's structure.
Constructor
SwimmingPoolStructure
Syntax
SwimmingPoolStructure
()
Summary
Item Index
Methods
Methods
add
Syntax
add
-
propertyName
-
value
Summary
Adds an element to the collection in parameter.Returns:
addMaterial
Syntax
addMaterial
-
parent
-
mesh
-
materialItem
Summary
Adds a material.
Parameters:
-
parent
BABYLON.MeshThe parent of the mesh.
-
mesh
BABYLON.MeshThe stairway mesh.
-
materialItem
wnp.StandardMaterialThe item material.
checkCoherence
Syntax
Summary
Checks the coherence of swimmingPool's bassin.
Parameters:
Returns:
True if the swimmingPool is coherent.
checkCoherence
Syntax
Summary
Checks the coherence of swimmingPool's points.
Parameters:
Returns:
True if the swimmingPool is coherent.
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
getAvailableProperties
Syntax
Summary
Returns the user-customizable properties of this swimmingPool.
Returns:
Properties.
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.
getWidthLength
Syntax
getWidthLength
-
isLength
Summary
Sets width or length of the swimmingPool.
Parameters:
-
isLength
Booleanif it is length or width.
initialize
Syntax
initialize
()
private
Summary
Method called after the loading of the componentinserPointAt
Syntax
inserPointAt
-
The
-
The
Summary
Inserts a point at a given index.
Parameters:
-
The
Numberindex where the point must be inserted in the array of points.
-
The
BABYLON.Vector2inserted point.
isValid
Syntax
Summary
Checks the consistency of the swimmingPool.
Returns:
False if the structure is corrupted, true otherwise.
move
Syntax
move
-
moveVector
Summary
Moves the swimmingPool by the translation vector passed in params ( relative move ).
Parameters:
-
moveVector
BABYLON.Vector2The translation vector by which the swimmingPool will by moved.
remove
Syntax
remove
-
structure
Summary
Removes the swimmingPool.
Parameters:
-
structure
FloorStructureThe structure from which the swimmingPool must be removed.
rotate
Syntax
rotate
-
moveVector
Summary
Rotate the swimmingPool in 2D.
Parameters:
-
moveVector
BABYLON.Vector2move of the mouse.
serialize
Syntax
Summary
Serializes the object (to JSON)Returns:
setBassinPosition
Syntax
setBassinPosition
()
Summary
Sets the position in 2D of the swimmingPool's bassin.
setPoints
Syntax
setPoints
()
Summary
Sets vertices of the swimmingPool.
setPointsByMeasure
Syntax
setPointsByMeasure
-
isLength
-
newValue
Summary
Sets vertices of the swimmingPool'tickness.
setRotateTarget
Syntax
setRotateTarget
()
Summary
Sets the position in 2D of the swimmingPool's rotating ring.
setThicknessPoints
Syntax
setThicknessPoints
()
Summary
Sets vertices of the swimmingPool'tickness.
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
materials
Syntax
materials
BABYLON.Material
Summary
Set of labeled materials used for painting the swimmingPool.
The decorable meshes are:
- font
- thicknessMesh
modified
Syntax
modified
Boolean
Summary
Indicates if the swimmingPool has been modified or if it's the default swimmingPool.
Default: false
points
Syntax
points
BABYLON.Vector2
Summary
The vertices of the swimmingPool. Points can be moved, added ( a swimmingPool can have more than 4 vertices ), and removed ( as long as there is still at least 3 vertices ).
Note that when we refer to the side i, it is the edge ( points[ i ] , points[ i+1 ] ).