Package com.inductiveautomation.rm.shape
Class RMScene3D
java.lang.Object
com.inductiveautomation.rm.base.RMListenerList
com.inductiveautomation.rm.base.RMObject
com.inductiveautomation.rm.shape.RMShape
com.inductiveautomation.rm.shape.RMParentShape
com.inductiveautomation.rm.shape.RMScene3D
- All Implemented Interfaces:
- Archivable,- DeepChangeListener,- RMPropertyChanger,- RMTypes,- PropertyChangeListener,- Cloneable,- EventListener
This class manages a list of children and transforms them to 3D representations for display based on X and Y axis
 rotations.
 
ReportMill 3D conventions:
Coordinate system: Right handed (not left handed) Polygon front: Right hand rule (counter-clockwise defined polygons face forward) Transforms: Row major notation (as opposed to column major, points are assumed row vectors)
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classRMPolygon subclass that encapsulates a Path3D.Nested classes/interfaces inherited from interface com.inductiveautomation.rm.base.RMTypesRMTypes.Align, RMTypes.AlignX, RMTypes.AlignY
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intFields inherited from class com.inductiveautomation.rm.shape.RMShapeBINDING_PROP_NAME, STROKE_BORDER, STROKE_DOUBLE, STROKE_HIDDEN, STROKE_SHAPE
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanViewer method.protected RMScene3D.RMShape3DaddChild3D(RMShape aShape, double z1, double z2, boolean fixEdges) Adds a given shape in 3D.voidAdds a shape to the end of the shape list.voidAdds a shape to the shape list at the given index.voidCopy 3D attributes only.protected voidfromXMLShape(RXArchiver anArchiver, RXElement anElement) XML unarchival.Returns the camera as a vector.doublegetDepth()Returns the depth of the scene.doubleReturns the field of view of the camera (derived from focalLength).doubleReturns the focal length of the camera (derived from the field of view and with view size).getLight()Returns the scene light as a vector.doubleReturns the Z offset of the scene (for zooming).Returns the scene's origin.doublegetPitch()Returns the rotation about the X axis in degrees.doubleReturns the skew angle for X by Z.doubleReturns the skew angle for Y by Z.doubleReturns the rotation about the Z axis in degrees.getShape(int anIndex) Returns the specific shape at the given index from the shape list.intReturns the number of shapes in the shape list.Returns the transform 3d for the scene's camera.booleanReturns whether scene3d is being re-oriented.doublegetYaw()Returns the rotation about the Y axis in degrees.booleanisHittable(RMShape aChild) Override to indicate that scene children are unhittable.booleanReturns whether scene is rendered in pseudo 3d.protected booleanOverride to make all 3D children show.protected voidRebuilds 3D representation of shapes from shapes list.voidmouseDragged(RMShapeMouseEvent anEvent) Viewer method.voidmousePressed(RMShapeMouseEvent anEvent) Viewer method.voidmouseReleased(RMShapeMouseEvent anEvent) Viewer method.voidremoveShape(int anIndex) Removes the shape at the given index from the shape list.voidresort()Resorts child shapes from back to front.voidsetColor(RMScene3D.RMShape3D aShape3D, RMColor aColor) Sets the color for a 3d shape from a base color.voidSets some reasonable default view settings.voidsetDepth(double aValue) Sets the depth of the scene.voidsetFieldOfView(double aValue) Sets the field of view of the camera.voidsetFillAndStroke(RMScene3D.RMShape3D aShape3D, RMFill aFill, RMStroke aStroke, RMEffect anEffect) Sets the fill and stroke of a 3D shape from a 2D shape.voidsetFocalLength(double aValue) Sets the focal length of the camera.voidsetOffsetZ(double aValue) Sets the Z offset of the scene (for zooming).voidsetPitch(double aValue) Sets the rotation about the X axis in degrees.voidsetPseudo3D(boolean aFlag) Sets whether scene is rendered in pseudo 3d.voidsetPseudoSkewX(double anAngle) Sets the skew angle for X by Z.voidsetPseudoSkewY(double anAngle) Sets the skew angle for Y by Z.voidsetRoll3D(double aValue) Sets the rotation about the Z axis in degrees.voidsetYaw(double aValue) Sets the rotation about the Y axis in degrees.protected voidtoXMLChildren(RXArchiver anArchiver, RXElement anElement) XML archival of children - overrides shape implementation to suppress archival of generated 3D shapes.protected RXElementtoXMLShape(RXArchiver anArchiver) XML archival.Methods inherited from class com.inductiveautomation.rm.shape.RMParentShapeaddChild, addChild, addChild, addChild, addLayoutChild, bringShapesToFront, clone, cloneDeep, computePrefHeight, computePrefWidth, divideShapeFromTop, fromXML, fromXMLChildren, getBoundsOfChildren, getChild, getChildArray, getChildContaining, getChildCount, getChildLast, getChildren, getChildrenIntersecting, getChildrenWithClass, getChildrenWithClass, getChildWithClass, getChildWithName, getLayout, getNeedsLayout, getSourceURL, indexOfChild, isSourceURLSet, layout, relayout, removeChild, removeChild, removeChildren, removeLayoutChild, rpgAll, rpgChildren, sendShapesToBack, setHeight, setLayout, setNeedsLayout, setSourceURL, setWidth, toXMLMethods inherited from class com.inductiveautomation.rm.shape.RMShapeacceptsChildren, addBinding, addBinding, addDeepChangeListener, addMouseListener, animUpdate, bounds, childrenSuperSelectImmediately, contains, convertedPointFromShape, convertedPointToShape, convertedRectFromShape, convertedRectToShape, convertedVectorFromShape, convertedVectorToShape, convertFromShape, convertPathFromShape, convertPathToShape, convertPointFromShape, convertPointToShape, convertRectFromShape, convertRectToShape, convertToShape, convertVectorFromShape, convertVectorToShape, copyShape, createDivideShapeRemainder, deepChange, divideShapeFromEdge, get, get, getAlignment, getAlignmentX, getAlignmentY, getAncestor, getAncestorCount, getAncestorInCommon, getAnimator, getAnimator, getAutosizing, getAutosizingDefault, getBestHeight, getBestHeight, getBestWidth, getBestWidth, getBinding, getBinding, getBindingCount, getBindings, getBounds, getBoundsInside, getBoundsMarked, getBoundsMarkedDeep, getChildAnimator, getChildAnimator, getChildClipShape, getClipShape, getColor, getDashArrayString, getDashPhase, getDatasetEntity, getDatasetKey, getDisplayedFill, getDisplayedStroke, getDocument, getEffect, getEventAdapter, getFill, getFont, getFormat, getFrame, getFrameHeight, getFrameMaxX, getFrameMaxY, getFrameWidth, getFrameX, getFrameXY, getFrameY, getHeight, getHover, getLayoutInfo, getMaskPath, getMaxX, getMaxY, getMinHeight, getMinHeight, getMinWidth, getMinWidth, getName, getOpacity, getOpacityDeep, getOutline, getPageBreak, getPageBreakMax, getPageBreakPage, getPageBreakPageMax, getPageShape, getParent, getParent, getPath, getPathInBounds, getPrefHeight, getPrefHeight, getPrefWidth, getPrefWidth, getPropertyNameMapped, getPropertyNames, getPropertyNames, getRoll, getRootShape, getRSS, getScaleX, getScaleY, getShapesToAncestor, getShapesToDescendant, getShapesToShape, getSize, getSkewX, getSkewY, getStroke, getStrokeColor, getStrokeOnTop, getStrokeStyle, getStrokeWidth, getTextColor, getTimeline, getTimeline, getTransform, getTransformFromShape, getTransformInverse, getTransformToShape, getUndoer, getURL, getVisbileBounds, getVisibleBounds, getVisibleBounds, getVisibleBounds, getWidth, getX, getXY, getXYP, getY, height, indexOf, intersects, isAncestor, isAnimProperty, isDeletable, isDescendant, isEditing, isEnabled, isFontSet, isHittable, isLocked, isMinHeightSet, isMinWidthSet, isPrefHeightSet, isPrefWidthSet, isRoot, isRSS, isShowing, isUnderlined, isUseFill, isUseStroke, isViewing, isVisible, mouseClicked, mouseEntered, mouseExited, mouseMoved, offsetXY, page, pageMax, paint, paintShape, paintShapeAll, paintShapeChildren, paintShapeOver, propertyChange, put, removeBinding, removeBinding, removeDeepChangeListener, removeFromParent, removeMouseListener, repaint, repaint, resolvePageReferences, rpgBindings, rpgShape, setAlignment, setAlignmentX, setAlignmentY, setAutosizing, setBestHeight, setBestSize, setBounds, setBounds, setColor, setDashArrayString, setDashPhase, setEffect, setEnabled, setFill, setFont, setFormat, setFrame, setFrame, setFrameSize, setFrameX, setFrameXY, setFrameXY, setFrameY, setHover, setLayoutInfo, setLocked, setMinHeight, setMinSize, setMinWidth, setName, setOpacity, setOutline, setParent, setPrefHeight, setPrefWidth, setRoll, setScaleX, setScaleXY, setScaleY, setShowing, setSize, setSize, setSkewX, setSkewXY, setSkewY, setStroke, setStrokeColor, setStrokeStyle, setStrokeWidth, setTextColor, setTime, setTimeline, setUnderlined, setURL, setUseFill, setUseStroke, setVisible, setX, setXY, setXY, setXYP, setY, shapeHidden, shapeShown, superSelectable, toString, undoerDisable, undoerEnable, undoerSetUndoTitle, width, x, yMethods inherited from class com.inductiveautomation.rm.base.RMObjectaddPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, getPCEvent, removePropertyChangeListener, sendPropertyChangeMethods inherited from class com.inductiveautomation.rm.base.RMListenerListaddListener, getListener, getListenerCount, getListenerCount, getListenerList, getListeners, hasListeners, removeListener
- 
Field Details- 
CONSTRAIN_NONEpublic static final int CONSTRAIN_NONE- See Also:
 
- 
CONSTRAIN_PITCHpublic static final int CONSTRAIN_PITCH- See Also:
 
- 
CONSTRAIN_YAWpublic static final int CONSTRAIN_YAW- See Also:
 
 
- 
- 
Constructor Details- 
RMScene3Dpublic RMScene3D()
 
- 
- 
Method Details- 
getDepthpublic double getDepth()Returns the depth of the scene.
- 
setDepthpublic void setDepth(double aValue) Sets the depth of the scene.
- 
getOriginReturns the scene's origin.
- 
getYawpublic double getYaw()Returns the rotation about the Y axis in degrees.
- 
setYawpublic void setYaw(double aValue) Sets the rotation about the Y axis in degrees.
- 
getPitchpublic double getPitch()Returns the rotation about the X axis in degrees.
- 
setPitchpublic void setPitch(double aValue) Sets the rotation about the X axis in degrees.
- 
getRoll3Dpublic double getRoll3D()Returns the rotation about the Z axis in degrees.
- 
setRoll3Dpublic void setRoll3D(double aValue) Sets the rotation about the Z axis in degrees.
- 
getFocalLengthpublic double getFocalLength()Returns the focal length of the camera (derived from the field of view and with view size).
- 
setFocalLengthpublic void setFocalLength(double aValue) Sets the focal length of the camera. Two feet is normal (1728 points).
- 
getOffsetZpublic double getOffsetZ()Returns the Z offset of the scene (for zooming).
- 
setOffsetZpublic void setOffsetZ(double aValue) Sets the Z offset of the scene (for zooming).
- 
isPseudo3Dpublic boolean isPseudo3D()Returns whether scene is rendered in pseudo 3d.
- 
setPseudo3Dpublic void setPseudo3D(boolean aFlag) Sets whether scene is rendered in pseudo 3d.
- 
getPseudoSkewXpublic double getPseudoSkewX()Returns the skew angle for X by Z.
- 
setPseudoSkewXpublic void setPseudoSkewX(double anAngle) Sets the skew angle for X by Z.
- 
getPseudoSkewYpublic double getPseudoSkewY()Returns the skew angle for Y by Z.
- 
setPseudoSkewYpublic void setPseudoSkewY(double anAngle) Sets the skew angle for Y by Z.
- 
getFieldOfViewpublic double getFieldOfView()Returns the field of view of the camera (derived from focalLength).
- 
setFieldOfViewpublic void setFieldOfView(double aValue) Sets the field of view of the camera.
- 
setDefaultViewSettingspublic void setDefaultViewSettings()Sets some reasonable default view settings.
- 
getCameraReturns the camera as a vector.
- 
getLightReturns the scene light as a vector.
- 
getShapeCountpublic int getShapeCount()Returns the number of shapes in the shape list.
- 
getShapeReturns the specific shape at the given index from the shape list.
- 
addShapeAdds a shape to the end of the shape list.
- 
addShapeAdds a shape to the shape list at the given index.
- 
removeShapepublic void removeShape(int anIndex) Removes the shape at the given index from the shape list.
- 
getTransform3DReturns the transform 3d for the scene's camera.
- 
layoutChildrenprotected void layoutChildren()Rebuilds 3D representation of shapes from shapes list.- Overrides:
- layoutChildrenin class- RMParentShape
 
- 
addChild3DAdds a given shape in 3D. FixEdges flag indicates wheter to stroke polygons created during extrusion, to try to make them mesh better. The axisAlign flag can be set to true to make sure the shape's coordinate system is aligned with the screen.
- 
setFillAndStrokepublic void setFillAndStroke(RMScene3D.RMShape3D aShape3D, RMFill aFill, RMStroke aStroke, RMEffect anEffect) Sets the fill and stroke of a 3D shape from a 2D shape.
- 
setColorSets the color for a 3d shape from a base color.
- 
resortpublic void resort()Resorts child shapes from back to front.
- 
isShowingOverride to make all 3D children show.- Overrides:
- isShowingin class- RMParentShape
 
- 
isHittableOverride to indicate that scene children are unhittable.- Overrides:
- isHittablein class- RMParentShape
 
- 
acceptsMousepublic boolean acceptsMouse()Viewer method.- Overrides:
- acceptsMousein class- RMShape
 
- 
mousePressedViewer method.- Overrides:
- mousePressedin class- RMShape
 
- 
mouseDraggedViewer method.- Overrides:
- mouseDraggedin class- RMShape
 
- 
mouseReleasedViewer method.- Overrides:
- mouseReleasedin class- RMShape
 
- 
getValueIsAdjustingpublic boolean getValueIsAdjusting()Returns whether scene3d is being re-oriented.
- 
copy3DCopy 3D attributes only.
- 
toXMLShapeXML archival.- Overrides:
- toXMLShapein class- RMParentShape
 
- 
toXMLChildrenXML archival of children - overrides shape implementation to suppress archival of generated 3D shapes.- Overrides:
- toXMLChildrenin class- RMParentShape
 
- 
fromXMLShapeXML unarchival.- Overrides:
- fromXMLShapein class- RMParentShape
 
 
-