View
- class HPS.View : public HPS.Sprocket
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.
Public Functions
- void AttachModel (HPS.Model in_model)
Attaches a Model to this View. Only a single Model can be attached to a View at one time. If you attach a Model to a View which already has an attached Model, the new Model will replace the old one.
- HPS.View ComputeFitWorldCamera (HPS.BoundingKit in_bounding, HPS.MatrixKit in_transform, out HPS.CameraKit out_camera)
This method computes a camera to fit a bounding.
- Param in_bounding
The bounding used to calculate the new camera.
- Param 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.
- Param out_camera
The camera computed by the fit world routine.
- HPS.View ComputeFitWorldCamera (HPS.BoundingKit in_bounding, out HPS.CameraKit out_camera)
This method computes a camera to fit a bounding.
- Param in_bounding
The bounding used to calculate the new camera.
- Param out_camera
The camera computed by the fit world routine.
- HPS.View ComputeFitWorldCamera (HPS.SegmentKey in_segment, HPS.MatrixKit in_transform, out HPS.CameraKit out_camera)
This method computes a camera to fit the extents of a segment.
- Param in_segment
The segment used to calculate the new camera.
- Param 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.
- Param out_camera
The camera computed by the fit world routine.
- HPS.View ComputeFitWorldCamera (HPS.SegmentKey in_segment, out HPS.CameraKit out_camera)
This method computes a camera to fit the extents of a segment.
- Param in_segment
The segment used to calculate the new camera.
- Param out_camera
The camera computed by the fit world routine.
- HPS.View ComputeFitWorldCamera (out HPS.CameraKit out_camera)
This method computes a camera to fit the extents of the scene.
- Param out_camera
The camera computed by the fit world routine.
- void Delete ()
Deletes this View. If the View has a Model attached, the Model will not be destroyed.
- override void Dispose ()
- override bool Equals (Object obj)
- HPS.View FitWorld (HPS.BoundingKit in_bounding)
This method automatically adjusts the camera to fit a bounding.
- Param in_bounding
The bounding used to calculate the new camera.
- HPS.View FitWorld (HPS.BoundingKit in_bounding, HPS.MatrixKit in_transform)
This method automatically adjusts the camera to fit a bounding.
- Param in_bounding
The bounding used to calculate the new camera.
- Param 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.
- HPS.View FitWorld (HPS.SegmentKey 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.
- Param in_segment
The segment used to calculate the new camera.
- HPS.View FitWorld (HPS.SegmentKey in_segment, HPS.MatrixKit 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.
- Param in_segment
The segment used to calculate the new camera.
- Param 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.AnimationControl GetAnimationControl ()
Gets the AnimationControl that is associated with this View.
- HPS.IncludeKey GetAttachedModelIncludeLink ()
Returns the IncludeKey associated with this View. The include key links the View with the Model.
- HPS.AxisTriadControl GetAxisTriadControl ()
Gets the AxisTriadControl that is associated with this View.
- override int GetHashCode ()
- HPS.SegmentKey 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.
Gets the NavigationCubeControl that is associated with this View.
Gets an array of Keys associated with the Axis Triad and Navigation Cube for this View
- HPS.OperatorControl GetOperatorControl ()
Gets the OperatorControl that is associated with this View.
- HPS.Layout[] GetOwningLayouts ()
Returns an array containing the Layouts this View is included in.
- HPS.PortfolioKey GetPortfolioKey ()
Returns the HPS.PortfolioKey associated with this View.
- HPS.Rendering.Mode GetRenderingMode ()
Gets the rendering mode for this View. A rendering modes enable things like “hidden line” rendering or a particular lighting interpolation algorithm.
- HPS.SegmentKey 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.
- bool GetSimpleReflection ()
Returns the status of the simple reflection
- bool GetSimpleShadow ()
Returns the status of the simple shadows
- override HPS.Type ObjectType ()
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).
- Return
The declared type of the object in question, which may differ from the true, underlying type.
- void SetOperator (HPS.Operator in_operator)
Makes an operator active on this View. Assumes control of the memory of the operator.
- Param in_operator
the operator to be made active on this View.
- void SetOperators (HPS.Operator[] in_operators)
Makes a set of operators active on this View.
- Param in_operators
the set of operators to be made active on this View
- void SetRenderingMode (HPS.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.
- See
Programming Guide section 3.1.
- void SetSimpleReflection (bool in_state)
Turns simple reflection on or off, automatically calculating reflection plane and light direction
- Param in_state
controls whether simple reflection is on or off
- void SetSimpleReflection (bool in_state, float in_percent_offset)
Turns simple reflection on or off, automatically calculating reflection plane and light direction
- Param in_state
controls whether simple reflection is on or off
- Param 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 SetSimpleShadow (bool in_state)
Turns simple shadows on or off, automatically calculating shadow plane and light direction
- Param in_state
controls whether simple shadows are on or off
- void SetSimpleShadow (bool in_state, float in_percent_offset)
Turns simple shadows on or off, automatically calculating shadow plane and light direction
- Param in_state
controls whether simple shadows are on or off
- Param 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 SmoothTransition (HPS.CameraKit in_camera_kit)
Smoothly moves the camera from the current position to the one specified by the user.
- Param in_camera_kit
a camera kit describing the destination camera
- void SmoothTransition (HPS.CameraKit in_camera_kit, double in_duration)
Smoothly moves the camera from the current position to the one specified by the user.
- Param in_camera_kit
a camera kit describing the destination camera
- Param in_duration
the duration of the animation, specified in seconds. Defaults to 0.5 seconds.
- void Update ()
Redraws the View and all Layouts it appears in, including all of its child components.
- void Update (HPS.Window.UpdateType in_type)
Redraws the View and all Layouts it appears in, including all of its child components using the specified parameters.
- Param in_type
one of the enum values specified by HPS.Window.UpdateType
- void Update (HPS.Window.UpdateType in_type, double in_time_limit)
Redraws the View and all Layouts it appears in, including all of its child components using the specified parameters.
- Param in_type
one of the enum values specified by HPS.Window.UpdateType
- Param in_time_limit
the maximum amount of time, in seconds, to spend updating.
- HPS.UpdateNotifier UpdateWithNotifier ()
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.
- Return
An UpdateNotifier object used to find out information about the update.
- HPS.UpdateNotifier UpdateWithNotifier (HPS.Window.UpdateType in_type)
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.
- Param in_type
one of the enum values specified by HPS.Window.UpdateType
- Return
An UpdateNotifier object used to find out information about the update.
- HPS.UpdateNotifier UpdateWithNotifier (HPS.Window.UpdateType in_type, double in_time_limit)
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.
- Param in_type
one of the enum values specified by HPS.Window.UpdateType
- Param in_time_limit
the maximum amount of time, in seconds, to spend updating this HPS.Canvas
- Return
An UpdateNotifier object used to find out information about the update.
- View ()
- View (HPS.SprocketControl in_ctrl)
- View (HPS.View that)