WanaPlan

API Docs for: 2.7.0
Show:

SubSlopeOvertureStructure

Extends BaseStructure
Module: Component
Parent Module: Wanaplan

Summary

The structure for a subslope overture (dormer, velux... ).

Constructor

SubSlopeOvertureStructure

Syntax

SubSlopeOvertureStructure

()

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.

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

getAbsolutePosition

Syntax

getAbsolutePosition

() Object

Summary

Returns the absolute position of this subslope overture.

Returns:

Object:

A nested object whose fields are :

  • position Absolute position (BABYLON.Vector2)
  • vector Always null.

getAvailableProperties

Syntax

getAvailableProperties

() Array

Summary

Obtient les propriétés de l'objet.

Returns:

Array:

Un tableau contenant les différentes propriétés de l'objet.

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]
)
BABYLON.Material

Summary

Gets the current materials.

Parameters:

  • [name] String optional

    If this parameter is provided, only the material of the mesh of this name will be returned.

Returns:

BABYLON.Material:

The material(s). A nested object is returned if no name parameter has been specified.

getParent

Syntax

getParent

()

Summary

Returns the parent of this subslopeOverture.

initialize

Inherited from BaseStructure:

Syntax

initialize

() private

Summary

Method called after the loading of the component

isTargeted

Syntax

isTargeted

() Boolean

Summary

Tests if the given vector is inside the polygon of the subslope overture.

Returns:

Boolean:

True if the vector lies inside the polygon.

remove

Syntax

remove

()

Summary

Removes the subslope overture from the subslope.

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

Sets the material on a specific mesh of the subslope overture.

Parameters:

  • material BABYLON.Material

    The new Material.

  • name String

    The name of the mesh you want to change the material of.

setParent

Syntax

setParent

(
  • subslope
)

Summary

Sets the parent of the subslope overture.

Parameters:

to3D

Syntax

to3D

() private

Summary

????

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

dormerRoof

Syntax

dormerRoof

Object

Summary

Params of the roof of the dormer.

height

Syntax

height

Number

Summary

Height of the subslopeOverture.

Default: 150

id

Inherited from BaseStructure:

Syntax

id

Number

Summary

Unique ID for the structure set up automatically

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

Default: 1

parent

Syntax

Summary

The subslope where the SubslopeOverture belongs.

polygon

Syntax

polygon

BABYLON.Vector2

Summary

The 2D polygon vertices of the subslopeOverture. The length of this array is always 4 at all times.

position

Syntax

position

BABYLON.Vector2

Summary

Position of the subslopeOverture.

sliding

Syntax

sliding

Boolean

Summary

If the subslopeOverture is sliding or not.

Default: false

thickness

Syntax

thickness

Number

Summary

Thickness of the subslopeOverture.

Default: 5

type

Syntax

type

String

Summary

Type of the subslopeOverture. Availables values are "Velux" , "Dormer"

wallThickness

Syntax

wallThickness

Number

Summary

Thickness of the wall of the dormer.

Default: 10

width

Syntax

width

Number

Summary

Width of the subslopeOverture.

Default: 100