Class Index | File Index

Classes


Class CatalogPieceOfFurniture


Defined in: SweetHome3D.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
CatalogPieceOfFurniture(id, name, description, information, tags, creationDate, grade, icon, planIcon, model, width, depth, height, elevation, dropOnTopElevation, movable, staircaseCutOutShape, modelRotation, backFaceShown, modelSize, creator, resizable, deformable, texturable, horizontallyRotatable, price, valueAddedTaxPercentage, currency)
Creates a catalog piece of furniture of the default catalog.
Method Summary
Method Attributes Method Name and Description
 
compareTo(piece)
Compares the names of this piece and the one in parameter.
 
equals(obj)
Returns true if this piece and the one in parameter are the same objects.
 
Returns the category of this piece of furniture.
 
Returns the color of this piece of furniture.
 
Returns the creation date of this piece in milliseconds since the epoch, or null if no date is given to this piece.
 
Returns the creator of this piece.
 
Returns the price currency, noted with ISO 4217 code, or null if it has no price or default currency should be used.
 
Returns the depth of this piece of furniture.
 
Returns the description of this piece of furniture.
 
Returns the elevation at which should be placed an object dropped on this piece.
 
Returns the elevation of this piece of furniture.
 
Returns the grade of this piece, or null if no grade is given to this piece.
 
Returns the height of this piece of furniture.
 
Returns the icon of this piece of furniture.
 
Returns the yaw angle used to create the piece icon.
 
Returns the ID of this piece of furniture or null.
 
Returns the additional information associated to this piece, or null.
 
Returns the 3D model of this piece of furniture.
 
Returns the rotation 3 by 3 matrix of this piece of furniture that ensures its model is correctly oriented.
 
Returns the size of the 3D model of this piece of furniture.
 
Returns the name of this piece of furniture.
 
Returns the icon of this piece of furniture displayed in plan or null.
 
Returns the price of this piece of furniture or null.
 
Returns the shape used to cut out upper levels when they intersect with the piece like a staircase.
 
Returns the tags associated to this piece.
 
Returns the Value Added Tax percentage applied to the price of this piece of furniture.
 
Returns the width of this piece of furniture.
 
Returns true if the back face of the piece of furniture model should be displayed.
 
Returns true if this piece is deformable.
 
Returns true if this piece of furniture is a door or a window.
 
Returns false if this piece should not rotate around an horizontal axis.
 
Returns true if this piece is modifiable (not read from resources).
 
Returns true if this piece of furniture is movable.
 
Returns true if size proportions should be kept.
 
Returns true if this piece is resizable.
 
Returns false if this piece should always keep the same color or texture.
 
Returns true if this piece is deformable.
 
matchesFilter(filter)
Returns true if this piece matches the given filter text.
 
setCategory(category)
Sets the category of this piece of furniture.
Class Detail
CatalogPieceOfFurniture(id, name, description, information, tags, creationDate, grade, icon, planIcon, model, width, depth, height, elevation, dropOnTopElevation, movable, staircaseCutOutShape, modelRotation, backFaceShown, modelSize, creator, resizable, deformable, texturable, horizontallyRotatable, price, valueAddedTaxPercentage, currency)
Creates a catalog piece of furniture of the default catalog.
Caution: The constructor of CatalogPieceOfFurniture was modified in version 5.5 with incompatible changes with previous versions and might require some changes in your program.
Author: Emmanuel Puybaret.
Parameters:
{string} id
the id of the new piece or null
{string} name
the name of the new piece
{string} description
the description of the new piece
{string} information
additional information associated to the new piece
{Array} tags
tags associated to the new piece
{number} creationDate
creation date of the new piece in milliseconds since the epoch
{number} grade
grade of the piece of furniture or null
{Object} icon
content of the icon of the new piece
{Object} planIcon
content of the icon of the new piece displayed in plan
{Object} model
content of the 3D model of the new piece
{number} width
the width in centimeters of the new piece
{number} depth
the depth in centimeters of the new piece
{number} height
the height in centimeters of the new piece
{number} elevation
the elevation in centimeters of the new piece
{number} dropOnTopElevation
a percentage of the height at which should be placed an object dropped on the new piece
{boolean} movable
if true, the new piece is movable
{string} staircaseCutOutShape
the shape used to cut out upper levels when they intersect with the piece like a staircase
{Array} modelRotation
the rotation 3 by 3 matrix applied to the piece model
{boolean} backFaceShown
true if back face should be shown instead of front faces
{number} modelSize
size of the 3D model of the new piece
{string} creator
the creator of the model
{boolean} resizable
if true, the size of the new piece may be edited
{boolean} deformable
if true, the width, depth and height of the new piece may change independently from each other
{boolean} texturable
if false this piece should always keep the same color or texture
{boolean} horizontallyRotatable
if false this piece should not rotate around an horizontal axis
{Big} price
the price of the new piece or null
{Big} valueAddedTaxPercentage
the Value Added Tax percentage applied to the price of the new piece or null
{string} currency
the price currency, noted with ISO 4217 code, or null
Method Detail
{number} compareTo(piece)
Compares the names of this piece and the one in parameter.
Parameters:
{CatalogPieceOfFurniture} piece
Returns:
{number}

{boolean} equals(obj)
Returns true if this piece and the one in parameter are the same objects. Note that, from version 3.6, two pieces of furniture can have the same name.
Parameters:
{Object} obj
Returns:
{boolean}

{FurnitureCategory} getCategory()
Returns the category of this piece of furniture.
Returns:
{FurnitureCategory}

{number} getColor()
Returns the color of this piece of furniture.
Returns:
{number}

{number} getCreationDate()
Returns the creation date of this piece in milliseconds since the epoch, or null if no date is given to this piece.
Returns:
{number}

{string} getCreator()
Returns the creator of this piece.
Returns:
{string}

{string} getCurrency()
Returns the price currency, noted with ISO 4217 code, or null if it has no price or default currency should be used.
Returns:
{string}

{number} getDepth()
Returns the depth of this piece of furniture.
Returns:
{number}

{string} getDescription()
Returns the description of this piece of furniture. The returned value may be null.
Returns:
{string}

{number} getDropOnTopElevation()
Returns the elevation at which should be placed an object dropped on this piece.
Returns:
{number} a percentage of the height of this piece. A negative value means that the piece should be ignored when an object is dropped on it.

{number} getElevation()
Returns the elevation of this piece of furniture.
Returns:
{number}

{number} getGrade()
Returns the grade of this piece, or null if no grade is given to this piece.
Returns:
{number}

{number} getHeight()
Returns the height of this piece of furniture.
Returns:
{number}

{Object} getIcon()
Returns the icon of this piece of furniture.
Returns:
{Object}

{number} getIconYaw()
Returns the yaw angle used to create the piece icon.
Returns:
{number}

{string} getId()
Returns the ID of this piece of furniture or null.
Returns:
{string}

{string} getInformation()
Returns the additional information associated to this piece, or null.
Returns:
{string}

{Object} getModel()
Returns the 3D model of this piece of furniture.
Returns:
{Object}

{Array} getModelRotation()
Returns the rotation 3 by 3 matrix of this piece of furniture that ensures its model is correctly oriented.
Returns:
{Array}

{number} getModelSize()
Returns the size of the 3D model of this piece of furniture.
Returns:
{number}

{string} getName()
Returns the name of this piece of furniture.
Returns:
{string}

{Object} getPlanIcon()
Returns the icon of this piece of furniture displayed in plan or null.
Returns:
{Object}

{Big} getPrice()
Returns the price of this piece of furniture or null.
Returns:
{Big}

{string} getStaircaseCutOutShape()
Returns the shape used to cut out upper levels when they intersect with the piece like a staircase.
Returns:
{string}

{Array} getTags()
Returns the tags associated to this piece.
Returns:
{Array}

{Big} getValueAddedTaxPercentage()
Returns the Value Added Tax percentage applied to the price of this piece of furniture.
Returns:
{Big}

{number} getWidth()
Returns the width of this piece of furniture.
Returns:
{number}

{boolean} isBackFaceShown()
Returns true if the back face of the piece of furniture model should be displayed.
Returns:
{boolean}

{boolean} isDeformable()
Returns true if this piece is deformable.
Returns:
{boolean}

{boolean} isDoorOrWindow()
Returns true if this piece of furniture is a door or a window. As this method existed before {@linkplain CatalogDoorOrWindow CatalogDoorOrWindow} class, you shouldn't rely on the value returned by this method to guess if a piece is an instance of DoorOrWindow class.
Returns:
{boolean}

{boolean} isHorizontallyRotatable()
Returns false if this piece should not rotate around an horizontal axis.
Returns:
{boolean}

{boolean} isModifiable()
Returns true if this piece is modifiable (not read from resources).
Returns:
{boolean}

{boolean} isMovable()
Returns true if this piece of furniture is movable.
Returns:
{boolean}

{boolean} isProportional()
Returns true if size proportions should be kept.
Returns:
{boolean}

{boolean} isResizable()
Returns true if this piece is resizable.
Returns:
{boolean}

{boolean} isTexturable()
Returns false if this piece should always keep the same color or texture.
Returns:
{boolean}

{boolean} isWidthDepthDeformable()
Returns true if this piece is deformable.
Returns:
{boolean}

{boolean} matchesFilter(filter)
Returns true if this piece matches the given filter text. Each substring of the filter is considered as a search criterion that can match the name, the category name, the creator, the description or the tags of this piece.
Parameters:
{string} filter
Returns:
{boolean}

setCategory(category)
Sets the category of this piece of furniture.
Parameters:
{FurnitureCategory} category

© Copyrights 2017 Emmanuel PUYBARET / eTeks
Distributed under GNU General Public License
Documentation generated by JsDoc Toolkit 2.4.0 on Wed Oct 25 2017 16:36:08 GMT+0200 (CEST)