SceneTree
-
class HPS::SceneTree : public HPS::Sprocket
The SceneTree class is a smart pointer which corresponds to a tree object in a GUI toolkit, e.g., a TreeView in WPF or a CTreeCtrl in MFC. This class can be derived from to facilitate tree creation in the various GUI toolkits. It is used to create a scene graph or segment browser.
Public Types
-
enum ItemType
Enumerates the types of items that can be contained in a SceneTree.
Values:
-
enumerator None
No type.
-
enumerator GenericMask
Mask for the grouping bits in the enum.
-
enumerator Segment
Item is a SegmentKey, or some object derived from a SegmentKey.
-
enumerator Include
Item is an IncludeKey.
-
enumerator ConditionalExpression
Item is a logical conditional expression. This is the condition associated with a conditional include, reference or style.
-
enumerator StaticModelSegment
Item is a SegmentKey which corresponds to the shadow tree for the static model.
-
enumerator AttributeFilter
Item is an attribute filter on an include or style.
-
enumerator Geometry
Mask for geometry items.
-
enumerator CuttingSection
Item is a CuttingSectionKey.
-
enumerator NURBSSurface
Item is a NURBSSurfaceKey.
-
enumerator Cylinder
Item is a CylinderKey.
-
enumerator Polygon
Item is a PolygonKey.
-
enumerator CircularWedge
Item is a CircularWedgeKey.
-
enumerator Ellipse
Item is an EllipseKey.
-
enumerator NURBSCurve
Item is a NURBSCurveKey.
-
enumerator CircularArc
Item is a CircularArcKey.
-
enumerator EllipticalArc
Item is an EllipticalArcKey.
-
enumerator InfiniteLine
Item is an InfiniteLineKey of type InfiniteLine::Type::Line.
-
enumerator InfiniteRay
Item is an InfiniteLineKey of type InfiniteLine::Type::Ray.
-
enumerator Reference
Item is a ReferenceKey.
-
enumerator DistantLight
Item is a DistantLightKey.
-
enumerator Spotlight
Item is a SpotlightKey.
-
enumerator Attribute
Mask for attribute items.
-
enumerator Portfolio
Item is a PortfolioKey that has been pushed onto a SegmentKey.
-
enumerator SegmentStyle
Item is a StyleKey for a SegmentKey that was styled onto a SegmentKey.
-
enumerator NamedStyle
Item is a StyleKey for a name of a NamedStyleDefinition that was styled onto a SegmentKey.
-
enumerator MaterialPalette
Item is a MaterialPalette on a SegementKey.
-
enumerator Priority
Item is a Priority on a SegmentKey.
-
enumerator Material
Item is a MaterialMappingKit on a SegmentKey.
-
enumerator Camera
Item is a CameraKit on a SegmentKey.
-
enumerator ModellingMatrix
Item is a modelling matrix on a SegmentKey.
-
enumerator UserData
Item is user data on a SegmentKey.
-
enumerator TextureMatrix
Item is a texture matrix on a SegmentKey.
-
enumerator Culling
Item is a CullingKit on a SegmentKey.
-
enumerator CurveAttribute
Item is a CurveAttributeKit on a SegmentKey.
-
enumerator CylinderAttribute
Item is a CylinderAttributeKit on a SegmentKey.
-
enumerator EdgeAttribute
Item is an EdgeAttributeKit on a SegmentKey.
-
enumerator LightingAttribute
Item is a LightingAttributeKit on a SegmentKey.
-
enumerator LineAttribute
Item is a LineAttributeKit on a SegmentKey.
-
enumerator MarkerAttribute
Item is a MarkerAttributeKit on a SegmentKey.
-
enumerator SurfaceAttribute
Item is a SurfaceAttributeKit on a SegmentKey.
-
enumerator Selectability
Item is a SelectabilityKit on a SegmentKey.
-
enumerator SphereAttribute
Item is a SphereAttributeKit on a SegmentKey.
-
enumerator Subwindow
Item is a SubwindowKit on a SegmentKey.
-
enumerator TextAttribute
Item is a TextAttributeKit on a SegmentKey.
-
enumerator Transparency
Item is a TransparencyKit on a SegmentKey.
-
enumerator Visibility
Item is a VisibilityKit on a SegmentKey.
-
enumerator VisualEffects
Item is a VisualEffectsKit on a SegmentKey.
-
enumerator Performance
Item is a PerformanceKit on a SegmentKey.
-
enumerator DrawingAttribute
Item is a DrawingAttributeKit on a SegmentKey.
-
enumerator HiddenLineAttribute
Item is a HiddenLineAttributeKit on a SegmentKey.
-
enumerator ContourLine
Item is a ContourLineKit on a SegmentKey.
-
enumerator Condition
Item is a Condition on a SegmentKey.
-
enumerator Bounding
Item is a BoundingKit on a SegmentKey.
-
enumerator AttributeLock
Item is a AttributeLockKit on a SegmentKey.
-
enumerator TransformMask
Item is a TransformMaskKit on a SegmentKey.
-
enumerator ColorInterpolation
Item is a ColorInterpolationKit on a SegmentKey.
-
enumerator CuttingSectionAttribute
Item is a CuttingSectionAttributeKit on a SegmentKey.
-
enumerator PBRMaterial
Item is a MaterialMappingKit on a SegmentKey.
-
enumerator Debugging
Item is a DebuggingKit on a WindowKey.
-
enumerator PostProcessEffects
Item is a PostProcessEffectsKit on a WindowKey.
-
enumerator SelectionOptions
Item is a SelectionOptionsKit on a WindowKey.
-
enumerator UpdateOptions
Item is an UpdateOptionsKit on a WindowKey.
-
enumerator Definition
Mask for definition items.
-
enumerator NamedStyleDefinition
Item is a NamedStyleDefintion in a PortfolioKey.
-
enumerator TextureDefinition
Item is a TextureDefinition in a PortfolioKey.
-
enumerator LinePatternDefinition
Item is a LinePatternDefinition in a PortfolioKey.
-
enumerator GlyphDefinition
Item is a GlyphDefinition in a PortfolioKey.
-
enumerator CubeMapDefinition
Item is a CubeMapDefinition in a PortfolioKey.
-
enumerator ImageDefinition
Item is a ImageDefinition in a PortfolioKey.
-
enumerator MaterialPaletteDefinition
Item is a MaterialPaletteDefinition in a PortfolioKey.
-
enumerator LegacyShaderDefinition
Item is a LegacyShaderDefinition in a PortfolioKey.
-
enumerator ShapeDefinition
Item is a ShapeDefinition in a PortfolioKey.
-
enumerator Group
Mask for group items.
-
enumerator SegmentGroup
Item is a collection of SegmentKey objects.
-
enumerator GeometryGroup
Item is a collection of specific geometry type groups.
-
enumerator AttributeGroup
Item is a collection of attributes.
-
enumerator PortfolioGroup
Item is a collection of PortfolioKey objects.
-
enumerator IncludeGroup
Item is a collection of IncludeKey objects.
-
enumerator DefinitionGroup
Mask for definition group items.
-
enumerator NamedStyleDefinitionGroup
Item is a collection of NamedStyleDefinition objects.
-
enumerator TextureDefinitionGroup
Item is a collection of TextureDefinition objects.
-
enumerator LinePatternDefinitionGroup
Item is a collection of LinePatternDefinition objects.
-
enumerator GlyphDefinitionGroup
Item is a collection of GlyphDefinition objects.
-
enumerator CubeMapDefinitionGroup
Item is a collection of CubeMapDefinition objects.
-
enumerator ImageDefinitionGroup
Item is a collection of ImageDefinition objects.
-
enumerator MaterialPaletteDefinitionGroup
Item is a collection of MaterialPaletteDefinition objects.
-
enumerator LegacyShaderDefinitionGroup
Item is a collection of LegacyShaderDefinition objects.
-
enumerator ShapeDefinitionGroup
Item is a collection of ShapeDefinition objects.
-
enumerator GeometryGroupMask
Mask for groups that contain geometry.
-
enumerator CuttingSectionGroup
Item is a collection of CuttingSectionKey objects.
-
enumerator NURBSSurfaceGroup
Item is a collection of NURBSSurfaceKey objects.
-
enumerator CylinderGroup
Item is a collection of CylinderKey objects.
-
enumerator PolygonGroup
Item is a collection of PolygonKey objects.
-
enumerator CircularWedgeGroup
Item is a collection of CircularWedgeKey objects.
-
enumerator EllipseGroup
Item is a collection of EllipseKey objects.
-
enumerator NURBSCurveGroup
Item is a collection of NURBSCurveKey objects.
-
enumerator CircularArcGroup
Item is a collection of CircularArcKey objects.
-
enumerator EllipticalArcGroup
Item is a collection of EllipticalArcKey objects.
-
enumerator InfiniteLineGroup
Item is a collection of InfiniteLineKey (of type InfiniteLine::Type::Line) objects.
-
enumerator InfiniteRayGroup
Item is a collection of InfiniteLineKey (of type InfiniteLine::Type::Ray) objects.
-
enumerator ReferenceGroup
Item is a collection of ReferenceKey objects.
-
enumerator DistantLightGroup
Item is a collection of DistantLightKey objects.
-
enumerator SpotlightGroup
Item is a collection of SpotlightKey objects.
-
enumerator None
Public Functions
-
void AddHighlightOptions(HighlightOptionsKit const &in_options)
Appends one highlight options that will be used by this SceneTree. These options are used to perform highlights of elements within the tree and to determine what items within the tree need to be marked as selected when highlights are performed by a HighlightOperator or HighlightAreaOperator.
- See
- See
- See
- See
- Parameters
in_options – highlight options that will be used by this SceneTree.
-
virtual void Assign(SceneTree const &in_that)
Share the underlying smart-pointer of the SceneTree source.
-
bool Equals(SceneTree const &in_that) const
Check if the source SceneTree points to the same underlying impl as this SceneTree.
-
virtual void Flush()
Resets the root SceneTreeItem for this SceneTree. This will release the root SceneTreeItem by this SceneTree and set the root to a null pointer. If this function is overridden, the overriding function should invoke this base function.
-
size_t GetGroupingLimit() const
Gets the grouping limit for this SceneTree.
- Returns
The grouping limit for this SceneTree.
-
bool GetHighlightEventHandling() const
Whether this SceneTree is currently handling highlight events This include expanding the tree to the highlighted SceneTreeItem, and making the text for the highlighted SceneTreeItem bold.
- Returns
Whether this SceneTreeItem is currently handling highlight events.
-
HighlightOptionsKitArray GetHighlightOptions() const
Gets the highlight options that will be used by this SceneTree.
- Returns
The highlight options that will be used by this SceneTree.
-
SceneTreeItemPtr GetRoot() const
Gets the root SceneTreeItem for this SceneTree.
- Returns
The root SceneTreeItem for this SceneTree.
-
inline virtual HPS::Type ObjectType() const
This function returns the type the object, as declared (if the object is derived, this does not give the true type of the derived object).
- Returns
The declared type of the object in question, which may differ from the true, underlying type.
-
bool operator!=(SceneTree const &in_that) const
Check if the source SceneTree points to a different impl than this SceneTree.
-
SceneTree &operator=(SceneTree &&in_that)
The move assignment operator transfers the underlying object of the rvalue reference to this SceneTree.
-
SceneTree &operator=(SceneTree const &in_that)
Share the underlying smart-pointer of the SceneTree source.
-
bool operator==(SceneTree const &in_that) const
Check if the source SceneTree points to the same underlying impl as this SceneTree.
-
void ReExpand()
Collapses the root SceneTreeItem for this SceneTree and then re-expands the tree. It will try to preserve the original expansion state, however, if the underlying scene structure has changed, the resulting expansion may look different.
-
SceneTree()
The default constructor creates an uninitialized SceneTree object. The Type() function will return Type::None.
-
SceneTree(Canvas const &in_canvas)
This constructor creates a SceneTree object associated with a Canvas. This constructor should be used to create a new SceneTree object.
-
SceneTree(SceneTree &&in_that)
The move constructor creates a SceneTree by transferring the underlying object of the rvalue reference to this SceneTree.
- Parameters
in_that – An rvalue reference to a SceneTree to take the underlying object from.
-
SceneTree(SceneTree const &in_that)
The copy constructor creates a SceneTree object that shares the underlying smart-pointer of the source SceneTree.
- Parameters
in_that – The source SceneTree to copy.
-
void SetGroupingLimit(size_t in_limit)
Sets the grouping limit for this SceneTree. The grouping limit determines when to collect certain items into groups of a particular size. This limit is used to keep the number of children for a particular SceneTreeItem constrained to ensure reasonable performance. Presently this limit is used for segments and geometry SceneTreeItem objects.
- Parameters
in_limit – The grouping limit for this SceneTree.
-
void SetHighlightEventHandling(bool in_state)
Whether the SceneTree should handle highlighting events. This include expanding the tree to the highlighted SceneTreeItem, and making the text for the highlighted SceneTreeItem bold. By default the SceneTree will handle highlight events.
- Parameters
in_state – Whether to handle highlight events.
-
void SetHighlightOptions(HighlightOptionsKit const &in_options)
Sets the highlight options that will be used by this SceneTree. These options are used to perform highlights of elements within the tree and to determine what items within the tree need to be marked as selected when highlights are performed by a HighlightOperator or HighlightAreaOperator. Calling this function replaces any highlight options previously set on this object.
- See
- See
- See
- See
- Parameters
in_options – The highlight options that will be used by this SceneTree.
-
void SetHighlightOptions(HighlightOptionsKitArray const &in_options)
Sets the highlight options that will be used by this SceneTree. These options are used to perform highlights of elements within the tree and to determine what items within the tree need to be marked as selected when highlights are performed by a HighlightOperator or HighlightAreaOperator. Calling this function replaces any highlight options previously set on this object. All elements of the array should be unique. In the case of multiple identical elements, only the first unique one will be added.
- See
- See
- See
- See
- Parameters
in_options – An array of highlight options that will be used by this SceneTree.
-
void SetHighlightOptions(size_t in_count, HighlightOptionsKit const in_options[])
Sets the highlight options that will be used by this SceneTree. These options are used to perform highlights of elements within the tree and to determine what items within the tree need to be marked as selected when highlights are performed by a HighlightOperator or HighlightAreaOperator. Calling this function replaces any highlight options previously set on this object. All elements of the array should be unique. In the case of multiple identical elements, only the first unique one will be added.
- See
- See
- See
- See
- Parameters
in_count – the number of highlight options kits in the in_options array
in_options – An array of highlight options that will be used by this SceneTree.
-
void SetRoot(SceneTreeItemPtr const &in_root)
Sets the root SceneTreeItem for this SceneTree. This object should be created on the heap and it should have been created with a SceneTreeItem constructor which took a Model, View, Canvas or Layout, otherwise an exception will be thrown. Additionally, if there was already an existing root for this SceneTree, the Flush function will be invoked prior to setting this as the new root, and Expand will be invoked on the new root.
- See
- See
- Parameters
in_root – The root SceneTreeItem for this SceneTree.
-
virtual ~SceneTree()
Public Static Attributes
-
static const HPS::Type staticType = HPS::Type::SceneTree
-
enum ItemType