Class HomeFurnitureGroup
Extends
HomePieceOfFurniture.
Defined in: SweetHome3D.js.
Constructor Attributes | Constructor Name and Description |
---|---|
HomeFurnitureGroup(id, furniture, angle, modelMirrored, name)
Creates a group from the given
furniture list. |
Method Attributes | Method Name and Description |
---|---|
clone()
Returns a clone of this group with cloned furniture.
|
|
containsPoint(x, y, margin)
Returns
true if one of the pieces of this group contains
the point at (x , y )
with a given margin . |
|
Returns a copy of this object and its children with new ids.
|
|
Returns the furniture of this group and of all its subgroups, including the possible child furniture groups.
|
|
Returns the catalog ID of this group.
|
|
getColor()
Returns
null . |
|
Returns the creator set for this group.
|
|
Returns the currency of the furniture of this group
or
null if one piece has no currency
or has a currency different from the other furniture. |
|
getDepth()
Returns the depth of this group.
|
|
Returns the depth of this group.
|
|
Returns the elevation at which should be placed an object dropped on this group.
|
|
Returns a list of the furniture of this group.
|
|
Returns the height of this group.
|
|
Returns the height of this group.
|
|
getIcon()
Returns
null . |
|
Returns the information associated with this group.
|
|
getModel()
Returns
null . |
|
Returns 0.
|
|
Returns
null . |
|
Returns an identity matrix.
|
|
Returns
null . |
|
Returns
null . |
|
getPitch()
Returns 0.
|
|
Returns
null . |
|
getPrice()
Returns the price of the furniture of this group with a price.
|
|
Returns the total price of the furniture of this group.
|
|
getRoll()
Returns 0.
|
|
Returns
null . |
|
Returns
null . |
|
Returns
null . |
|
Returns the VAT of the furniture of this group.
|
|
Returns the VAT percentage of the furniture of this group
or
null if one piece has no VAT percentage
or has a VAT percentage different from the other furniture. |
|
getWidth()
Returns the width of this group.
|
|
Returns the width of this group.
|
|
intersectsRectangle(x0, y0, x1, y1)
Returns
true if one of the pieces of this group intersects
with the horizontal rectangle which opposite corners are at points
(x0 , y0 ) and (x1 , y1 ). |
|
Returns
false . |
|
Returns
true if all furniture of this group are deformable. |
|
Returns
true if all furniture of this group are doors or windows. |
|
Returns
false . |
|
Returns
true if this piece or a child of this group is rotated around an horizontal axis. |
|
Returns
true . |
|
Returns
true if this group is movable. |
|
Returns
true if all furniture of this group are resizable. |
|
Returns
true if all furniture of this group are texturable. |
|
scale(scale)
Scales this group and its children with the given
ratio . |
|
setAngle(angle)
Sets the
angle of the furniture of this group. |
|
setBackFaceShown(backFaceShown)
|
|
setColor(color)
Sets the
color of the furniture of this group. |
|
setDepth(depth)
Sets the
depth of this group, then moves and resizes its furniture accordingly. |
|
setElevation(elevation)
Sets the
elevation of this group, then moves its furniture accordingly. |
|
setHeight(height)
Sets the
height of this group, then moves and resizes its furniture accordingly. |
|
setIcon(icon)
|
|
setLevel(level)
Set the level of this group and the furniture it contains.
|
|
setModel(model)
|
|
setModelFlags(modelFlags)
|
|
setModelMaterials(modelMaterials)
Sets the materials of the furniture of this group.
|
|
setModelMirrored(modelMirrored)
Sets whether the furniture of this group should be mirrored or not.
|
|
setModelRotation(modelRotation)
|
|
setModelSize(modelSize)
|
|
setModelTransformations(modelTransformations)
Sets the transformations of this group.
|
|
setMovable(movable)
Sets whether this group is movable or not.
|
|
setPlanIcon(planIcon)
|
|
setPrice(price)
Sets the price of this group.
|
|
setShininess(shininess)
Sets the shininess of the furniture of this group.
|
|
setStaircaseCutOutShape(staircaseCutOutShape)
|
|
setTexture(texture)
Sets the
texture of the furniture of this group. |
|
setVisible(visible)
Sets whether the furniture of this group should be visible or not.
|
|
setWidth(width)
Sets the
width of this group, then moves and resizes its furniture accordingly. |
|
setX(x)
Sets the
abscissa of this group and moves its furniture accordingly. |
|
setY(y)
Sets the
ordinate of this group and moves its furniture accordingly. |
- Methods borrowed from class HomePieceOfFurniture:
- getAngle, getDescription, getElevation, getGroundElevation, getLevel, getLicense, getName, getNameAngle, getNameStyle, getNameXOffset, getNameYOffset, getPoints, getX, getY, isAtLevel, isBottomLeftPointAt, isBottomRightPointAt, isModelMirrored, isNameCenterPointAt, isNameVisible, isParallelToWall, isPointAt, isTopLeftPointAt, isTopRightPointAt, isVisible, isWidthDepthDeformable, move, setCatalogId, setCreator, setCurrency, setDepthInPlan, setDescription, setHeightInPlan, setInformation, setLicense, setModelCenteredAtOrigin, setName, setNameAngle, setNameStyle, setNameVisible, setNameXOffset, setNameYOffset, setPitch, setRoll, setValueAddedTaxPercentage, setWidthInPlan
- Methods borrowed from class HomeObject:
- firePropertyChange, getContentProperty, getId, getProperty, getPropertyNames, isContentProperty, setProperty
Class Detail
HomeFurnitureGroup(id, furniture, angle, modelMirrored, name)
Creates a group from the given
Author: Emmanuel Puybaret.
furniture
list.
The level of each piece of furniture of the group will be reset to null
and if they belong to levels
with different elevations, their elevation will be updated to be relative to the elevation of the lowest level.
Author: Emmanuel Puybaret.
- Parameters:
- {string} id
- {HomePieceOfFurniture[]} furniture
- {number} angle
- {boolean} modelMirrored
- {string} name
Method Detail
{HomeFurnitureGroup}
clone()
Returns a clone of this group with cloned furniture.
- Returns:
- {HomeFurnitureGroup}
{boolean}
containsPoint(x, y, margin)
Returns
true
if one of the pieces of this group contains
the point at (x
, y
)
with a given margin
.
- Parameters:
- {number} x
- {number} y
- {number} margin
- Returns:
- {boolean}
{HomeObject}
duplicate()
Returns a copy of this object and its children with new ids.
- Returns:
- {HomeObject}
{HomePieceOfFurniture[]}
getAllFurniture()
Returns the furniture of this group and of all its subgroups, including the possible child furniture groups.
- Returns:
- {HomePieceOfFurniture[]}
{string}
getCatalogId()
Returns the catalog ID of this group.
- Returns:
- {string}
{number}
getColor()
Returns
null
.
- Returns:
- {number}
{string}
getCreator()
Returns the creator set for this group.
- Returns:
- {string}
{string}
getCurrency()
Returns the currency of the furniture of this group
or
null
if one piece has no currency
or has a currency different from the other furniture.
- Returns:
- {string}
{number}
getDepth()
Returns the depth of this group.
- Returns:
- {number}
{number}
getDepthInPlan()
Returns the depth of this group. As a group can't be rotated around an horizontal axis,
its depth in the horizontal plan is equal to its depth.
- Returns:
- {number}
{number}
getDropOnTopElevation()
Returns the elevation at which should be placed an object dropped on this group.
- Returns:
- {number}
{HomePieceOfFurniture[]}
getFurniture()
Returns a list of the furniture of this group.
- Returns:
- {HomePieceOfFurniture[]}
{number}
getHeight()
Returns the height of this group.
- Returns:
- {number}
{number}
getHeightInPlan()
Returns the height of this group. As a group can't be rotated around an horizontal axis,
its height in the horizontal plan is equal to its height.
- Returns:
- {number}
{Object}
getIcon()
Returns
null
.
- Returns:
- {Object}
{string}
getInformation()
Returns the information associated with this group.
- Returns:
- {string}
{Object}
getModel()
Returns
null
.
- Returns:
- {Object}
{number}
getModelFlags()
Returns 0.
- Returns:
- {number}
{com.eteks.sweethome3d.model.HomeMaterial[]}
getModelMaterials()
Returns
null
.
- Returns:
- {com.eteks.sweethome3d.model.HomeMaterial[]}
{float[][]}
getModelRotation()
Returns an identity matrix.
- Returns:
- {float[][]}
{number}
getModelSize()
Returns
null
.
- Returns:
- {number}
{com.eteks.sweethome3d.model.Transformation[]}
getModelTransformations()
Returns
null
.
- Returns:
- {com.eteks.sweethome3d.model.Transformation[]}
{number}
getPitch()
Returns 0.
- Returns:
- {number}
{Object}
getPlanIcon()
Returns
null
.
- Returns:
- {Object}
{Big}
getPrice()
Returns the price of the furniture of this group with a price.
- Returns:
- {Big}
{Big}
getPriceValueAddedTaxIncluded()
Returns the total price of the furniture of this group.
- Returns:
- {Big}
{number}
getRoll()
Returns 0.
- Returns:
- {number}
{number}
getShininess()
Returns
null
.
- Returns:
- {number}
{string}
getStaircaseCutOutShape()
Returns
null
.
- Returns:
- {string}
{HomeTexture}
getTexture()
Returns
null
.
- Returns:
- {HomeTexture}
{Big}
getValueAddedTax()
Returns the VAT of the furniture of this group.
- Returns:
- {Big}
{Big}
getValueAddedTaxPercentage()
Returns the VAT percentage of the furniture of this group
or
null
if one piece has no VAT percentage
or has a VAT percentage different from the other furniture.
- Returns:
- {Big}
{number}
getWidth()
Returns the width of this group.
- Returns:
- {number}
{number}
getWidthInPlan()
Returns the width of this group. As a group can't be rotated around an horizontal axis,
its width in the horizontal plan is equal to its width.
- Returns:
- {number}
{boolean}
intersectsRectangle(x0, y0, x1, y1)
Returns
true
if one of the pieces of this group intersects
with the horizontal rectangle which opposite corners are at points
(x0
, y0
) and (x1
, y1
).
- Parameters:
- {number} x0
- {number} y0
- {number} x1
- {number} y1
- Returns:
- {boolean}
{boolean}
isBackFaceShown()
Returns
false
.
- Returns:
- {boolean}
{boolean}
isDeformable()
Returns
true
if all furniture of this group are deformable.
- Returns:
- {boolean}
{boolean}
isDoorOrWindow()
Returns
true
if all furniture of this group are doors or windows.
- Returns:
- {boolean}
{boolean}
isHorizontallyRotatable()
Returns
false
.
- Returns:
- {boolean}
{boolean}
isHorizontallyRotated()
Returns
true
if this piece or a child of this group is rotated around an horizontal axis.
- Returns:
- {boolean}
{boolean}
isModelCenteredAtOrigin()
Returns
true
.
- Returns:
- {boolean}
{boolean}
isMovable()
Returns
true
if this group is movable.
- Returns:
- {boolean}
{boolean}
isResizable()
Returns
true
if all furniture of this group are resizable.
- Returns:
- {boolean}
{boolean}
isTexturable()
Returns
true
if all furniture of this group are texturable.
- Returns:
- {boolean}
scale(scale)
Scales this group and its children with the given
ratio
.
- Parameters:
- {number} scale
setAngle(angle)
Sets the
angle
of the furniture of this group.
- Parameters:
- {number} angle
setBackFaceShown(backFaceShown)
- Parameters:
- {boolean} backFaceShown
- Throws:
- IllegalStateException
setColor(color)
Sets the
color
of the furniture of this group.
- Parameters:
- {number} color
setDepth(depth)
Sets the
depth
of this group, then moves and resizes its furniture accordingly.
This method shouldn't be called on a group that contain furniture rotated around an horizontal axis.
- Parameters:
- {number} depth
setElevation(elevation)
Sets the
elevation
of this group, then moves its furniture accordingly.
- Parameters:
- {number} elevation
setHeight(height)
Sets the
height
of this group, then moves and resizes its furniture accordingly.
This method shouldn't be called on a group that contain furniture rotated around an horizontal axis.
- Parameters:
- {number} height
setIcon(icon)
- Parameters:
- {Object} icon
- Throws:
- IllegalStateException
setLevel(level)
Set the level of this group and the furniture it contains.
- Parameters:
- {Level} level
setModel(model)
- Parameters:
- {Object} model
- Throws:
- IllegalStateException
setModelFlags(modelFlags)
- Parameters:
- {number} modelFlags
- Throws:
- IllegalStateException
setModelMaterials(modelMaterials)
Sets the materials of the furniture of this group.
- Parameters:
- {com.eteks.sweethome3d.model.HomeMaterial[]} modelMaterials
setModelMirrored(modelMirrored)
Sets whether the furniture of this group should be mirrored or not.
- Parameters:
- {boolean} modelMirrored
setModelRotation(modelRotation)
- Parameters:
- {float[][]} modelRotation
- Throws:
- IllegalStateException
setModelSize(modelSize)
- Parameters:
- {number} modelSize
- Throws:
- IllegalStateException
setModelTransformations(modelTransformations)
Sets the transformations of this group.
- Parameters:
- {com.eteks.sweethome3d.model.Transformation[]} modelTransformations
setMovable(movable)
Sets whether this group is movable or not.
- Parameters:
- {boolean} movable
setPlanIcon(planIcon)
- Parameters:
- {Object} planIcon
- Throws:
- IllegalStateException
setPrice(price)
Sets the price of this group.
- Parameters:
- {Big} price
- Throws:
- UnsupportedOperationException if the price of one of the pieces is set
setShininess(shininess)
Sets the shininess of the furniture of this group.
- Parameters:
- {number} shininess
setStaircaseCutOutShape(staircaseCutOutShape)
- Parameters:
- {string} staircaseCutOutShape
- Throws:
- IllegalStateException
setTexture(texture)
Sets the
texture
of the furniture of this group.
- Parameters:
- {HomeTexture} texture
setVisible(visible)
Sets whether the furniture of this group should be visible or not.
- Parameters:
- {boolean} visible
setWidth(width)
Sets the
width
of this group, then moves and resizes its furniture accordingly.
This method shouldn't be called on a group that contain furniture rotated around an horizontal axis.
- Parameters:
- {number} width
setX(x)
Sets the
abscissa
of this group and moves its furniture accordingly.
- Parameters:
- {number} x
setY(y)
Sets the
ordinate
of this group and moves its furniture accordingly.
- Parameters:
- {number} y