The View class is one of the four core display classes used in a Visualize application. More...
#include <sprk.h>
Public Member Functions | |
View () | |
View (View const &that) | |
View (SprocketControl const &in_ctrl) | |
~View () | |
HPS::Type | ObjectType () const |
void | Delete () |
Deletes this View. More... | |
View & | operator= (View const &in_that) |
void | Assign (View const &in_that) |
bool | Equals (View const &in_that) const |
bool | operator!= (View const &in_that) const |
bool | operator== (View const &in_that) const |
UTF8 | GetName () const |
Get the name used when creating this View. More... | |
HPS::View & | ComputeFitWorldCamera (HPS::CameraKit &out_camera) |
This method computes a camera to fit the extents of the scene. More... | |
HPS::View & | ComputeFitWorldCamera (SegmentKey const &in_segment, HPS::CameraKit &out_camera) |
This method computes a camera to fit the extents of a segment. More... | |
HPS::View & | ComputeFitWorldCamera (BoundingKit const &in_bounding, HPS::CameraKit &out_camera) |
This method computes a camera to fit a bounding. More... | |
HPS::View & | ComputeFitWorldCamera (SegmentKey const &in_segment, MatrixKit const &in_transform, HPS::CameraKit &out_camera) |
This method computes a camera to fit the extents of a segment. More... | |
HPS::View & | ComputeFitWorldCamera (BoundingKit const &in_bounding, MatrixKit const &in_transform, HPS::CameraKit &out_camera) |
This method computes a camera to fit a bounding. More... | |
HPS::View & | FitWorld () |
This method automatically adjusts the camera to fit the extents of the scene. More... | |
HPS::View & | FitWorld (SegmentKey const &in_segment) |
This method automatically adjusts the camera to fit the extents of a segment. More... | |
HPS::View & | FitWorld (BoundingKit const &in_bounding) |
This method automatically adjusts the camera to fit a bounding. More... | |
HPS::View & | FitWorld (SegmentKey const &in_segment, MatrixKit const &in_transform) |
This method automatically adjusts the camera to fit the extents of a segment. More... | |
HPS::View & | FitWorld (BoundingKit const &in_bounding, MatrixKit const &in_transform) |
This method automatically adjusts the camera to fit a bounding. More... | |
void | AttachModel (Model const &in_model) |
Attaches a Model to this View. More... | |
void | DetachModel () |
Detaches the Model from this View. More... | |
Model | GetAttachedModel () const |
Returns the Model that is attached to this View. More... | |
IncludeKey | GetAttachedModelIncludeLink () const |
Returns the IncludeKey associated with this View. More... | |
void | SetRenderingMode (Rendering::Mode in_mode) |
Sets the rendering mode for this View. More... | |
Rendering::Mode | GetRenderingMode () const |
Gets the rendering mode for this View. More... | |
OperatorPtrArray | GetOperators () const |
Gets an array of all operators currently active on this View. More... | |
void | SetOperators (OperatorPtrArray &in_operators) |
Makes a set of operators active on this View. More... | |
void | SetOperators (size_t in_count, OperatorPtr in_operators []) |
Makes an array of operators active on this View. More... | |
void | SetOperator (OperatorPtr const &in_operator) |
Makes an operator active on this View. More... | |
void | SetOperator (Operator *in_operator) |
Makes an operator active on this View. More... | |
OperatorControl | GetOperatorControl () |
Gets the OperatorControl that is associated with this View. More... | |
OperatorControl const | GetOperatorControl () const |
NavigationCubeControl | GetNavigationCubeControl () |
Gets the NavigationCubeControl that is associated with this View. More... | |
NavigationCubeControl const | GetNavigationCubeControl () const |
AxisTriadControl | GetAxisTriadControl () |
Gets the AxisTriadControl that is associated with this View. More... | |
AxisTriadControl const | GetAxisTriadControl () const |
SegmentKey | GetSegmentKey () |
Each of the four display hierarchy objects (HPS::Canvas, HPS::Layout, HPS::View, HPS::Model) are backed by a HPS::SegmentKey. More... | |
SegmentKey const | GetSegmentKey () const |
SegmentKey | GetModelOverrideSegmentKey () |
Returns the model override segment. More... | |
SegmentKey const | GetModelOverrideSegmentKey () const |
PortfolioKey const | GetPortfolioKey () const |
PortfolioKey | GetPortfolioKey () |
Returns the HPS::PortfolioKey associated with this View. More... | |
void | SetSimpleShadow (bool in_state, float in_percent_offset=5.0f) |
Turns simple shadows on or off, automatically calculating shadow plane and light direction. More... | |
bool | GetSimpleShadow () |
Returns the status of the simple shadows. More... | |
void | SetSimpleReflection (bool in_state, float in_percent_offset=5.0f) |
Turns simple reflection on or off, automatically calculating reflection plane and light direction. More... | |
bool | GetSimpleReflection () |
Returns the status of the simple reflection. More... | |
void | Update () const |
Redraws the View and all Layouts it appears in, including all of its child components. More... | |
UpdateNotifier | UpdateWithNotifier () const |
Redraws the View and all Layouts it appears in, including all of its child components using the default options, and also returns a notifier to facilitate tracking the update progress. More... | |
void | Update (HPS::Window::UpdateType in_type, HPS::Time in_time_limit=-1.0) const |
Redraws the View and all Layouts it appears in, including all of its child components using the specified parameters. More... | |
UpdateNotifier | UpdateWithNotifier (HPS::Window::UpdateType in_type, HPS::Time in_time_limit=-1.0) const |
Redraws the View and all Layouts it appears in, including all of its child components using the specified, and also returns a notifier to facilitate tracking the update progress. More... | |
void | SmoothTransition (HPS::CameraKit const &in_camera_kit, HPS::Time in_duration=0.5) |
Smoothly moves the camera from the current position to the one specified by the user. More... | |
KeyArray const | GetNavigationKeys () |
Gets an array of Keys associated with the Axis Triad and Navigation Cube for this View. More... | |
LayoutArray | GetOwningLayouts () |
Returns an array containing the Layouts this View is included in. More... | |
LayoutArray const | GetOwningLayouts () const |
virtual HPS::Type | Type () const |
This function returns the true type of the underlying object. More... | |
virtual bool | Empty () const |
Indicates whether this object has any values set on it. More... | |
virtual void | Reset () |
Resets this object to its initial, uninitialized state. More... | |
bool | HasType (HPS::Type in_mask) const |
This function indicates whether this Object has the given Type mask. More... | |
intptr_t | GetClassID () const |
Returns a unique identifier that is shared by all objects of the same class. More... | |
intptr_t | GetInstanceID () const |
Returns an identifier that can be used to identify which instance of a class an object is. More... | |
Static Public Member Functions | |
static UTF8 | GetHideStyleName () |
static UTF8 | GetShowStyleName () |
template<typename T > | |
static intptr_t | ClassID () |
Unique identifier for this class. More... | |
Static Public Attributes | |
static const HPS::Type | staticType = HPS::Type::View |
The View class is one of the four core display classes used in a Visualize application.
It is meant to be used as part of a display hierarchy along with the Canvas, Layout, and Model objects. The View has a parent Layout and can contain a single Model. The View is meant to represent one particular camera's view of the scene. Like the other three core objects, the View is backed by a HPS::SegmentKey.
HPS::View::View | ( | ) |
HPS::View::View | ( | View const & | that | ) |
|
explicit |
HPS::View::~View | ( | ) |
void HPS::View::Assign | ( | View const & | in_that | ) |
void HPS::View::AttachModel | ( | Model const & | in_model | ) |
|
inlinestaticinherited |
Unique identifier for this class.
Note: this method uses construction of static objects. If used in a constructor, it should be used in the body not the initializer list.
HPS::View& HPS::View::ComputeFitWorldCamera | ( | HPS::CameraKit & | out_camera | ) |
This method computes a camera to fit the extents of the scene.
out_camera | The camera computed by the fit world routine. |
HPS::View& HPS::View::ComputeFitWorldCamera | ( | SegmentKey const & | in_segment, |
HPS::CameraKit & | out_camera | ||
) |
This method computes a camera to fit the extents of a segment.
in_segment | The segment used to calculate the new camera. |
out_camera | The camera computed by the fit world routine. |
HPS::View& HPS::View::ComputeFitWorldCamera | ( | BoundingKit const & | in_bounding, |
HPS::CameraKit & | out_camera | ||
) |
This method computes a camera to fit a bounding.
in_bounding | The bounding used to calculate the new camera. |
out_camera | The camera computed by the fit world routine. |
HPS::View& HPS::View::ComputeFitWorldCamera | ( | SegmentKey const & | in_segment, |
MatrixKit const & | in_transform, | ||
HPS::CameraKit & | out_camera | ||
) |
This method computes a camera to fit the extents of a segment.
in_segment | The segment used to calculate the new camera. |
in_transform | An optional transform to apply to the segment bounding used to compute the camera. This can be used to ensure that the camera is looking at the geometry in the correct position once any modelling matrices are applied. |
out_camera | The camera computed by the fit world routine. |
HPS::View& HPS::View::ComputeFitWorldCamera | ( | BoundingKit const & | in_bounding, |
MatrixKit const & | in_transform, | ||
HPS::CameraKit & | out_camera | ||
) |
This method computes a camera to fit a bounding.
in_bounding | The bounding used to calculate the new camera. |
in_transform | An optional transform to apply to the bounding used to compute the camera. This can be used to ensure that the camera is looking at the geometry in the correct position once any modelling matrices are applied. |
out_camera | The camera computed by the fit world routine. |
void HPS::View::Delete | ( | ) |
|
inlinevirtualinherited |
Indicates whether this object has any values set on it.
Reimplemented in HPS::STL::ImportResultsKit, HPS::STL::ImportOptionsKit, HPS::OBJ::ImportResultsKit, HPS::OBJ::ImportOptionsKit, HPS::Hardcopy::File::ExportOptionsKit, HPS::Stream::ExportOptionsKit, HPS::Stream::ImportResultsKit, HPS::Stream::ImportOptionsKit, HPS::PointCloud::ImportOptionsKit, HPS::PointCloud::ImportResultsKit, HPS::UpdateOptionsKit, HPS::HighlightSearchOptionsKit, HPS::HighlightOptionsKit, HPS::SelectionOptionsKit, HPS::SearchOptionsKit, HPS::CutGeometryGatheringOptionsKit, HPS::ShapeKit, HPS::ShaderKit, HPS::Shader::ImportOptionsKit, HPS::ImageKit, HPS::Image::ImportOptionsKit, HPS::Image::ExportOptionsKit, HPS::TextureOptionsKit, HPS::LinePatternKit, HPS::LinePatternParallelKit, HPS::LinePatternOptionsKit, HPS::GlyphKit, HPS::ApplicationWindowOptionsKit, HPS::OffScreenWindowOptionsKit, HPS::StandAloneWindowOptionsKit, HPS::GridKit, HPS::PolygonKit, HPS::MeshKit, HPS::ShellKit, HPS::ShellRelationResultsKit, HPS::ShellRelationOptionsKit, HPS::ShellOptimizationOptionsKit, HPS::TextKit, HPS::EllipticalArcKit, HPS::EllipseKit, HPS::TrimKit, HPS::NURBSSurfaceKit, HPS::NURBSCurveKit, HPS::SpotlightKit, HPS::InfiniteLineKit, HPS::CuttingSectionKit, HPS::CircularWedgeKit, HPS::CircularArcKit, HPS::CircleKit, HPS::SphereKit, HPS::CylinderKit, HPS::DistantLightKit, HPS::MarkerKit, HPS::LineKit, HPS::AttributeLockKit, HPS::FontInfoState, HPS::WindowInfoKit, HPS::DebuggingKit, HPS::SubwindowKit, HPS::ContourLineKit, HPS::VisualEffectsKit, HPS::TransformMaskKit, HPS::PostProcessEffectsKit, HPS::DrawingAttributeKit, HPS::HiddenLineAttributeKit, HPS::PerformanceKit, HPS::NURBSSurfaceAttributeKit, HPS::MaterialKit, HPS::MaterialMappingKit, HPS::MatrixKit, HPS::CurveAttributeKit, HPS::EdgeAttributeKit, HPS::LineAttributeKit, HPS::TextAttributeKit, HPS::CuttingSectionAttributeKit, HPS::CylinderAttributeKit, HPS::LightingAttributeKit, HPS::SphereAttributeKit, HPS::MarkerAttributeKit, HPS::CullingKit, HPS::ColorInterpolationKit, HPS::TransparencyKit, HPS::SelectabilityKit, HPS::CameraKit, HPS::VisibilityKit, HPS::BoundingKit, HPS::SegmentOptimizationOptionsKit, HPS::Publish::ExportOptionsKit, HPS::Publish::TextFieldKit, HPS::Publish::SignatureFieldKit, HPS::Publish::DropDownListKit, HPS::Exchange::TessellationOptionsKit, HPS::Publish::ListBoxKit, HPS::Exchange::ExportSTEPOptionsKit, HPS::Exchange::ExportParasolidOptionsKit, HPS::Publish::RadioButtonKit, HPS::Exchange::ExportIGESOptionsKit, HPS::Exchange::ExportXMLOptionsKit, HPS::Publish::CheckBoxKit, HPS::Exchange::ExportU3DOptionsKit, HPS::Exchange::ExportSTLOptionsKit, HPS::Publish::ButtonKit, HPS::Exchange::ExportPRCOptionsKit, HPS::Publish::LinkKit, HPS::Exchange::ExportJTOptionsKit, HPS::Publish::SlideTableKit, HPS::Exchange::ExportACISOptionsKit, HPS::Publish::TableKit, HPS::Exchange::Export3MFOptionsKit, HPS::Publish::ImageKit, HPS::Publish::TextKit, HPS::Exchange::ModelFileImportOptionsKit, HPS::Publish::ViewKit, HPS::Exchange::TranslationOptionsKit, HPS::Publish::ArtworkKit, HPS::Publish::AnnotationKit, HPS::ComponentPath, HPS::Exchange::ImportOptionsKit, HPS::Parasolid::ExportOptionsKit, HPS::Exchange::NURBSConversionOptionsKit, HPS::Parasolid::LineTessellationKit, HPS::Exchange::Configuration, HPS::Publish::PageKit, HPS::Parasolid::FacetTessellationKit, HPS::Publish::DocumentKit, HPS::Parasolid::ImportOptionsKit, HPS::DWG::ImportOptionsKit, HPS::OOC::ImportOptionsKit, HPS::Sketchup::ImportOptionsKit, and HPS::Sketchup::ImportResultsKit.
bool HPS::View::Equals | ( | View const & | in_that | ) | const |
HPS::View& HPS::View::FitWorld | ( | ) |
This method automatically adjusts the camera to fit the extents of the scene.
HPS::View& HPS::View::FitWorld | ( | SegmentKey const & | in_segment | ) |
This method automatically adjusts the camera to fit the extents of a segment.
Note that this method does not take into account any transformations found between in_segment and the View segment. If there might be transforms between in_segment and the View segment, you can use the version of FitWorld which does not require a parameter, or the version of FitWorld which takes both a SegmentKey and a MatrixKit.
in_segment | The segment used to calculate the new camera. |
HPS::View& HPS::View::FitWorld | ( | BoundingKit const & | in_bounding | ) |
This method automatically adjusts the camera to fit a bounding.
in_bounding | The bounding used to calculate the new camera. |
HPS::View& HPS::View::FitWorld | ( | SegmentKey const & | in_segment, |
MatrixKit const & | in_transform | ||
) |
This method automatically adjusts the camera to fit the extents of a segment.
In the general case, in_transform should be the product of all the MatrixKits found between the View segment and in_segment.
in_segment | The segment used to calculate the new camera. |
in_transform | An optional transform to apply to the segment bounding used to compute the camera. This can be used to ensure that the camera is looking at the geometry in the correct position once any modelling matrices are applied. |
HPS::View& HPS::View::FitWorld | ( | BoundingKit const & | in_bounding, |
MatrixKit const & | in_transform | ||
) |
This method automatically adjusts the camera to fit a bounding.
in_bounding | The bounding used to calculate the new camera. |
in_transform | An optional transform to apply to the bounding used to compute the camera. This can be used to ensure that the camera is looking at the geometry in the correct position once any modelling matrices are applied. |
IncludeKey HPS::View::GetAttachedModelIncludeLink | ( | ) | const |
Returns the IncludeKey associated with this View.
AxisTriadControl HPS::View::GetAxisTriadControl | ( | ) |
Gets the AxisTriadControl that is associated with this View.
AxisTriadControl const HPS::View::GetAxisTriadControl | ( | ) | const |
|
inherited |
Returns a unique identifier that is shared by all objects of the same class.
|
static |
|
inherited |
Returns an identifier that can be used to identify which instance of a class an object is.
Different keys and controls will return the same value if they are backed by the same database resource.
SegmentKey HPS::View::GetModelOverrideSegmentKey | ( | ) |
Returns the model override segment.
This segment can be used to change attributes affecting the whole model, without affecting the static tree set at the model level.
SegmentKey const HPS::View::GetModelOverrideSegmentKey | ( | ) | const |
NavigationCubeControl HPS::View::GetNavigationCubeControl | ( | ) |
Gets the NavigationCubeControl that is associated with this View.
NavigationCubeControl const HPS::View::GetNavigationCubeControl | ( | ) | const |
KeyArray const HPS::View::GetNavigationKeys | ( | ) |
Gets an array of Keys associated with the Axis Triad and Navigation Cube for this View.
OperatorControl HPS::View::GetOperatorControl | ( | ) |
Gets the OperatorControl that is associated with this View.
OperatorControl const HPS::View::GetOperatorControl | ( | ) | const |
OperatorPtrArray HPS::View::GetOperators | ( | ) | const |
Gets an array of all operators currently active on this View.
LayoutArray HPS::View::GetOwningLayouts | ( | ) |
Returns an array containing the Layouts this View is included in.
LayoutArray const HPS::View::GetOwningLayouts | ( | ) | const |
PortfolioKey const HPS::View::GetPortfolioKey | ( | ) | const |
PortfolioKey HPS::View::GetPortfolioKey | ( | ) |
Returns the HPS::PortfolioKey associated with this View.
Rendering::Mode HPS::View::GetRenderingMode | ( | ) | const |
Gets the rendering mode for this View.
A rendering modes enable things like "hidden line" rendering or a particular lighting interpolation algorithm.
SegmentKey HPS::View::GetSegmentKey | ( | ) |
Each of the four display hierarchy objects (HPS::Canvas, HPS::Layout, HPS::View, HPS::Model) are backed by a HPS::SegmentKey.
This function returns the HPS::SegmentKey that is associated with this View.
SegmentKey const HPS::View::GetSegmentKey | ( | ) | const |
|
static |
bool HPS::View::GetSimpleReflection | ( | ) |
Returns the status of the simple reflection.
bool HPS::View::GetSimpleShadow | ( | ) |
Returns the status of the simple shadows.
|
inherited |
|
inlinevirtual |
bool HPS::View::operator!= | ( | View const & | in_that | ) | const |
bool HPS::View::operator== | ( | View const & | in_that | ) | const |
|
virtualinherited |
Resets this object to its initial, uninitialized state.
Reimplemented in HPS::EventHandler, HPS::EventDispatcher, HPS::World, HPS::HighlightSearchResults, HPS::HighlightSearchResultsIterator, HPS::SelectionResults, HPS::SelectionResultsIterator, HPS::FontSearchResults, HPS::FontSearchResultsIterator, HPS::SearchResults, and HPS::SearchResultsIterator.
void HPS::View::SetOperator | ( | OperatorPtr const & | in_operator | ) |
void HPS::View::SetOperator | ( | Operator * | in_operator | ) |
Makes an operator active on this View.
Assumes control of the memory of the operator.
in_operator | the operator to be made active on this View. |
void HPS::View::SetOperators | ( | OperatorPtrArray & | in_operators | ) |
void HPS::View::SetOperators | ( | size_t | in_count, |
OperatorPtr | in_operators[] | ||
) |
void HPS::View::SetRenderingMode | ( | Rendering::Mode | in_mode | ) |
Sets the rendering mode for this View.
A rendering modes enable things like "hidden line" rendering or a particular lighting interpolation algorithm.
void HPS::View::SetSimpleReflection | ( | bool | in_state, |
float | in_percent_offset = 5.0f |
||
) |
Turns simple reflection on or off, automatically calculating reflection plane and light direction.
in_state | controls whether simple reflection is on or off |
in_percent_offset | distance to add between the model's bounding box and the position of the reflection plane If not specified, it is set to 5%. |
void HPS::View::SetSimpleShadow | ( | bool | in_state, |
float | in_percent_offset = 5.0f |
||
) |
Turns simple shadows on or off, automatically calculating shadow plane and light direction.
in_state | controls whether simple shadows are on or off |
in_percent_offset | distance to add between the model's bounding box and the position of the shadow plane If not specified, it is set to 5%. |
void HPS::View::SmoothTransition | ( | HPS::CameraKit const & | in_camera_kit, |
HPS::Time | in_duration = 0.5 |
||
) |
Smoothly moves the camera from the current position to the one specified by the user.
in_camera_kit | a camera kit describing the destination camera |
in_duration | the duration of the animation, specified in seconds. Defaults to 0.5 seconds. |
|
virtualinherited |
This function returns the true type of the underlying object.
This function is useful for finding the type of smart pointer objects that have been cast to more generic types.
Reimplemented in HPS::UpdateOptionsControl, HPS::HighlightControl, HPS::SelectionOptionsControl, HPS::OffScreenWindowOptionsControl, HPS::ApplicationWindowOptionsControl, HPS::StandAloneWindowOptionsControl, HPS::AttributeLockControl, HPS::WindowInfoControl, HPS::DebuggingControl, HPS::SubwindowControl, HPS::ContourLineControl, HPS::VisualEffectsControl, HPS::TransformMaskControl, HPS::PostProcessEffectsControl, HPS::DrawingAttributeControl, HPS::HiddenLineAttributeControl, HPS::PerformanceControl, HPS::NURBSSurfaceAttributeControl, HPS::ConditionControl, HPS::StyleControl, HPS::PortfolioControl, HPS::MaterialMappingControl, HPS::TextureMatrixControl, HPS::ModellingMatrixControl, HPS::CurveAttributeControl, HPS::EdgeAttributeControl, HPS::LineAttributeControl, HPS::TextAttributeControl, HPS::CuttingSectionAttributeControl, HPS::CylinderAttributeControl, HPS::LightingAttributeControl, HPS::SphereAttributeControl, HPS::MarkerAttributeControl, HPS::CullingControl, HPS::ColorInterpolationControl, HPS::TransparencyControl, HPS::SelectabilityControl, HPS::CameraControl, HPS::VisibilityControl, HPS::BoundingControl, HPS::Kit, and HPS::Control.
void HPS::View::Update | ( | ) | const |
Redraws the View and all Layouts it appears in, including all of its child components.
void HPS::View::Update | ( | HPS::Window::UpdateType | in_type, |
HPS::Time | in_time_limit = -1.0 |
||
) | const |
Redraws the View and all Layouts it appears in, including all of its child components using the specified parameters.
in_type | one of the enum values specified by HPS::Window::UpdateType |
in_time_limit | the maximum amount of time, in seconds, to spend updating. |
UpdateNotifier HPS::View::UpdateWithNotifier | ( | ) | const |
Redraws the View and all Layouts it appears in, including all of its child components using the default options, and also returns a notifier to facilitate tracking the update progress.
UpdateNotifier HPS::View::UpdateWithNotifier | ( | HPS::Window::UpdateType | in_type, |
HPS::Time | in_time_limit = -1.0 |
||
) | const |
Redraws the View and all Layouts it appears in, including all of its child components using the specified, and also returns a notifier to facilitate tracking the update progress.
in_type | one of the enum values specified by HPS::Window::UpdateType |
in_time_limit | the maximum amount of time, in seconds, to spend updating this HPS::Canvas |
|
static |