REFERENCE MANUAL
#include <sprk.h>
Public Member Functions | |
void | Assign (View const &in_that) |
void | AttachModel (Model const &in_model) |
View & | ComputeFitWorldCamera (CameraKit &out_camera) |
View & | ComputeFitWorldCamera (SegmentKey const &in_segment, CameraKit &out_camera) |
View & | ComputeFitWorldCamera (BoundingKit const &in_bounding, CameraKit &out_camera) |
View & | ComputeFitWorldCamera (SegmentKey const &in_segment, MatrixKit const &in_transform, CameraKit &out_camera) |
View & | ComputeFitWorldCamera (BoundingKit const &in_bounding, MatrixKit const &in_transform, CameraKit &out_camera) |
void | Delete () |
void | DetachModel () |
bool | Equals (View const &in_that) const |
View & | FitWorld () |
View & | FitWorld (SegmentKey const &in_segment) |
View & | FitWorld (BoundingKit const &in_bounding) |
View & | FitWorld (SegmentKey const &in_segment, MatrixKit const &in_transform) |
View & | FitWorld (BoundingKit const &in_bounding, MatrixKit const &in_transform) |
Model | GetAttachedModel () const |
IncludeKey | GetAttachedModelIncludeLink () const |
AxisTriadControl | GetAxisTriadControl () |
AxisTriadControl const | GetAxisTriadControl () const |
SegmentKey | GetModelOverrideSegmentKey () |
SegmentKey const | GetModelOverrideSegmentKey () const |
UTF8 | GetName () const |
NavigationCubeControl | GetNavigationCubeControl () |
NavigationCubeControl const | GetNavigationCubeControl () const |
KeyArray const | GetNavigationKeys () |
OperatorControl | GetOperatorControl () |
OperatorControl const | GetOperatorControl () const |
OperatorPtrArray | GetOperators () const |
LayoutArray | GetOwningLayouts () |
LayoutArray const | GetOwningLayouts () const |
PortfolioKey const | GetPortfolioKey () const |
PortfolioKey | GetPortfolioKey () |
Rendering::Mode | GetRenderingMode () const |
SegmentKey | GetSegmentKey () |
SegmentKey const | GetSegmentKey () const |
bool | GetSimpleReflection () |
bool | GetSimpleShadow () |
Type | ObjectType () const |
bool | operator!= (View const &in_that) const |
View & | operator= (View const &in_that) |
bool | operator== (View const &in_that) const |
void | SetOperator (OperatorPtr const &in_operator) |
void | SetOperator (Operator *in_operator) |
void | SetOperators (OperatorPtrArray &in_operators) |
void | SetOperators (size_t in_count, OperatorPtr in_operators[]) |
void | SetRenderingMode (Rendering::Mode in_mode) |
void | SetSimpleReflection (bool in_state, float in_percent_offset=5.0f) |
void | SetSimpleShadow (bool in_state, float in_percent_offset=5.0f) |
void | SmoothTransition (CameraKit const &in_camera_kit, Time in_duration=0.5) |
void | Update (Sprocket::UpdateType in_update_type=Sprocket::UpdateType::Asynchronous) const |
void | Update (Window::UpdateControl const in_control, Time const time_limit=-1.) const |
View (View const &that) | |
View (SprocketControl const &in_ctrl) | |
![]() | |
Sprocket (Sprocket &&in_that) | |
![]() | |
virtual bool | Empty () const |
intptr_t | GetClassID () const |
intptr_t | GetInstanceID () const |
bool | HasType (Type in_mask) const |
Object (Object &&in_that) | |
Object & | operator= (Object const &other_object) |
Object & | operator= (Object &&in_that) |
virtual void | Reset () |
Type | Type () const |
Static Public Member Functions | |
static UTF8 | GetHideStyleName () |
static UTF8 | GetShowStyleName () |
![]() | |
template<typename T > | |
static intptr_t | ClassID () |
Additional Inherited Members | |
![]() | |
enum | UpdateType { Synchronous, Asynchronous } |
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 SegmentKey.
void View::AttachModel | ( | Model const & | in_model | ) |
This method computes a camera to fit the extents of the scene.
View& View::ComputeFitWorldCamera | ( | SegmentKey const & | in_segment, |
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. |
View& View::ComputeFitWorldCamera | ( | BoundingKit const & | in_bounding, |
CameraKit & | out_camera | ||
) |
This method computes a camera to fit a bounding.
in_bounding | The bounding used to calculate the new camera. |
View& View::ComputeFitWorldCamera | ( | SegmentKey const & | in_segment, |
MatrixKit const & | in_transform, | ||
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. |
View& View::ComputeFitWorldCamera | ( | BoundingKit const & | in_bounding, |
MatrixKit const & | in_transform, | ||
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. |
void View::Delete | ( | ) |
View& View::FitWorld | ( | ) |
This method automatically adjusts the camera to fit the extents of the scene.
View& View::FitWorld | ( | SegmentKey const & | in_segment | ) |
This method automatically adjusts the camera to fit the extents of a segment.
in_segment | The segment used to calculate the new camera. |
View& 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. |
View& View::FitWorld | ( | SegmentKey const & | in_segment, |
MatrixKit const & | in_transform | ||
) |
This method automatically adjusts the 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. |
View& 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 View::GetAttachedModelIncludeLink | ( | ) | const |
Returns the IncludeKey associated with this View. The include key links the View with the Model.
AxisTriadControl View::GetAxisTriadControl | ( | ) |
Gets the AxisTriadControl that is associated with this View.
SegmentKey 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.
NavigationCubeControl View::GetNavigationCubeControl | ( | ) |
Gets the NavigationCubeControl that is associated with this View.
KeyArray const View::GetNavigationKeys | ( | ) |
Gets an array of Keys associated with the Axis Triad and Navigation Cube for this View
OperatorControl View::GetOperatorControl | ( | ) |
Gets the OperatorControl that is associated with this View.
OperatorPtrArray View::GetOperators | ( | ) | const |
Gets an array of all operators currently active on this View.
LayoutArray View::GetOwningLayouts | ( | ) |
Returns an array containing the Layouts this View is included in.
PortfolioKey View::GetPortfolioKey | ( | ) |
Returns the PortfolioKey associated with this View.
Rendering::Mode 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 View::GetSegmentKey | ( | ) |
Each of the four display hierarchy objects (Canvas, Layout, View, Model) are backed by a SegmentKey. This function returns the SegmentKey that is associated with this View.
|
inlinevirtual |
This function returns the type the object, as declared. This does not necessarily give the true type of the underlying object.
Reimplemented from Object.
void View::SetOperator | ( | OperatorPtr const & | in_operator | ) |
void View::SetOperator | ( | Operator * | in_operator | ) |
void View::SetOperators | ( | OperatorPtrArray & | in_operators | ) |
void View::SetOperators | ( | size_t | in_count, |
OperatorPtr | in_operators[] | ||
) |
void 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 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 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 View::Update | ( | Sprocket::UpdateType | in_update_type = Sprocket::UpdateType::Asynchronous | ) | const |
void View::Update | ( | Window::UpdateControl const | in_control, |
Time const | time_limit = -1. |
||
) | const |
Redraws the Model in this View using parameters that you specify.
in_control | one of the enum values specified by Window::UpdateControl |
time_limit | the maximum amount of time, in seconds, to spend updating this View |