WanaPlan

API Docs for: 2.7.0
Show:

OvertureStructure

Extends BaseStructure
Module: Component
Parent Module: Wanaplan

Summary

Overture structure.

Constructor

OvertureStructure

Syntax

OvertureStructure

()

Summary

Methods

add

Inherited from BaseStructure:

Syntax

add

(
  • propertyName
  • value
)
private

Summary

Adds an element to the collection in parameter.

Parameters:

  • propertyName String
    Name of the dictionnary.
  • value Object
    Value to distribute.

Returns:

Returns true if the value is added else returns false.

checkCoherence

Syntax

checkCoherence

(
  • structure
)

Summary

Checks the coherence of all the parameters.

Parameters:

clampSize

Syntax

clampSize

(
  • allowDelete
  • structure
)

Summary

Resizes the overture in function of the parent wall.

Parameters:

  • allowDelete Boolean

    Specifies if we allow the deletion if the size of the wall is to small.

  • structure FloorStructure

    The current floor structure. Must be specified if allowDelete == true.

computePositionOnWallChange

Syntax

computePositionOnWallChange

(
  • newWall
)
BABYLON.Vector2

Summary

Computes the new position of the overture when its parent wall is merged with another one.

Parameters:

Returns:

BABYLON.Vector2:

The new position.

deserialize

Inherited from BaseStructure:

Syntax

deserialize

(
  • hybrid
)
Object

Summary

Deserializes the object (from JSON).

Parameters:

  • hybrid Object
    JSON describing the object, built with the method serialize.

Returns:

Object:
The Structure object built from the deserialization

getAbsolutePos

Syntax

getAbsolutePos

() Object

Summary

Returns a pair of elements: the position of the center of the overture and the unit vector of the parent wall.

Returns:

Object:

position: BABYLON.Vector3, vector: BABYLON.Vector3 The position and the unit vector.

getAngle

Syntax

getAngle

() Number

Summary

Returns the angle of the overture with the x-axis.

Returns:

Number:

The angle.

getAvailableProperties

Syntax

getAvailableProperties

() Array

Summary

Returns the user-customizable properties of this overture.

Returns:

Array:

Properties.

getElementByName

Inherited from BaseStructure:

Syntax

getElementByName

(
  • name
  • collection
)
Object private

Summary

Gets an element of the collection by its name.

Parameters:

  • name String
    The name of the element to search.
  • collection String
    The name of the collection in which we want to search. If this parameter is not defined, the search is done in all the collection of type array.

Returns:

Object:
Returns the needed element if it exists, else returns null.

getFloor

Inherited from BaseStructure:

Syntax

getFloor

(
  • collection
)
FloorStructure

Summary

Gets the floor referencing this object

Parameters:

  • collection String
    Collection to search within.

Returns:

FloorStructure:
The floor containing this structure, -1 if the object has not been added to any floor collection.

getMaterial

Syntax

getMaterial

(
  • name
)
Material

Summary

Gets a material from the list.

Parameters:

  • name String

    The name of the material to fetch.

Returns:

Material:

The material.

getParentWall

Syntax

getParentWall

() WallStructure

Summary

Gets the parent wall of the overture.

Returns:

WallStructure:

The parent of the overture.

getPolygon

Syntax

getPolygon

() BABYLON.Vector2

Summary

Returns the polygon describing the overture.

Returns:

BABYLON.Vector2:

The array of the points of the polygon.

guessSide

Syntax

guessSide

()

Summary

Tries to guess the overture direction given the adjacent rooms situations.

initialize

Inherited from BaseStructure:

Syntax

initialize

() private

Summary

Method called after the loading of the component

projectOnWall

Syntax

projectOnWall

()

Summary

Projects the position of the overture on its parent wall.

remove

Syntax

remove

(
  • structure
)

Summary

Deletes the overture.

Parameters:

  • structure FloorStructure

    The floor from which the engine has to remove the overture.

serialize

Inherited from BaseStructure:

Syntax

serialize

() Object

Summary

Serializes the object (to JSON)

Returns:

Object:
The serialization result, null if nothing is serialized

setMaterial

Syntax

setMaterial

(
  • material
  • name
)

Summary

Adds/replaces the material with the given name to the list of materials.

Parameters:

  • material Material

    The new material.

  • name String

    The name of the new material.

setParentWall

Syntax

setParentWall

(
  • wall
)

Summary

Sets the parent wall of the overture.

Parameters:

update

Inherited from BaseStructure:

Syntax

update

()

Summary

Generic update method, must be overridden.

updateReferences

Inherited from BaseStructure:

Syntax

updateReferences

(
  • structure
)

Summary

Generic method for rebuilding references after the deserialization. For example : restoring the link between a PointStructure and its parent WallStructure

Parameters:

  • structure wnp.Structure

    Floor Structure to work with

Properties

batiThickness

Syntax

batiThickness

Number

Summary

The thickness of the structure.

elevation

Syntax

elevation

Number

Summary

Elevation of the overture.

height

Syntax

height

Number

Summary

Height of the structure.

hinge

Syntax

hinge

Number

Summary

Defines the side of the overture where the hinges should be displayed (0 = right, 1 = left).

id

Inherited from BaseStructure:

Syntax

id

Number

Summary

Unique ID for the structure set up automatically

minsize

Syntax

minsize

Number

Summary

The minimum size of the overture.

name

Inherited from BaseStructure:

Syntax

name

String

Summary

Structure name

nbCasement

Syntax

nbCasement

Number

Summary

The number of casements. Availables values are 0 , 1 , 2 , 3

parentWall

Syntax

parentWall

WallStructure

Summary

The parent wall.

plinte

Syntax

plinte

Boolean

Summary

Describes if a base board should be displayed or not. Only for the windows.

position

Syntax

position

BABYLON.Vector2

Summary

Position of the overture.

programmableInstance

Syntax

programmableInstance

BABYLON.Mesh

Summary

The instance of the programmable.

side

Syntax

side

Number

Summary

Defines the side of the room where the hinges should be displayed ( inside / outside of the room ). Availables values are -1 or 1

sliding

Syntax

sliding

Boolean

Summary

If the overture is sliding or not.

thickness

Syntax

thickness

Number

Summary

Thickness of the overture.

type

Syntax

type

String

Summary

Type of the overture. Availables values are "Door" , "Window" , "Garage" , "Velux" , "Dormer"

width

Syntax

width

Number

Summary

Width of the overture.