Class Index | File Index

Classes


Class CatalogPieceOfFurniture


Defined in: SweetHome3D.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
CatalogPieceOfFurniture(id, name, description, information, license, tags, creationDate, grade, icon, planIcon, model, width, depth, height, elevation, dropOnTopElevation, movable, staircaseCutOutShape, modelRotation, modelFlags, modelSize, creator, resizable, deformable, texturable, horizontallyRotatable, price, valueAddedTaxPercentage, currency, properties, contents)
Creates a catalog piece of furniture of the default catalog.
Method Summary
Method Attributes Method Name and Description
 
Returns a clone of this piece.
 
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 value of an additional content name associated to this piece.
 
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 strings used as criteria for filtering (name, category, creator, license, description and tags).
 
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 pitch angle used to create the piece icon.
 
Returns the scale used to create the piece icon.
 
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 license associated to this piece, or null.
 
Returns the 3D model of this piece of furniture.
 
Returns the flags which should be applied to 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 value of an additional property name of this piece.
 
Returns the names of the additional properties of this piece.
 
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 default hash code.
 
Returns true if the back face of the piece of furniture model should be displayed.
 
Returns true if the type of given additional property is a content.
 
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.
Class Detail
CatalogPieceOfFurniture(id, name, description, information, license, tags, creationDate, grade, icon, planIcon, model, width, depth, height, elevation, dropOnTopElevation, movable, staircaseCutOutShape, modelRotation, modelFlags, modelSize, creator, resizable, deformable, texturable, horizontallyRotatable, price, valueAddedTaxPercentage, currency, properties, contents)
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
{string} license
license of the new piece
{java.lang.String[]} 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
{float[][]} modelRotation
the rotation 3 by 3 matrix applied to the piece model
{number} modelFlags
flags which should be applied to piece model
{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
{Object} properties
additional properties associating a key to a value or null
{Object} contents
additional contents associating a key to a value or null
Method Detail
{CatalogPieceOfFurniture} clone()
Returns a clone of this piece.
Returns:
{CatalogPieceOfFurniture}

{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}

{Object} getContentProperty(name)
Returns the value of an additional content name associated to this piece.
Parameters:
{string} name
Returns:
{Object} the value of the content or null if it doesn't exist or if it's not a content.

{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}

{java.lang.String[]} getFilterCriteria()
Returns the strings used as criteria for filtering (name, category, creator, license, description and tags).
Returns:
{java.lang.String[]}
See:
CatalogPieceOfFurniture#matchesFilter(String)

{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} getIconPitch()
Returns the pitch angle used to create the piece icon.
Returns:
{number}

{number} getIconScale()
Returns the scale used to create the piece icon.
Returns:
{number}

{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}

{string} getLicense()
Returns the license associated to this piece, or null.
Returns:
{string}

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

{number} getModelFlags()
Returns the flags which should be applied to the 3D model of this piece of furniture.
Returns:
{number}

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

{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} getProperty(name)
Returns the value of an additional property name of this piece.
Parameters:
{string} name
Returns:
{string} the value of the property or null if it doesn't exist or if it's not a string.

{string[]} getPropertyNames()
Returns the names of the additional properties of this piece.
Returns:
{string[]} a collection of all the names of the properties

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

{java.lang.String[]} getTags()
Returns the tags associated to this piece.
Returns:
{java.lang.String[]}

{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}

{number} hashCode()
Returns default hash code.
Returns:
{number}

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

{boolean} isContentProperty(name)
Returns true if the type of given additional property is a content.
Parameters:
{string} name
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 license, the description or the tags of this piece.
Parameters:
{string} filter
Returns:
{boolean}

© Copyright 2024 Space Mushrooms
Distributed under GNU General Public License
Documentation generated by JsDoc Toolkit 2.4.0 on Wed Aug 21 2024 17:43:22 GMT+0200 (CEST)