Class Index | File Index

Classes


Class DimensionLine


Extends HomeObject.

Defined in: SweetHome3D.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
DimensionLine(id, xStart, yStart, elevationStart, xEnd, yEnd, elevationEnd, offset)
Creates a dimension line from (xStart, yStart, elevationStart) to (xEnd, yEnd, elevationEnd), with a given offset.
Method Summary
Method Attributes Method Name and Description
 
Returns a clone of this dimension line.
 
Returns true if the extension line at the end of this dimension line contains the point at (x, y) with a given margin around the extension line.
 
containsPoint(x, y, margin)
Returns true if this dimension line contains the point at (x, y) with a given margin.
 
Returns true if the extension line at the start of this dimension line contains the point at (x, y) with a given margin around the extension line.
 
Returns the color used to display the text of this dimension line.
 
Returns the end point elevation of this dimension line.
 
Returns the start point elevation of this dimension line.
 
Returns the size of marks drawn at the end of the dimension line.
 
Returns the length of this dimension line.
 
Returns the text style used to display dimension line length.
 
Returns the level which this dimension line belongs to.
 
Returns the offset of this dimension line.
 
Returns the pitch angle in radians of this dimension line around its axis.
 
Returns the points of the rectangle surrounding this dimension line and its extension lines.
 
Returns the end point abscissa of this dimension line.
 
Returns the start point abscissa of this dimension line.
 
Returns the end point ordinate of this dimension line.
 
Returns the start point ordinate of this dimension line.
 
intersectsRectangle(x0, y0, x1, y1)
Returns true if this dimension line intersects with the horizontal rectangle which opposite corners are at points (x0, y0) and (x1, y1).
 
isAtLevel(level)
Returns true if this dimension line 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 end is higher than level elevation.
 
isBottomPointAt(x, y, margin)
Returns true if the bottom left point of this dimension line is the point at (x, y) with a given margin.
 
Returns true if this dimension line is an elevation (vertical) dimension line.
 
isLeftPointAt(x, y, margin)
Returns true if the left point of this dimension line is the point at (x, y) with a given margin.
 
isMiddlePointAt(x, y, margin)
Returns true if the middle point of this dimension line is the point at (x, y) with a given margin.
 
isRightPointAt(x, y, margin)
Returns true if the right point of this dimension line is the point at (x, y) with a given margin.
 
isTopPointAt(x, y, margin)
Returns true if the top point of this dimension line is the point at (x, y) with a given margin.
 
Returns true if this dimension line should be displayed in 3D.
 
move(dx, dy)
Moves this dimension line of (dx, dy) units.
 
setColor(color)
Sets the color used to display the text of this dimension line.
 
setElevationEnd(elevationEnd)
Sets the end point elevation of this dimension line.
 
setElevationStart(elevationStart)
Sets the start point elevation of this dimension line.
 
setEndMarkSize(endMarkSize)
Sets the size of marks drawn at the end of the dimension line.
 
setLengthStyle(lengthStyle)
Sets the text style used to display dimension line length.
 
setLevel(level)
Sets the level of this dimension line.
 
setOffset(offset)
Sets the offset of this dimension line.
 
setPitch(pitch)
Sets the pitch angle of this dimension line.
 
setVisibleIn3D(visibleIn3D)
Sets whether this dimension line should be displayed in 3D.
 
setXEnd(xEnd)
Sets the end point abscissa of this dimension line.
 
setXStart(xStart)
Sets the start point abscissa of this dimension line.
 
setYEnd(yEnd)
Sets the end point ordinate of this dimension line.
 
setYStart(yStart)
Sets the start point ordinate of this dimension line.
Methods borrowed from class HomeObject:
duplicate, firePropertyChange, getContentProperty, getId, getProperty, getPropertyNames, isContentProperty, setProperty
Class Detail
DimensionLine(id, xStart, yStart, elevationStart, xEnd, yEnd, elevationEnd, offset)
Creates a dimension line from (xStart, yStart, elevationStart) to (xEnd, yEnd, elevationEnd), with a given offset.
Author: Emmanuel Puybaret.
Parameters:
{string} id
{number} xStart
{number} yStart
{number} elevationStart
{number} xEnd
{number} yEnd
{number} elevationEnd
{number} offset
Method Detail
{DimensionLine} clone()
Returns a clone of this dimension line.
Returns:
{DimensionLine}

{boolean} containsEndExtensionLineAt(x, y, margin)
Returns true if the extension line at the end of this dimension line contains the point at (x, y) with a given margin around the extension line.
Parameters:
{number} x
{number} y
{number} margin
Returns:
{boolean}

{boolean} containsPoint(x, y, margin)
Returns true if this dimension line contains the point at (x, y) with a given margin.
Parameters:
{number} x
{number} y
{number} margin
Returns:
{boolean}

{boolean} containsStartExtensionLinetAt(x, y, margin)
Returns true if the extension line at the start of this dimension line contains the point at (x, y) with a given margin around the extension line.
Parameters:
{number} x
{number} y
{number} margin
Returns:
{boolean}

{number} getColor()
Returns the color used to display the text of this dimension line.
Returns:
{number}

{number} getElevationEnd()
Returns the end point elevation of this dimension line.
Returns:
{number}

{number} getElevationStart()
Returns the start point elevation of this dimension line.
Returns:
{number}

{number} getEndMarkSize()
Returns the size of marks drawn at the end of the dimension line.
Returns:
{number}

{number} getLength()
Returns the length of this dimension line.
Returns:
{number}

{TextStyle} getLengthStyle()
Returns the text style used to display dimension line length.
Returns:
{TextStyle}

{Level} getLevel()
Returns the level which this dimension line belongs to.
Returns:
{Level}

{number} getOffset()
Returns the offset of this dimension line.
Returns:
{number}

{number} getPitch()
Returns the pitch angle in radians of this dimension line around its axis.
Returns:
{number}

{float[][]} getPoints()
Returns the points of the rectangle surrounding this dimension line and its extension lines.
Returns:
{float[][]} an array of the 4 (x,y) coordinates of the rectangle.

{number} getXEnd()
Returns the end point abscissa of this dimension line.
Returns:
{number}

{number} getXStart()
Returns the start point abscissa of this dimension line.
Returns:
{number}

{number} getYEnd()
Returns the end point ordinate of this dimension line.
Returns:
{number}

{number} getYStart()
Returns the start point ordinate of this dimension line.
Returns:
{number}

{boolean} intersectsRectangle(x0, y0, x1, y1)
Returns true if this dimension line 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 dimension line 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 end is higher than level elevation.
Parameters:
{Level} level
Returns:
{boolean}

{boolean} isBottomPointAt(x, y, margin)
Returns true if the bottom left point of this dimension line is the point at (x, y) with a given margin.
Parameters:
{number} x
{number} y
{number} margin
Returns:
{boolean}

{boolean} isElevationDimensionLine()
Returns true if this dimension line is an elevation (vertical) dimension line.
Returns:
{boolean}

{boolean} isLeftPointAt(x, y, margin)
Returns true if the left point of this dimension line is the point at (x, y) with a given margin.
Parameters:
{number} x
{number} y
{number} margin
Returns:
{boolean}

{boolean} isMiddlePointAt(x, y, margin)
Returns true if the middle point of this dimension line is the point at (x, y) with a given margin.
Parameters:
{number} x
{number} y
{number} margin
Returns:
{boolean}

{boolean} isRightPointAt(x, y, margin)
Returns true if the right point of this dimension line is the point at (x, y) with a given margin.
Parameters:
{number} x
{number} y
{number} margin
Returns:
{boolean}

{boolean} isTopPointAt(x, y, margin)
Returns true if the top point of this dimension line is the point at (x, y) with a given margin.
Parameters:
{number} x
{number} y
{number} margin
Returns:
{boolean}

{boolean} isVisibleIn3D()
Returns true if this dimension line should be displayed in 3D.
Returns:
{boolean}

move(dx, dy)
Moves this dimension line of (dx, dy) units.
Parameters:
{number} dx
{number} dy

setColor(color)
Sets the color used to display the text of this dimension line. Once this dimension line is updated, listeners added to this dimension line will receive a change notification.
Parameters:
{number} color

setElevationEnd(elevationEnd)
Sets the end point elevation of this dimension line. Once this dimension line is updated, listeners added to this dimension line will receive a change notification.
Parameters:
{number} elevationEnd

setElevationStart(elevationStart)
Sets the start point elevation of this dimension line. Once this dimension line is updated, listeners added to this dimension line will receive a change notification.
Parameters:
{number} elevationStart

setEndMarkSize(endMarkSize)
Sets the size of marks drawn at the end of the dimension line.
Parameters:
{number} endMarkSize

setLengthStyle(lengthStyle)
Sets the text style used to display dimension line length. Once this dimension line is updated, listeners added to it will receive a change notification.
Parameters:
{TextStyle} lengthStyle

setLevel(level)
Sets the level of this dimension line. Once this dimension line is updated, listeners added to this dimension line will receive a change notification.
Parameters:
{Level} level

setOffset(offset)
Sets the offset of this dimension line. Once this dimension line is updated, listeners added to this dimension line will receive a change notification.
Parameters:
{number} offset

setPitch(pitch)
Sets the pitch angle of this dimension line. Once this dimension line is updated, listeners added to this dimension line will receive a change notification.
Parameters:
{number} pitch

setVisibleIn3D(visibleIn3D)
Sets whether this dimension line should be displayed in 3D. Once this dimension line is updated, listeners added to this dimension line will receive a change notification.
Parameters:
{boolean} visibleIn3D

setXEnd(xEnd)
Sets the end point abscissa of this dimension line. Once this dimension line is updated, listeners added to this dimension line will receive a change notification.
Parameters:
{number} xEnd

setXStart(xStart)
Sets the start point abscissa of this dimension line. Once this dimension line is updated, listeners added to this dimension line will receive a change notification.
Parameters:
{number} xStart

setYEnd(yEnd)
Sets the end point ordinate of this dimension line. Once this dimension line is updated, listeners added to this dimension line will receive a change notification.
Parameters:
{number} yEnd

setYStart(yStart)
Sets the start point ordinate of this dimension line. Once this dimension line is updated, listeners added to this dimension line will receive a change notification.
Parameters:
{number} yStart

© Copyright 2024 Emmanuel PUYBARET / eTeks
Distributed under GNU General Public License
Documentation generated by JsDoc Toolkit 2.4.0 on Thu Apr 04 2024 17:30:25 GMT+0200 (CEST)