Package com.reportmill.shape
Class RMScene3D
- java.lang.Object
- 
- com.reportmill.base.RMObject
- 
- com.reportmill.shape.RMShape
- 
- com.reportmill.shape.RMScene3D
 
 
 
- 
- All Implemented Interfaces:
- RMArchiver.Archiving,- java.lang.Cloneable
 - Direct Known Subclasses:
- RMGraphBarView3D,- RMGraphContent,- RMGraphPieView3D
 
 public class RMScene3D extends RMShape 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 Classes Modifier and Type Class Description static classRMScene3D.RMShape3DRMPolygon subclass that encapsulates a Path3D.
 - 
Field SummaryFields Modifier and Type Field Description intCONSTRAIN_NONEintCONSTRAIN_PITCHintCONSTRAIN_YAW- 
Fields inherited from class com.reportmill.shape.RMShapeWRAP_TYPE_BOTH, WRAP_TYPE_NONE
 
- 
 - 
Constructor SummaryConstructors Constructor Description RMScene3D()Creates a new Scene3d.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanacceptsMouse()Viewer method.protected RMScene3D.RMShape3DaddChild3D(RMShape aShape, float z1, float z2)Adds a given shape in 3D.protected RMScene3D.RMShape3DaddChild3D(RMShape aShape, float z1, float z2, boolean fixupEdges, boolean axisAlign)Adds a given shape in 3D.voidaddShape(RMShape aShape)Adds a shape to the end of the shape list.voidaddShape(RMShape aShape, int anIndex)Adds a shape to the shape list at the given index.booleancanBeUngrouped()Editor method - declares that this shape can't be ungrouped.voidcopy(java.lang.Object anObj)Copies the attributes from the given object.booleanequals(java.lang.Object anObj)Standard equals implementation.java.lang.ObjectfromXML(RXArchiver anArchiver, RXElement anElement)XML unarchival.RMRectgetBoundsMarked()Overrides shape implementation to reflect that transformed children may extend outside bounds.RMRectgetBoundsSuperSelected()Returns the bounds of the shape in parect coords when super selected (same as getBoundsMarked by default).RMVector3DgetCamera()Returns the camera as a vector.java.util.ListgetChildrenWhoHitTest()Editor method - declares that no child of this shape can be selected.floatgetDepth()Returns the depth of the scene.floatgetFieldOfView()Returns the field of view of the camera (derived from focalLength).floatgetFocalLength()Returns the focal length of the camera (derived from the field of view and with view size).RMVector3DgetLight()Returns the scene light as a vector.floatgetOffsetZ()Returns the Z offset of the scene (for zooming).RMPoint3DgetOrigin()Returns the scene's origin.floatgetPitch()Returns the rotation about the X axis in degrees.floatgetPseudoSkewX()Returns the skew angle for X by Z.floatgetPseudoSkewY()Returns the skew angle for Y by Z.RMShapegetShape(int anIndex)Returns the specific shape at the given index from the shape list.intgetShapeCount()Returns the number of shapes in the shape list.RMTransform3DgetTransform3D()Returns the transform 3d for the scene's camera.floatgetYaw()Returns the rotation about the Y axis in degrees.floatgetZRoll()Returns the rotation about the Z axis in degrees.booleanisPseudo3D()Returns whether scene is rendered in pseudo 3d.voidmouseDragged(RMViewer aViewer, java.awt.event.MouseEvent anEvent)Viewer method.voidmousePressed(RMViewer aViewer, java.awt.event.MouseEvent anEvent)Viewer method.voidmouseReleased(RMViewer aViewer, java.awt.event.MouseEvent anEvent)Viewer method.voidrebuild()Rebuilds 3D representation of shapes from shapes list.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.voidsetDepth(float aDepth)Sets the depth of the scene.voidsetFieldOfView(float aValue)Sets the field of view of the camera.voidsetFillAndStroke(RMScene3D.RMShape3D aShape3D, RMShape aShape)Sets the fill and stroke of a 3D shape from a 2D shape.voidsetFocalLength(float aValue)Sets the focal length of the camera.voidsetOffsetZ(float aValue)Sets the Z offset of the scene (for zooming).voidsetPitch(float aValue)Sets the rotation about the X axis in degrees.voidsetPseudo3D(boolean aFlag)Sets whether scene is rendered in pseudo 3d.voidsetPseudoSkewX(float anAngle)Sets the skew angle for X by Z.voidsetPseudoSkewY(float anAngle)Sets the skew angle for Y by Z.voidsetYaw(float aValue)Sets the rotation about the Y axis in degrees.voidsetZRoll(float aValue)Sets the rotation about the Z axis in degrees.booleansuperSelectable()Editor method - indicates that scene 3d is super selectable.RXElementtoXML(RXArchiver anArchiver)XML archival.- 
Methods inherited from class com.reportmill.shape.RMShapeacceptsChildren, acceptsDragKeys, acceptsFormat, addChild, addChild, addChildBelowLastChild, bounds, boundsChanged, boundsChanged, bringShapesToFront, childrenSuperSelectImmediately, clone, cloneDeep, contains, convertedPointFromShape, convertedPointToShape, convertedRectFromShape, convertedRectToShape, convertedSizeFromShape, convertedSizeToShape, convertedVectorFromShape, convertedVectorToShape, convertFromShape, convertPathFromShape, convertPathToShape, convertPointFromShape, convertPointToShape, convertRectFromShape, convertRectToShape, convertSizeFromShape, convertSizeToShape, convertToShape, convertVectorFromShape, convertVectorToShape, copyShape, delete, didChange, divideShapeFromEdge, divideShapeFromTop, dragExit, dragKeyAtPoint, dropKeyAtPoint, fromXMLDeep, get, getActionScript, getAnim, getAnim, getAnimator, getAnimator, getAutosizeHeight, getAutosizing, getBounds, getBoundsInside, getBoundsOfChildren, getBoundsOfChildren, getCausesWrap, getCausesWrapType, getChild, getChildAnimator, getChildAnimator, getChildContaining, getChildCount, getChildLast, getChildren, getChildrenIntersecting, getChildrenWhoCauseWrap, getChildrenWhoDraw, getChildSortedByX, getChildWithClass, getChildWithName, getColor, getCommonAncestor, getDocument, getFill, getFill, getFill, getFillCount, getFills, getFont, getFormat, getFrame, getFrame, getFrameMaxX, getFrameMaxY, getFrameX, getFrameXY, getFrameY, getGroupShape, getHeight, getHeightToFit, getImageFill, getLineWidth, getListKey, getListKeyDeep, getListKeyShape, getMaxX, getMaxY, getName, getOpacity, getOpacityDeep, getOutline, getPageCount, getPageShape, getParent, getParentCount, getParents, getPath, getPathInBounds, getPropertyKey, getPropertyKeyCount, getPropertyKeyName, getRoll, getRootShape, getScaleX, getScaleY, getShapesToAncestor, getShapesToDescendant, getShapesToShape, getSize, getSizeP, getSkewX, getSkewY, getStroke, getStrokeColor, getTextColor, getToolClassName, getTransform, getTransformFromShape, getTransformInverse, getTransformToShape, getUndoer, getUrl, getWidth, getWidthToFit, getX, getXY, getXYP, getY, groupShapes, hasPageBreaks, height, indexOf, indexOf, initWithArchiver, intersects, isAncestor, isDescendant, isLocked, isRoot, isUnderlined, mouseEntered, mouseExited, mouseMoved, notRSS, offsetChildrenXY, offsetXY, page, pageBreakMax, pageBreakPageMax, pageMax, put, putPropertyKey, reclaimChildren, removeChild, removeChild, removeChildren, removeChildren, removeFromParent, resolvePageReferences, rpgClone, rpgCloneBase, rpgCloneChildren, rpgCloneConclude, rpgCloneNotification, rpgClonePrepare, rpgClonePreprocess, rpgCloneUrl, sendShapesToBack, setActionScript, setAnim, setAutosizeHeight, setAutosizing, setBounds, setBounds, setCausesWrapType, setChildren, setColor, setFill, setFont, setFormat, setFrame, setFrame, setFrameSize, setFrameX, setFrameXY, setFrameXY, setFrameY, setHeight, setHeightDeep, setHeightDeep, setHeightToFit, setLineWidth, setListKey, setLocked, setName, setNeedsRepaint, setNeedsRepaint, setOpacity, setOutline, setParent, setRoll, setScaleX, setScaleXY, setScaleY, setSize, setSize, setSizeDeep, setSizeP, setSizeToFit, setSizeToFit, setSkewX, setSkewXY, setSkewY, setStroke, setStrokeColor, setTextColor, setTime, setUnderlined, setUrl, setWidth, setWidthDeep, setWidthDeep, setWidthToFit, setX, setXY, setXY, setXYP, setY, sizesToFitChildren, toString, undoClone, undoCopy, undoEquals, undoerAddDirtyObject, undoerDisable, undoerEnable, undoerSetUndoTitle, width, willChange, willChange, x, y
 - 
Methods inherited from class com.reportmill.base.RMObjectdidUndo, getAnimAttribute, getClassNameShort
 
- 
 
- 
- 
- 
Field Detail- 
CONSTRAIN_NONEpublic final int CONSTRAIN_NONE - See Also:
- Constant Field Values
 
 - 
CONSTRAIN_PITCHpublic final int CONSTRAIN_PITCH - See Also:
- Constant Field Values
 
 - 
CONSTRAIN_YAWpublic final int CONSTRAIN_YAW - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getDepthpublic float getDepth() Returns the depth of the scene.
 - 
setDepthpublic void setDepth(float aDepth) Sets the depth of the scene.
 - 
getOriginpublic RMPoint3D getOrigin() Returns the scene's origin.
 - 
getYawpublic float getYaw() Returns the rotation about the Y axis in degrees.
 - 
setYawpublic void setYaw(float aValue) Sets the rotation about the Y axis in degrees.
 - 
getPitchpublic float getPitch() Returns the rotation about the X axis in degrees.
 - 
setPitchpublic void setPitch(float aValue) Sets the rotation about the X axis in degrees.
 - 
getZRollpublic float getZRoll() Returns the rotation about the Z axis in degrees.
 - 
setZRollpublic void setZRoll(float aValue) Sets the rotation about the Z axis in degrees.
 - 
getFocalLengthpublic float getFocalLength() Returns the focal length of the camera (derived from the field of view and with view size).
 - 
setFocalLengthpublic void setFocalLength(float aValue) Sets the focal length of the camera. Two feet is normal (1728 points).
 - 
getOffsetZpublic float getOffsetZ() Returns the Z offset of the scene (for zooming).
 - 
setOffsetZpublic void setOffsetZ(float 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 float getPseudoSkewX() Returns the skew angle for X by Z.
 - 
setPseudoSkewXpublic void setPseudoSkewX(float anAngle) Sets the skew angle for X by Z.
 - 
getPseudoSkewYpublic float getPseudoSkewY() Returns the skew angle for Y by Z.
 - 
setPseudoSkewYpublic void setPseudoSkewY(float anAngle) Sets the skew angle for Y by Z.
 - 
getFieldOfViewpublic float getFieldOfView() Returns the field of view of the camera (derived from focalLength).
 - 
setFieldOfViewpublic void setFieldOfView(float aValue) Sets the field of view of the camera.
 - 
getCamerapublic RMVector3D getCamera() Returns the camera as a vector.
 - 
getLightpublic RMVector3D getLight() Returns the scene light as a vector.
 - 
getShapepublic RMShape getShape(int anIndex) Returns the specific shape at the given index from the shape list.
 - 
getShapeCountpublic int getShapeCount() Returns the number of shapes in the shape list.
 - 
addShapepublic void addShape(RMShape aShape) Adds a shape to the end of the shape list.
 - 
addShapepublic void addShape(RMShape aShape, int anIndex) Adds 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.
 - 
getTransform3Dpublic RMTransform3D getTransform3D() Returns the transform 3d for the scene's camera.
 - 
rebuildpublic void rebuild() Rebuilds 3D representation of shapes from shapes list.
 - 
addChild3Dprotected RMScene3D.RMShape3D addChild3D(RMShape aShape, float z1, float z2) Adds a given shape in 3D.
 - 
addChild3Dprotected RMScene3D.RMShape3D addChild3D(RMShape aShape, float z1, float z2, boolean fixupEdges, boolean axisAlign) Adds a given shape in 3D. fixupEdges flag indicates wheter or not to stroke the 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, RMShape aShape) Sets the fill and stroke of a 3D shape from a 2D shape.
 - 
setColorpublic void setColor(RMScene3D.RMShape3D aShape3D, RMColor aColor) Sets the color for a 3d shape from a base color.
 - 
resortpublic void resort() Resorts child shapes from back to front.
 - 
getBoundsSuperSelectedpublic RMRect getBoundsSuperSelected() Returns the bounds of the shape in parect coords when super selected (same as getBoundsMarked by default).- Overrides:
- getBoundsSuperSelectedin class- RMShape
 
 - 
getBoundsMarkedpublic RMRect getBoundsMarked() Overrides shape implementation to reflect that transformed children may extend outside bounds.- Overrides:
- getBoundsMarkedin class- RMShape
 
 - 
canBeUngroupedpublic boolean canBeUngrouped() Editor method - declares that this shape can't be ungrouped.- Overrides:
- canBeUngroupedin class- RMShape
 
 - 
superSelectablepublic boolean superSelectable() Editor method - indicates that scene 3d is super selectable.- Overrides:
- superSelectablein class- RMShape
 
 - 
acceptsMousepublic boolean acceptsMouse() Viewer method.- Overrides:
- acceptsMousein class- RMShape
 
 - 
mousePressedpublic void mousePressed(RMViewer aViewer, java.awt.event.MouseEvent anEvent) Viewer method.- Overrides:
- mousePressedin class- RMShape
 
 - 
mouseDraggedpublic void mouseDragged(RMViewer aViewer, java.awt.event.MouseEvent anEvent) Viewer method.- Overrides:
- mouseDraggedin class- RMShape
 
 - 
mouseReleasedpublic void mouseReleased(RMViewer aViewer, java.awt.event.MouseEvent anEvent) Viewer method.- Overrides:
- mouseReleasedin class- RMShape
 
 - 
getChildrenWhoHitTestpublic java.util.List getChildrenWhoHitTest() Editor method - declares that no child of this shape can be selected.- Overrides:
- getChildrenWhoHitTestin class- RMShape
 
 - 
equalspublic boolean equals(java.lang.Object anObj) Standard equals implementation.
 - 
copypublic void copy(java.lang.Object anObj) Copies the attributes from the given object.
 - 
toXMLpublic RXElement toXML(RXArchiver anArchiver) XML archival.
 - 
fromXMLpublic java.lang.Object fromXML(RXArchiver anArchiver, RXElement anElement) XML unarchival.
 
- 
 
-