API Docs for: 2.7.3
Show:

OvertureStructure Class

Extends BaseStructure
Module: Component
Parent Module: Wanaplan

Overture structure.

Constructor

OvertureStructure

()

Methods

add

(
  • propertyName
  • value
)
private

Inherited from BaseStructure:

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

(
  • structure
)

Checks the coherence of all the parameters.

Parameters:

clampSize

(
  • allowDelete
  • structure
)

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

(
  • newWall
)
BABYLON.Vector2

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

Parameters:

Returns:

BABYLON.Vector2:

The new position.

deserialize

(
  • hybrid
)
Object

Inherited from BaseStructure:

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

() Object

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

() Number

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

Returns:

Number:

The angle.

getAvailableProperties

() Array

Returns the user-customizable properties of this overture.

Returns:

Array:

Properties.

getElementByName

(
  • name
  • collection
)
Object private

Inherited from BaseStructure:

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

(
  • collection
)
FloorStructure

Inherited from BaseStructure:

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

(
  • name
)
Material

Gets a material from the list.

Parameters:

  • name String

    The name of the material to fetch.

Returns:

Material:

The material.

getParentWall

() WallStructure

Gets the parent wall of the overture.

Returns:

WallStructure:

The parent of the overture.

getPolygon

() BABYLON.Vector2

Returns the polygon describing the overture.

Returns:

BABYLON.Vector2:

The array of the points of the polygon.

guessSide

(
  • mousePosition
)

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

Parameters:

  • mousePosition BABYLON.Vector2

    The position of the mouse.

initialize

() private

Inherited from BaseStructure:

Method called after the loading of the component

projectOnWall

()

Projects the position of the overture on its parent wall.

remove

(
  • structure
)

Deletes the overture.

Parameters:

  • structure FloorStructure

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

serialize

() Object

Inherited from BaseStructure:

Serializes the object (to JSON)

Returns:

Object: The serialization result, null if nothing is serialized

setMaterial

(
  • material
  • name
)

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

(
  • wall
)

Sets the parent wall of the overture.

Parameters:

update

()

Inherited from BaseStructure:

Generic update method, must be overridden.

updateReferences

(
  • structure
)

Inherited from BaseStructure:

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

Number

The thickness of the structure.

elevation

Number

Elevation of the overture.

height

Number

Height of the structure.

hinge

Number

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

id

Number

Inherited from BaseStructure:

Unique ID for the structure set up automatically

minsize

Number

The minimum size of the overture.

name

String

Inherited from BaseStructure:

Structure name

nbCasement

Number

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

parentWall

WallStructure

The parent wall.

plinte

Boolean

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

position

BABYLON.Vector2

Position of the overture.

programmableInstance

BABYLON.Mesh

The instance of the programmable.

side

Number

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

sliding

Boolean

If the overture is sliding or not.

thickness

Number

Thickness of the overture.

type

String

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

width

Number

Width of the overture.