Class HomePieceOfFurniture
Extends
HomeObject.
Defined in: SweetHome3D.js.
Constructor Attributes | Constructor Name and Description |
---|---|
HomePieceOfFurniture(id, piece, copiedProperties)
Creates a home piece of furniture from an existing piece.
|
Method Attributes | Method Name and Description |
---|---|
clone()
Returns a clone of this piece.
|
|
containsPoint(x, y, margin)
Returns
true if this piece contains
the point at (x , y )
with a given margin . |
|
getAngle()
Returns the angle in radians of this piece around vertical axis.
|
|
Returns the catalog ID of this piece of furniture or
null if it doesn't exist. |
|
getColor()
Returns the color of this piece of furniture.
|
|
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. |
|
getDepth()
Returns the depth of this piece of furniture.
|
|
Returns the depth of this piece of furniture in the horizontal plan (after pitch or roll is applied to it).
|
|
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 the bottom of this piece of furniture on its level.
|
|
<static> |
HomePieceOfFurniture.getFurnitureComparator(property)
Returns a comparator which compares furniture on a given
property in ascending order. |
Returns the elevation of the bottom of this piece of furniture
from the ground according to the elevation of its level.
|
|
Returns the height of this piece of furniture.
|
|
Returns the height of this piece of furniture from the horizontal plan (after pitch or roll is applied to it).
|
|
getIcon()
Returns the icon of this piece of furniture.
|
|
Returns the additional information associated to this piece, or
null . |
|
getLevel()
Returns the level which this piece belongs to.
|
|
Returns the license of this piece, or
null . |
|
getModel()
Returns the 3D model of this piece of furniture.
|
|
Returns the flags applied to the piece of furniture model.
|
|
Returns the materials 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 transformations applied to the 3D model of this piece of furniture.
|
|
getName()
Returns the name of this piece of furniture.
|
|
Returns the angle in radians used to display the piece name.
|
|
Returns the text style used to display piece name.
|
|
Returns the distance along x axis applied to piece abscissa to display piece name.
|
|
Returns the distance along y axis applied to piece ordinate
to display piece name.
|
|
getPitch()
Returns the pitch angle in radians of this piece of furniture.
|
|
Returns the icon of this piece of furniture displayed in plan or
null . |
|
Returns the points of each corner of a piece.
|
|
getPrice()
Returns the price of this piece of furniture or
null . |
|
Returns the price of this piece of furniture, Value Added Tax included.
|
|
getRoll()
Returns the roll angle in radians of this piece of furniture.
|
|
Returns the shininess of this piece of furniture.
|
|
Returns the shape used to cut out upper levels when they intersect with the piece
like a staircase.
|
|
Returns the texture of this piece of furniture.
|
|
Returns the Value Added Tax applied to the price of this piece of furniture.
|
|
Returns the Value Added Tax percentage applied to the price of this piece of furniture.
|
|
getWidth()
Returns the width of this piece of furniture.
|
|
Returns the width of this piece of furniture in the horizontal plan (after pitch or roll is applied to it).
|
|
getX()
Returns the abscissa of the center of this piece of furniture.
|
|
getY()
Returns the ordinate of the center of this piece of furniture.
|
|
intersectsRectangle(x0, y0, x1, y1)
Returns
true if this piece intersects
with the horizontal rectangle which opposite corners are at points
(x0 , y0 ) and (x1 , y1 ). |
|
isAtLevel(level)
Returns
true if this piece is at the given level
or at a level with the same elevation and a smaller elevation index
or if the elevation of its highest point is higher than level elevation. |
|
Returns
true if the back face of the piece of furniture
model should be displayed. |
|
isBottomLeftPointAt(x, y, margin)
Returns
true if the bottom left point of this piece is
the point at (x , y ) with a given margin ,
and if that point is closer to bottom left point than to top left and bottom right points. |
|
isBottomRightPointAt(x, y, margin)
Returns
true if the bottom right point of this piece is
the point at (x , y ) with a given margin ,
and if that point is closer to top left point than to top right and bottom left points. |
|
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 the pitch or roll angle of this piece is different from 0. |
|
Returns
true if model center should be always centered at the origin
when model rotation isn't null . |
|
Returns
true if the model of this piece should be mirrored. |
|
Returns
true if this piece of furniture is movable. |
|
isNameCenterPointAt(x, y, margin)
Returns
true if the center point at which is displayed the name
of this piece is equal to the point at (x , y )
with a given margin . |
|
Returns whether the name of this piece should be drawn or not.
|
|
isParallelToWall(wall)
Returns
true if the front side of this piece is parallel to the given wall
with a margin. |
|
isPointAt(x, y, margin)
Returns
true if one of the corner of this piece is
the point at (x , y ) with a given margin . |
|
Returns
true if this piece is resizable. |
|
Returns
false if this piece should always keep the same color or texture. |
|
isTopLeftPointAt(x, y, margin)
Returns
true if the top left point of this piece is
the point at (x , y ) with a given margin ,
and if that point is closer to top left point than to top right and bottom left points. |
|
isTopRightPointAt(x, y, margin)
Returns
true if the top right point of this piece is
the point at (x , y ) with a given margin ,
and if that point is closer to top right point than to top left and bottom right points. |
|
Returns
true if this piece of furniture is visible. |
|
Returns
true if this piece is deformable. |
|
move(dx, dy)
Moves this piece of (
dx , dy ) units. |
|
scale(scale)
Scales this piece of furniture with the given
scale . |
|
setAngle(angle)
Sets the angle of this piece around vertical axis.
|
|
setBackFaceShown(backFaceShown)
Sets whether the back face of the piece of furniture model should be displayed.
|
|
setCatalogId(catalogId)
Sets the catalog ID of this piece of furniture.
|
|
setColor(color)
Sets the color of this piece of furniture.
|
|
setCreator(creator)
Sets the creator of this piece.
|
|
setCurrency(currency)
Sets the price currency, noted with ISO 4217 code.
|
|
setDepth(depth)
Sets the depth of this piece of furniture.
|
|
setDepthInPlan(depthInPlan)
Sets the depth of this piece of furniture in the horizontal plan (after pitch or roll is applied to it).
|
|
setDescription(description)
Sets the description of this piece of furniture.
|
|
setElevation(elevation)
Sets the elevation of this piece of furniture on its level.
|
|
setHeight(height)
Sets the height of this piece of furniture.
|
|
setHeightInPlan(heightInPlan)
Sets the height of this piece of furniture from the horizontal plan (after pitch or roll is applied to it).
|
|
setIcon(icon)
Sets the icon of this piece of furniture.
|
|
setInformation(information)
Sets the additional information associated to this piece .
|
|
setLevel(level)
Sets the level of this piece of furniture.
|
|
setLicense(license)
Sets the the license of this piece .
|
|
setModel(model)
Sets the 3D model of this piece of furniture.
|
|
setModelCenteredAtOrigin(modelCenteredAtOrigin)
Sets whether model center should be always centered at the origin
when model rotation isn't
null . |
|
setModelFlags(modelFlags)
Sets the flags applied to the piece of furniture model.
|
|
setModelMaterials(modelMaterials)
Sets the materials of the 3D model of this piece of furniture.
|
|
setModelMirrored(modelMirrored)
Sets whether the model of this piece of furniture is mirrored or not.
|
|
setModelRotation(modelRotation)
Sets the rotation 3 by 3 matrix of this piece of furniture and notifies listeners of this change.
|
|
setModelSize(modelSize)
Sets the size of the 3D model of this piece of furniture.
|
|
setModelTransformations(modelTransformations)
Sets the transformations applied to some parts of the 3D model of this piece of furniture.
|
|
setMovable(movable)
Sets whether this piece is movable or not.
|
|
setName(name)
Sets the name of this piece of furniture.
|
|
setNameAngle(nameAngle)
Sets the angle in radians used to display the piece name.
|
|
setNameStyle(nameStyle)
Sets the text style used to display piece name.
|
|
setNameVisible(nameVisible)
Sets whether the name of this piece is visible or not.
|
|
setNameXOffset(nameXOffset)
Sets the distance along x axis applied to piece abscissa to display piece name.
|
|
setNameYOffset(nameYOffset)
Sets the distance along y axis applied to piece ordinate to display piece name.
|
|
setPitch(pitch)
Sets the pitch angle in radians of this piece and notifies listeners of this change.
|
|
setPlanIcon(planIcon)
Sets the plan icon of this piece of furniture.
|
|
setPrice(price)
Sets the price of this piece of furniture.
|
|
setRoll(roll)
Sets the roll angle in radians of this piece and notifies listeners of this change.
|
|
setShininess(shininess)
Sets the shininess of this piece of furniture or
null if piece shininess is unchanged. |
|
setStaircaseCutOutShape(staircaseCutOutShape)
Sets the shape used to cut out upper levels when they intersect with the piece
like a staircase.
|
|
setTexture(texture)
Sets the texture of this piece of furniture.
|
|
setValueAddedTaxPercentage(valueAddedTaxPercentage)
Sets the Value Added Tax percentage applied to prices.
|
|
setVisible(visible)
Sets whether this piece of furniture is visible or not.
|
|
setWidth(width)
Sets the width of this piece of furniture.
|
|
setWidthInPlan(widthInPlan)
Sets the width of this piece of furniture in the horizontal plan (after pitch or roll is applied to it).
|
|
setX(x)
Sets the abscissa of the center of this piece.
|
|
setY(y)
Sets the ordinate of the center of this piece.
|
- Methods borrowed from class HomeObject:
- duplicate, firePropertyChange, getContentProperty, getId, getProperty, getPropertyNames, isContentProperty, setProperty
Class Detail
HomePieceOfFurniture(id, piece, copiedProperties)
Creates a home piece of furniture from an existing piece.
Author: Emmanuel Puybaret.
Author: Emmanuel Puybaret.
- Parameters:
- {string} id
- the ID of the piece
- {Object} piece
- the piece from which data are copied
- {java.lang.String[]} copiedProperties
- the names of the additional properties which should be copied from the existing piece
or
null
if all properties should be copied.
Method Detail
{HomePieceOfFurniture}
clone()
Returns a clone of this piece.
- Returns:
- {HomePieceOfFurniture}
{boolean}
containsPoint(x, y, margin)
Returns
true
if this piece contains
the point at (x
, y
)
with a given margin
.
- Parameters:
- {number} x
- {number} y
- {number} margin
- Returns:
- {boolean}
{number}
getAngle()
Returns the angle in radians of this piece around vertical axis.
- Returns:
- {number}
{string}
getCatalogId()
Returns the catalog ID of this piece of furniture or
null
if it doesn't exist.
- Returns:
- {string}
{number}
getColor()
Returns the color of this piece of furniture.
- Returns:
- {number} the color of the piece as RGB code or
null
if piece color is unchanged.
{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}
{number}
getDepthInPlan()
Returns the depth of this piece of furniture in the horizontal plan (after pitch or roll is applied to it).
- 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 the bottom of this piece of furniture on its level.
- Returns:
- {number}
<static>
{Object}
HomePieceOfFurniture.getFurnitureComparator(property)
Returns a comparator which compares furniture on a given
property
in ascending order.
- Parameters:
- {string} property
- Returns:
- {Object}
{number}
getGroundElevation()
Returns the elevation of the bottom of this piece of furniture
from the ground according to the elevation of its level.
- Returns:
- {number}
{number}
getHeight()
Returns the height of this piece of furniture.
- Returns:
- {number}
{number}
getHeightInPlan()
Returns the height of this piece of furniture from the horizontal plan (after pitch or roll is applied to it).
- Returns:
- {number}
{Object}
getIcon()
Returns the icon of this piece of furniture.
- Returns:
- {Object}
{string}
getInformation()
Returns the additional information associated to this piece, or
null
.
- Returns:
- {string}
{Level}
getLevel()
Returns the level which this piece belongs to.
- Returns:
- {Level}
{string}
getLicense()
Returns the license of this piece, or
null
.
- Returns:
- {string}
{Object}
getModel()
Returns the 3D model of this piece of furniture.
- Returns:
- {Object}
{number}
getModelFlags()
Returns the flags applied to the piece of furniture model.
- Returns:
- {number}
{com.eteks.sweethome3d.model.HomeMaterial[]}
getModelMaterials()
Returns the materials applied to the 3D model of this piece of furniture.
- Returns:
- {com.eteks.sweethome3d.model.HomeMaterial[]} the materials of the 3D model or
null
if the individual materials of the 3D model are not modified.
{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}
{com.eteks.sweethome3d.model.Transformation[]}
getModelTransformations()
Returns the transformations applied to the 3D model of this piece of furniture.
- Returns:
- {com.eteks.sweethome3d.model.Transformation[]} the transformations of the 3D model or
null
if the 3D model is not transformed.
{string}
getName()
Returns the name of this piece of furniture.
- Returns:
- {string}
{number}
getNameAngle()
Returns the angle in radians used to display the piece name.
- Returns:
- {number}
{TextStyle}
getNameStyle()
Returns the text style used to display piece name.
- Returns:
- {TextStyle}
{number}
getNameXOffset()
Returns the distance along x axis applied to piece abscissa to display piece name.
- Returns:
- {number}
{number}
getNameYOffset()
Returns the distance along y axis applied to piece ordinate
to display piece name.
- Returns:
- {number}
{number}
getPitch()
Returns the pitch angle in radians of this piece of furniture.
- Returns:
- {number}
{Object}
getPlanIcon()
Returns the icon of this piece of furniture displayed in plan or
null
.
- Returns:
- {Object}
{float[][]}
getPoints()
Returns the points of each corner of a piece.
- Returns:
- {float[][]} an array of the 4 (x,y) coordinates of the piece corners.
{Big}
getPrice()
Returns the price of this piece of furniture or
null
.
- Returns:
- {Big}
{Big}
getPriceValueAddedTaxIncluded()
Returns the price of this piece of furniture, Value Added Tax included.
- Returns:
- {Big}
{number}
getRoll()
Returns the roll angle in radians of this piece of furniture.
- Returns:
- {number}
{number}
getShininess()
Returns the shininess of this piece of furniture.
- Returns:
- {number} a value between 0 (matt) and 1 (very shiny) or
null
if piece shininess is unchanged.
{string}
getStaircaseCutOutShape()
Returns the shape used to cut out upper levels when they intersect with the piece
like a staircase.
- Returns:
- {string}
{HomeTexture}
getTexture()
Returns the texture of this piece of furniture.
- Returns:
- {HomeTexture} the texture of the piece or
null
if piece texture is unchanged.
{Big}
getValueAddedTax()
Returns the Value Added Tax applied to the price of this piece of furniture.
- Returns:
- {Big}
{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}
getWidthInPlan()
Returns the width of this piece of furniture in the horizontal plan (after pitch or roll is applied to it).
- Returns:
- {number}
{number}
getX()
Returns the abscissa of the center of this piece of furniture.
- Returns:
- {number}
{number}
getY()
Returns the ordinate of the center of this piece of furniture.
- Returns:
- {number}
{boolean}
intersectsRectangle(x0, y0, x1, y1)
Returns
true
if this piece 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}
isAtLevel(level)
Returns
true
if this piece is at the given level
or at a level with the same elevation and a smaller elevation index
or if the elevation of its highest point is higher than level
elevation.
- Parameters:
- {Level} level
- Returns:
- {boolean}
{boolean}
isBackFaceShown()
Returns
true
if the back face of the piece of furniture
model should be displayed.
- Returns:
- {boolean}
{boolean}
isBottomLeftPointAt(x, y, margin)
Returns
true
if the bottom left point of this piece is
the point at (x
, y
) with a given margin
,
and if that point is closer to bottom left point than to top left and bottom right points.
- Parameters:
- {number} x
- {number} y
- {number} margin
- Returns:
- {boolean}
{boolean}
isBottomRightPointAt(x, y, margin)
Returns
true
if the bottom right point of this piece is
the point at (x
, y
) with a given margin
,
and if that point is closer to top left point than to top right and bottom left points.
- Parameters:
- {number} x
- {number} y
- {number} margin
- 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 HomeDoorOrWindow HomeDoorOrWindow} 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}
isHorizontallyRotated()
Returns
true
if the pitch or roll angle of this piece is different from 0.
- Returns:
- {boolean}
{boolean}
isModelCenteredAtOrigin()
Returns
true
if model center should be always centered at the origin
when model rotation isn't null
.
- Returns:
- {boolean}
false
by default if version < 5.5
{boolean}
isModelMirrored()
Returns
true
if the model of this piece should be mirrored.
- Returns:
- {boolean}
{boolean}
isMovable()
Returns
true
if this piece of furniture is movable.
- Returns:
- {boolean}
{boolean}
isNameCenterPointAt(x, y, margin)
Returns
true
if the center point at which is displayed the name
of this piece is equal to the point at (x
, y
)
with a given margin
.
- Parameters:
- {number} x
- {number} y
- {number} margin
- Returns:
- {boolean}
{boolean}
isNameVisible()
Returns whether the name of this piece should be drawn or not.
- Returns:
- {boolean}
{boolean}
isParallelToWall(wall)
Returns
true
if the front side of this piece is parallel to the given wall
with a margin.
- Parameters:
- {Wall} wall
- Returns:
- {boolean}
{boolean}
isPointAt(x, y, margin)
Returns
true
if one of the corner of this piece is
the point at (x
, y
) with a given margin
.
- Parameters:
- {number} x
- {number} y
- {number} margin
- 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}
isTopLeftPointAt(x, y, margin)
Returns
true
if the top left point of this piece is
the point at (x
, y
) with a given margin
,
and if that point is closer to top left point than to top right and bottom left points.
- Parameters:
- {number} x
- {number} y
- {number} margin
- Returns:
- {boolean}
{boolean}
isTopRightPointAt(x, y, margin)
Returns
true
if the top right point of this piece is
the point at (x
, y
) with a given margin
,
and if that point is closer to top right point than to top left and bottom right points.
- Parameters:
- {number} x
- {number} y
- {number} margin
- Returns:
- {boolean}
{boolean}
isVisible()
Returns
true
if this piece of furniture is visible.
- Returns:
- {boolean}
{boolean}
isWidthDepthDeformable()
Returns
true
if this piece is deformable.
- Returns:
- {boolean}
move(dx, dy)
Moves this piece of (
dx
, dy
) units.
- Parameters:
- {number} dx
- {number} dy
scale(scale)
Scales this piece of furniture with the given
scale
.
Once this piece is updated, listeners added to this piece will receive a change notification.
- Parameters:
- {number} scale
setAngle(angle)
Sets the angle of this piece around vertical axis. Once this piece is updated,
listeners added to this piece will receive a change notification.
- Parameters:
- {number} angle
setBackFaceShown(backFaceShown)
Sets whether the back face of the piece of furniture model should be displayed.
Once this piece is updated, listeners added to this piece will receive a change notification.
- Parameters:
- {boolean} backFaceShown
- Deprecated:
- Prefer use #setModelFlags with #SHOW_BACK_FACE flag.
setCatalogId(catalogId)
Sets the catalog ID of this piece of furniture. Once this piece is updated,
listeners added to this piece will receive a change notification.
- Parameters:
- {string} catalogId
setColor(color)
Sets the color of this piece of furniture.
Once this piece is updated, listeners added to this piece will receive a change notification.
- Parameters:
- {number} color
- the color of this piece of furniture or
null
if piece color is the default one
- Throws:
- IllegalStateException if this piece of furniture isn't texturable
setCreator(creator)
Sets the creator of this piece. Once this piece is updated, listeners added to this piece
will receive a change notification.
- Parameters:
- {string} creator
setCurrency(currency)
Sets the price currency, noted with ISO 4217 code. Once this piece is updated,
listeners added to this piece will receive a change notification.
- Parameters:
- {string} currency
setDepth(depth)
Sets the depth of this piece of furniture. Once this piece is updated,
listeners added to this piece will receive a change notification.
- Parameters:
- {number} depth
- Throws:
- IllegalStateException if this piece of furniture isn't resizable
setDepthInPlan(depthInPlan)
Sets the depth of this piece of furniture in the horizontal plan (after pitch or roll is applied to it).
listeners added to this piece will receive a change notification.
- Parameters:
- {number} depthInPlan
setDescription(description)
Sets the description of this piece of furniture. Once this piece is updated,
listeners added to this piece will receive a change notification.
- Parameters:
- {string} description
setElevation(elevation)
Sets the elevation of this piece of furniture on its level. Once this piece is updated,
listeners added to this piece will receive a change notification.
- Parameters:
- {number} elevation
setHeight(height)
Sets the height of this piece of furniture. Once this piece is updated,
listeners added to this piece will receive a change notification.
- Parameters:
- {number} height
- Throws:
- IllegalStateException if this piece of furniture isn't resizable
setHeightInPlan(heightInPlan)
Sets the height of this piece of furniture from the horizontal plan (after pitch or roll is applied to it).
Once this piece is updated, listeners added to this piece will receive a change notification.
- Parameters:
- {number} heightInPlan
setIcon(icon)
Sets the icon of this piece of furniture. Once this piece is updated,
listeners added to this piece will receive a change notification.
- Parameters:
- {Object} icon
setInformation(information)
Sets the additional information associated to this piece . Once this piece is updated,
listeners added to this piece will receive a change notification.
- Parameters:
- {string} information
setLevel(level)
Sets the level of this piece of furniture. Once this piece is updated,
listeners added to this piece will receive a change notification.
- Parameters:
- {Level} level
setLicense(license)
Sets the the license of this piece . Once this piece is updated,
listeners added to this piece will receive a change notification.
- Parameters:
- {string} license
setModel(model)
Sets the 3D model of this piece of furniture. Once this piece is updated,
listeners added to this piece will receive a change notification.
- Parameters:
- {Object} model
setModelCenteredAtOrigin(modelCenteredAtOrigin)
Sets whether model center should be always centered at the origin
when model rotation isn't
null
.
This method should be called only to keep unchanged the (wrong) location
of a rotated model created with version < 5.5.
- Parameters:
- {boolean} modelCenteredAtOrigin
setModelFlags(modelFlags)
Sets the flags applied to the piece of furniture model.
Once this piece is updated, listeners added to this piece will receive a change notification.
- Parameters:
- {number} modelFlags
setModelMaterials(modelMaterials)
Sets the materials of the 3D model of this piece of furniture.
Once this piece is updated, listeners added to this piece will receive a change notification.
- Parameters:
- {com.eteks.sweethome3d.model.HomeMaterial[]} modelMaterials
- the materials of the 3D model or
null
if they shouldn't be changed
- Throws:
- IllegalStateException if this piece of furniture isn't texturable
setModelMirrored(modelMirrored)
Sets whether the model of this piece of furniture is mirrored or not. Once this piece is updated,
listeners added to this piece will receive a change notification.
- Parameters:
- {boolean} modelMirrored
- Throws:
- IllegalStateException if this piece of furniture isn't resizable
setModelRotation(modelRotation)
Sets the rotation 3 by 3 matrix of this piece of furniture and notifies listeners of this change.
- Parameters:
- {float[][]} modelRotation
setModelSize(modelSize)
Sets the size of the 3D model of this piece of furniture.
This method should be called only to update a piece created with an older version.
- Parameters:
- {number} modelSize
setModelTransformations(modelTransformations)
Sets the transformations applied to some parts of the 3D model of this piece of furniture.
Once this piece is updated, listeners added to this piece will receive a change notification.
- Parameters:
- {com.eteks.sweethome3d.model.Transformation[]} modelTransformations
- the transformations of the 3D model or
null
if no transformation shouldn't be applied
setMovable(movable)
Sets whether this piece is movable or not.
- Parameters:
- {boolean} movable
setName(name)
Sets the name of this piece of furniture. Once this piece is updated,
listeners added to this piece will receive a change notification.
- Parameters:
- {string} name
setNameAngle(nameAngle)
Sets the angle in radians used to display the piece name. Once this piece is updated,
listeners added to this piece will receive a change notification.
- Parameters:
- {number} nameAngle
setNameStyle(nameStyle)
Sets the text style used to display piece name.
Once this piece is updated, listeners added to this piece will receive a change notification.
- Parameters:
- {TextStyle} nameStyle
setNameVisible(nameVisible)
Sets whether the name of this piece is visible or not. Once this piece of furniture
is updated, listeners added to this piece will receive a change notification.
- Parameters:
- {boolean} nameVisible
setNameXOffset(nameXOffset)
Sets the distance along x axis applied to piece abscissa to display piece name.
Once this piece is updated, listeners added to this piece will receive a change notification.
- Parameters:
- {number} nameXOffset
setNameYOffset(nameYOffset)
Sets the distance along y axis applied to piece ordinate to display piece name.
Once this piece is updated, listeners added to this piece will receive a change notification.
- Parameters:
- {number} nameYOffset
setPitch(pitch)
Sets the pitch angle in radians of this piece and notifies listeners of this change.
Pitch axis is horizontal lateral (or transverse) axis.
- Parameters:
- {number} pitch
setPlanIcon(planIcon)
Sets the plan icon of this piece of furniture. Once this piece is updated,
listeners added to this piece will receive a change notification.
- Parameters:
- {Object} planIcon
setPrice(price)
Sets the price of this piece of furniture. Once this piece is updated,
listeners added to this piece will receive a change notification.
- Parameters:
- {Big} price
setRoll(roll)
Sets the roll angle in radians of this piece and notifies listeners of this change.
Roll axis is horizontal longitudinal axis.
- Parameters:
- {number} roll
setShininess(shininess)
Sets the shininess of this piece of furniture or
null
if piece shininess is unchanged.
Once this piece is updated, listeners added to this piece will receive a change notification.
- Parameters:
- {number} shininess
- Throws:
- IllegalStateException if this piece of furniture isn't texturable
setStaircaseCutOutShape(staircaseCutOutShape)
Sets the shape used to cut out upper levels when they intersect with the piece
like a staircase. Once this piece is updated, listeners added to this piece
will receive a change notification.
- Parameters:
- {string} staircaseCutOutShape
setTexture(texture)
Sets the texture of this piece of furniture.
Once this piece is updated, listeners added to this piece will receive a change notification.
- Parameters:
- {HomeTexture} texture
- the texture of this piece of furniture or
null
if piece texture is the default one
- Throws:
- IllegalStateException if this piece of furniture isn't texturable
setValueAddedTaxPercentage(valueAddedTaxPercentage)
Sets the Value Added Tax percentage applied to prices.
- Parameters:
- {Big} valueAddedTaxPercentage
setVisible(visible)
Sets whether this piece of furniture is visible or not. Once this piece is updated,
listeners added to this piece will receive a change notification.
- Parameters:
- {boolean} visible
setWidth(width)
Sets the width of this piece of furniture. Once this piece is updated,
listeners added to this piece will receive a change notification.
- Parameters:
- {number} width
- Throws:
- IllegalStateException if this piece of furniture isn't resizable
setWidthInPlan(widthInPlan)
Sets the width of this piece of furniture in the horizontal plan (after pitch or roll is applied to it).
Once this piece is updated, listeners added to this piece will receive a change notification.
- Parameters:
- {number} widthInPlan
setX(x)
Sets the abscissa of the center of this piece. Once this piece is updated,
listeners added to this piece will receive a change notification.
- Parameters:
- {number} x
setY(y)
Sets the ordinate of the center of this piece. Once this piece is updated,
listeners added to this piece will receive a change notification.
- Parameters:
- {number} y