public class HomeFurnitureGroup extends HomePieceOfFurniture
HomePieceOfFurniture.Property, HomePieceOfFurniture.SortableProperty
EMPTY_PROPERTY_ARRAY
DEFAULT_CUT_OUT_SHAPE, HIDE_EDGE_COLOR_MATERIAL, IDENTITY_ROTATION, SHOW_BACK_FACE
Constructor and Description |
---|
HomeFurnitureGroup(java.util.List<HomePieceOfFurniture> furniture,
float angle,
boolean modelMirrored,
java.lang.String name)
Creates a group from the given
furniture list. |
HomeFurnitureGroup(java.util.List<HomePieceOfFurniture> furniture,
HomePieceOfFurniture leadingPiece,
java.lang.String name)
Creates a group from the given
furniture list. |
HomeFurnitureGroup(java.util.List<HomePieceOfFurniture> furniture,
java.lang.String name)
Creates a group from the given
furniture list. |
HomeFurnitureGroup(java.lang.String id,
java.util.List<HomePieceOfFurniture> furniture,
float angle,
boolean modelMirrored,
java.lang.String name)
Creates a group from the given
furniture list. |
Modifier and Type | Method and Description |
---|---|
HomeFurnitureGroup |
clone()
Returns a clone of this group with cloned furniture.
|
boolean |
containsPoint(float x,
float y,
float margin)
Returns
true if one of the pieces of this group contains
the point at (x , y )
with a given margin . |
HomeObject |
duplicate()
Returns a copy of this object and its children with new ids.
|
java.util.List<HomePieceOfFurniture> |
getAllFurniture()
Returns the furniture of this group and of all its subgroups, including the possible child furniture groups.
|
java.lang.String |
getCatalogId()
Returns the catalog ID of this group.
|
java.lang.Integer |
getColor()
Returns
null . |
java.lang.String |
getCreator()
Returns the creator set for this group.
|
java.lang.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. |
float |
getDepth()
Returns the depth of this group.
|
float |
getDepthInPlan()
Returns the depth of this group.
|
float |
getDropOnTopElevation()
Returns the elevation at which should be placed an object dropped on this group.
|
java.util.List<HomePieceOfFurniture> |
getFurniture()
Returns an unmodifiable list of the furniture of this group.
|
float |
getHeight()
Returns the height of this group.
|
float |
getHeightInPlan()
Returns the height of this group.
|
Content |
getIcon()
Returns
null . |
java.lang.String |
getInformation()
Returns the information associated with this group.
|
Content |
getModel()
Returns
null . |
int |
getModelFlags()
Returns 0.
|
HomeMaterial[] |
getModelMaterials()
Returns
null . |
float[][] |
getModelRotation()
Returns an identity matrix.
|
java.lang.Long |
getModelSize()
Returns
null . |
Transformation[] |
getModelTransformations()
Returns
null . |
float |
getPitch()
Returns 0.
|
Content |
getPlanIcon()
Returns
null . |
java.math.BigDecimal |
getPrice()
Returns the price of the furniture of this group with a price.
|
java.math.BigDecimal |
getPriceValueAddedTaxIncluded()
Returns the total price of the furniture of this group.
|
float |
getRoll()
Returns 0.
|
java.lang.Float |
getShininess()
Returns
null . |
java.lang.String |
getStaircaseCutOutShape()
Returns
null . |
HomeTexture |
getTexture()
Returns
null . |
java.math.BigDecimal |
getValueAddedTax()
Returns the VAT of the furniture of this group.
|
java.math.BigDecimal |
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. |
float |
getWidth()
Returns the width of this group.
|
float |
getWidthInPlan()
Returns the width of this group.
|
boolean |
intersectsRectangle(float x0,
float y0,
float x1,
float 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 ). |
boolean |
isBackFaceShown()
Returns
false . |
boolean |
isDeformable()
Returns
true if all furniture of this group are deformable. |
boolean |
isDoorOrWindow()
Returns
true if all furniture of this group are doors or windows. |
boolean |
isHorizontallyRotatable()
Returns
false . |
boolean |
isHorizontallyRotated()
Returns
true if this piece or a child of this group is rotated around an horizontal axis. |
boolean |
isModelCenteredAtOrigin()
Returns
true . |
boolean |
isMovable()
Returns
true if this group is movable. |
boolean |
isResizable()
Returns
true if all furniture of this group are resizable. |
boolean |
isTexturable()
Returns
true if all furniture of this group are texturable. |
void |
scale(float scale)
Scales this group and its children with the given
ratio . |
void |
setAngle(float angle)
Sets the
angle of the furniture of this group. |
void |
setBackFaceShown(boolean backFaceShown)
Deprecated.
|
void |
setColor(java.lang.Integer color)
Sets the
color of the furniture of this group. |
void |
setDepth(float depth)
Sets the
depth of this group, then moves and resizes its furniture accordingly. |
void |
setElevation(float elevation)
Sets the
elevation of this group, then moves its furniture accordingly. |
void |
setHeight(float height)
Sets the
height of this group, then moves and resizes its furniture accordingly. |
void |
setIcon(Content icon)
Sets the icon of this piece of furniture.
|
void |
setLevel(Level level)
Set the level of this group and the furniture it contains.
|
void |
setModel(Content model)
Sets the 3D model of this piece of furniture.
|
void |
setModelFlags(int modelFlags)
Sets the flags applied to the piece of furniture model.
|
void |
setModelMaterials(HomeMaterial[] modelMaterials)
Sets the materials of the furniture of this group.
|
void |
setModelMirrored(boolean modelMirrored)
Sets whether the furniture of this group should be mirrored or not.
|
void |
setModelRotation(float[][] modelRotation)
Sets the rotation 3 by 3 matrix of this piece of furniture and notifies listeners of this change.
|
void |
setModelSize(java.lang.Long modelSize)
Sets the size of the 3D model of this piece of furniture.
|
void |
setModelTransformations(Transformation[] modelTransformations)
Sets the transformations of this group.
|
void |
setMovable(boolean movable)
Sets whether this group is movable or not.
|
void |
setPlanIcon(Content planIcon)
Sets the plan icon of this piece of furniture.
|
void |
setPrice(java.math.BigDecimal price)
Sets the price of this group.
|
void |
setShininess(java.lang.Float shininess)
Sets the shininess of the furniture of this group.
|
void |
setStaircaseCutOutShape(java.lang.String staircaseCutOutShape)
Sets the shape used to cut out upper levels when they intersect with the piece
like a staircase.
|
void |
setTexture(HomeTexture texture)
Sets the
texture of the furniture of this group. |
void |
setVisible(boolean visible)
Sets whether the furniture of this group should be visible or not.
|
void |
setWidth(float width)
Sets the
width of this group, then moves and resizes its furniture accordingly. |
void |
setX(float x)
Sets the
abscissa of this group and moves its furniture accordingly. |
void |
setY(float y)
Sets the
ordinate of this group and moves its furniture accordingly. |
getAngle, getDescription, getElevation, getFurnitureComparator, 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
addPropertyChangeListener, addPropertyChangeListener, createId, firePropertyChange, getContentProperty, getId, getProperty, getPropertyNames, isContentProperty, removePropertyChangeListener, removePropertyChangeListener, setProperty, setProperty
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getContentProperty, getProperty, getPropertyNames, isContentProperty
public HomeFurnitureGroup(java.util.List<HomePieceOfFurniture> furniture, java.lang.String name)
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.public HomeFurnitureGroup(java.util.List<HomePieceOfFurniture> furniture, HomePieceOfFurniture leadingPiece, java.lang.String name)
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.
The angle of the group is the one of the leading piece.public HomeFurnitureGroup(java.util.List<HomePieceOfFurniture> furniture, float angle, boolean modelMirrored, java.lang.String name)
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.public HomeFurnitureGroup(java.lang.String id, java.util.List<HomePieceOfFurniture> furniture, float angle, boolean modelMirrored, java.lang.String name)
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.public java.util.List<HomePieceOfFurniture> getAllFurniture()
public java.util.List<HomePieceOfFurniture> getFurniture()
public java.lang.String getCatalogId()
getCatalogId
in class HomePieceOfFurniture
public java.lang.String getInformation()
getInformation
in interface PieceOfFurniture
getInformation
in class HomePieceOfFurniture
public boolean isMovable()
true
if this group is movable.isMovable
in interface PieceOfFurniture
isMovable
in class HomePieceOfFurniture
public void setMovable(boolean movable)
setMovable
in class HomePieceOfFurniture
public boolean isDoorOrWindow()
true
if all furniture of this group are doors or windows.isDoorOrWindow
in interface PieceOfFurniture
isDoorOrWindow
in class HomePieceOfFurniture
public boolean isResizable()
true
if all furniture of this group are resizable.isResizable
in interface PieceOfFurniture
isResizable
in class HomePieceOfFurniture
public boolean isDeformable()
true
if all furniture of this group are deformable.isDeformable
in interface PieceOfFurniture
isDeformable
in class HomePieceOfFurniture
public boolean isTexturable()
true
if all furniture of this group are texturable.isTexturable
in interface PieceOfFurniture
isTexturable
in class HomePieceOfFurniture
public boolean isHorizontallyRotatable()
false
.isHorizontallyRotatable
in interface PieceOfFurniture
isHorizontallyRotatable
in class HomePieceOfFurniture
public float getWidth()
getWidth
in interface PieceOfFurniture
getWidth
in class HomePieceOfFurniture
public float getWidthInPlan()
getWidthInPlan
in class HomePieceOfFurniture
public float getDepth()
getDepth
in interface PieceOfFurniture
getDepth
in class HomePieceOfFurniture
public float getDepthInPlan()
getDepthInPlan
in class HomePieceOfFurniture
public float getHeight()
getHeight
in interface PieceOfFurniture
getHeight
in class HomePieceOfFurniture
public float getHeightInPlan()
getHeightInPlan
in class HomePieceOfFurniture
public boolean isHorizontallyRotated()
true
if this piece or a child of this group is rotated around an horizontal axis.isHorizontallyRotated
in class HomePieceOfFurniture
public float getDropOnTopElevation()
getDropOnTopElevation
in interface PieceOfFurniture
getDropOnTopElevation
in class HomePieceOfFurniture
public Content getIcon()
null
.getIcon
in interface PieceOfFurniture
getIcon
in class HomePieceOfFurniture
public void setIcon(Content icon)
HomePieceOfFurniture
setIcon
in class HomePieceOfFurniture
java.lang.IllegalStateException
public Content getPlanIcon()
null
.getPlanIcon
in interface PieceOfFurniture
getPlanIcon
in class HomePieceOfFurniture
public void setPlanIcon(Content planIcon)
HomePieceOfFurniture
setPlanIcon
in class HomePieceOfFurniture
java.lang.IllegalStateException
public Content getModel()
null
.getModel
in interface PieceOfFurniture
getModel
in class HomePieceOfFurniture
public void setModel(Content model)
HomePieceOfFurniture
setModel
in class HomePieceOfFurniture
java.lang.IllegalStateException
public java.lang.Long getModelSize()
null
.getModelSize
in interface PieceOfFurniture
getModelSize
in class HomePieceOfFurniture
public void setModelSize(java.lang.Long modelSize)
HomePieceOfFurniture
setModelSize
in class HomePieceOfFurniture
java.lang.IllegalStateException
public float[][] getModelRotation()
getModelRotation
in interface PieceOfFurniture
getModelRotation
in class HomePieceOfFurniture
public void setModelRotation(float[][] modelRotation)
HomePieceOfFurniture
setModelRotation
in class HomePieceOfFurniture
java.lang.IllegalStateException
public boolean isModelCenteredAtOrigin()
true
.isModelCenteredAtOrigin
in class HomePieceOfFurniture
false
by default if version < 5.5public int getModelFlags()
getModelFlags
in interface PieceOfFurniture
getModelFlags
in class HomePieceOfFurniture
public void setModelFlags(int modelFlags)
HomePieceOfFurniture
setModelFlags
in class HomePieceOfFurniture
java.lang.IllegalStateException
public boolean isBackFaceShown()
false
.isBackFaceShown
in interface PieceOfFurniture
isBackFaceShown
in class HomePieceOfFurniture
public void setBackFaceShown(boolean backFaceShown)
HomePieceOfFurniture
setBackFaceShown
in class HomePieceOfFurniture
java.lang.IllegalStateException
public Transformation[] getModelTransformations()
null
.getModelTransformations
in class HomePieceOfFurniture
null
if the 3D model is not transformed.public void setModelTransformations(Transformation[] modelTransformations)
setModelTransformations
in class HomePieceOfFurniture
modelTransformations
- the transformations of the 3D model or null
if no transformation shouldn't be appliedpublic float getPitch()
getPitch
in class HomePieceOfFurniture
public float getRoll()
getRoll
in class HomePieceOfFurniture
public java.lang.String getStaircaseCutOutShape()
null
.getStaircaseCutOutShape
in interface PieceOfFurniture
getStaircaseCutOutShape
in class HomePieceOfFurniture
public void setStaircaseCutOutShape(java.lang.String staircaseCutOutShape)
HomePieceOfFurniture
setStaircaseCutOutShape
in class HomePieceOfFurniture
java.lang.IllegalStateException
public java.lang.String getCreator()
getCreator
in interface PieceOfFurniture
getCreator
in class HomePieceOfFurniture
public java.math.BigDecimal getPrice()
getPrice
in interface PieceOfFurniture
getPrice
in class HomePieceOfFurniture
public void setPrice(java.math.BigDecimal price)
setPrice
in class HomePieceOfFurniture
java.lang.UnsupportedOperationException
- if the price of one of the pieces is setpublic java.math.BigDecimal getValueAddedTaxPercentage()
null
if one piece has no VAT percentage
or has a VAT percentage different from the other furniture.getValueAddedTaxPercentage
in interface PieceOfFurniture
getValueAddedTaxPercentage
in class HomePieceOfFurniture
public java.lang.String getCurrency()
null
if one piece has no currency
or has a currency different from the other furniture.getCurrency
in interface PieceOfFurniture
getCurrency
in class HomePieceOfFurniture
public java.math.BigDecimal getValueAddedTax()
getValueAddedTax
in class HomePieceOfFurniture
public java.math.BigDecimal getPriceValueAddedTaxIncluded()
getPriceValueAddedTaxIncluded
in class HomePieceOfFurniture
public java.lang.Integer getColor()
null
.getColor
in interface PieceOfFurniture
getColor
in class HomePieceOfFurniture
null
if piece color is unchanged.public void setColor(java.lang.Integer color)
color
of the furniture of this group.setColor
in class HomePieceOfFurniture
color
- the color of this piece of furniture or null
if piece color is the default onepublic HomeTexture getTexture()
null
.getTexture
in class HomePieceOfFurniture
null
if piece texture is unchanged.public void setTexture(HomeTexture texture)
texture
of the furniture of this group.setTexture
in class HomePieceOfFurniture
texture
- the texture of this piece of furniture or null
if piece texture is the default onepublic HomeMaterial[] getModelMaterials()
null
.getModelMaterials
in class HomePieceOfFurniture
null
if the individual materials of the 3D model are not modified.public void setModelMaterials(HomeMaterial[] modelMaterials)
setModelMaterials
in class HomePieceOfFurniture
modelMaterials
- the materials of the 3D model or null
if they shouldn't be changedpublic java.lang.Float getShininess()
null
.getShininess
in class HomePieceOfFurniture
null
if piece shininess is unchanged.public void setShininess(java.lang.Float shininess)
setShininess
in class HomePieceOfFurniture
public void setAngle(float angle)
angle
of the furniture of this group.setAngle
in class HomePieceOfFurniture
public void setX(float x)
abscissa
of this group and moves its furniture accordingly.setX
in class HomePieceOfFurniture
public void setY(float y)
ordinate
of this group and moves its furniture accordingly.setY
in class HomePieceOfFurniture
public void setWidth(float width)
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.setWidth
in class HomePieceOfFurniture
public void setDepth(float depth)
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.setDepth
in class HomePieceOfFurniture
public void setHeight(float height)
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.setHeight
in class HomePieceOfFurniture
public void scale(float scale)
ratio
.scale
in class HomePieceOfFurniture
public void setElevation(float elevation)
elevation
of this group, then moves its furniture accordingly.setElevation
in class HomePieceOfFurniture
public void setModelMirrored(boolean modelMirrored)
setModelMirrored
in class HomePieceOfFurniture
public void setVisible(boolean visible)
setVisible
in class HomePieceOfFurniture
public void setLevel(Level level)
setLevel
in class HomePieceOfFurniture
public boolean intersectsRectangle(float x0, float y0, float x1, float y1)
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
).intersectsRectangle
in interface Selectable
intersectsRectangle
in class HomePieceOfFurniture
public boolean containsPoint(float x, float y, float margin)
true
if one of the pieces of this group contains
the point at (x
, y
)
with a given margin
.containsPoint
in interface Selectable
containsPoint
in class HomePieceOfFurniture
public HomeObject duplicate()
duplicate
in class HomeObject
public HomeFurnitureGroup clone()
clone
in interface Selectable
clone
in class HomePieceOfFurniture
© Copyright 2024 Space Mushrooms
Distributed under GNU General Public License