#include <hps.h>
Public Member Functions | |
CullingControl (SegmentKey &in_seg) | |
Initializes a control tied to the segment in_seg. More... | |
CullingControl (CullingControl const &in_that) | |
Initializes a control tied to the same object as in_that. More... | |
~CullingControl () | |
Releases a reference to the database object this control is tied to. More... | |
CullingControl (CullingControl &&in_that) | |
The move constructor creates a CullingControl by transferring the underlying impl of the rvalue reference to this CullingControl thereby avoiding a copy and allocation. More... | |
CullingControl & | operator= (CullingControl &&in_that) |
The move assignment operator transfers the underlying impl of the rvalue reference to this CullingControl thereby avoiding a copy. More... | |
virtual HPS::Type | Type () const |
This function returns the true type of the underlying object. More... | |
HPS::Type | ObjectType () const |
CullingControl & | operator= (CullingControl const &in_that) |
Share the underlying smart-pointer of the CullingControl source. More... | |
CullingControl & | SetDeferralExtent (bool in_state, unsigned int in_pixels) |
Controls whether geometry that falls below a certain size should be deferred. More... | |
CullingControl & | SetDeferralExtent (unsigned int in_pixels) |
Controls whether geometry that falls below a certain size should be deferred. More... | |
CullingControl & | SetExtent (bool in_state, unsigned int in_pixels) |
Controls whether geometry that falls below a certain size should be culled. More... | |
CullingControl & | SetExtent (unsigned int in_pixels) |
Controls whether geometry that falls below a certain size should be culled. More... | |
CullingControl & | SetBackFace (bool in_state) |
Controls whether faces with normals that point away from the camera should be culled. More... | |
CullingControl & | SetVector (bool in_state, HPS::Vector const &in_vector, float in_tolerance_degrees) |
Controls the state of vector culling. More... | |
CullingControl & | SetVector (HPS::Vector const &in_vector, float in_tolerance_degrees) |
Controls the state of vector culling. More... | |
CullingControl & | SetVector (bool in_state, HPS::Vector const &in_vector=Vector(0.0f, 0.0f, 1.0f)) |
Controls the state of vector culling. More... | |
CullingControl & | SetVector (HPS::Vector const &in_vector) |
Controls the state of vector culling. More... | |
CullingControl & | SetVectorTolerance (float in_tolerance_degrees) |
Adjusts the tolerance value used in vector culling. More... | |
CullingControl & | SetFrustum (bool in_state) |
Controls whether geometry outside the current view frustum should be culled. More... | |
CullingControl & | UnsetDeferralExtent () |
Removes the extent culling setting. More... | |
CullingControl & | UnsetExtent () |
Removes the extent culling setting. More... | |
CullingControl & | UnsetBackFace () |
Removes the back face culling setting. More... | |
CullingControl & | UnsetVector () |
Removes the vector culling setting while leaving the vector tolerance unmodified. More... | |
CullingControl & | UnsetVectorTolerance () |
Removes the vector culling tolerance setting only. More... | |
CullingControl & | UnsetFrustum () |
Removes the frustum culling setting. More... | |
CullingControl & | UnsetEverything () |
Removes all settings from this object. More... | |
bool | ShowDeferralExtent (bool &out_state, unsigned int &out_pixels) const |
Shows whether geometry that falls below a certain size should be deferred. More... | |
bool | ShowExtent (bool &out_state, unsigned int &out_pixels) const |
Shows whether geometry that falls below a certain size should be culled. More... | |
bool | ShowBackFace (bool &out_state) const |
Shows whether faces with normals that point away from the camera should be culled. More... | |
bool | ShowVector (bool &out_state, HPS::Vector &out_vector) const |
Shows the state of vector culling. More... | |
bool | ShowVectorTolerance (float &out_tolerance_degrees) const |
Shows the tolerance value used in vector culling. More... | |
bool | ShowFrustum (bool &out_state) const |
Shows whether geometry outside the current view frustum should be culled. 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 | |
template<typename T > | |
static intptr_t | ClassID () |
Unique identifier for this class. More... | |
Static Public Attributes | |
static const HPS::Type | staticType = HPS::Type::CullingControl |
Private Member Functions | |
CullingControl () | |
Private default constructor to prevent instantiation without a segment. More... | |
The HPS::CullingControl class is a smart pointer that is tied to a database object. Using this object, you are able to control the various options related to culling, such as enabling or disabling back face culling, vector culling, and frustum culling. This table lists default values for the various segment attributes accessible from HPS::CullingControl.
|
explicit |
Initializes a control tied to the segment in_seg.
HPS::CullingControl::CullingControl | ( | CullingControl const & | in_that | ) |
Initializes a control tied to the same object as in_that.
HPS::CullingControl::~CullingControl | ( | ) |
Releases a reference to the database object this control is tied to.
HPS::CullingControl::CullingControl | ( | CullingControl && | in_that | ) |
The move constructor creates a CullingControl by transferring the underlying impl of the rvalue reference to this CullingControl thereby avoiding a copy and allocation.
in_that | An rvalue reference to a CullingControl to take the impl from. |
|
private |
Private default constructor to prevent instantiation without a segment.
|
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.
|
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.
|
inherited |
Returns a unique identifier that is shared by all objects of the same class.
|
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.
|
inherited |
|
inlinevirtual |
Reimplemented from HPS::Control.
CullingControl& HPS::CullingControl::operator= | ( | CullingControl && | in_that | ) |
The move assignment operator transfers the underlying impl of the rvalue reference to this CullingControl thereby avoiding a copy.
in_that | An rvalue reference to a CullingControl to take the impl from. |
CullingControl& HPS::CullingControl::operator= | ( | CullingControl const & | in_that | ) |
Share the underlying smart-pointer of the CullingControl source.
in_that | The CullingControl source of the assignment. |
|
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.
CullingControl& HPS::CullingControl::SetBackFace | ( | bool | in_state | ) |
Controls whether faces with normals that point away from the camera should be culled.
This option can only be effective if a polygon handedness is defined.
in_state | Whether faces with normals that point away from the camera should be culled. |
CullingControl& HPS::CullingControl::SetDeferralExtent | ( | bool | in_state, |
unsigned int | in_pixels | ||
) |
Controls whether geometry that falls below a certain size should be deferred.
This setting only becomes relevant in timed updates (or fixed-framerate) when deferred geometry is given a lower priority. During non-timed updates no geometry is deferred, regardless of this setting.
in_state | Whether deferral culling should be enabled. |
in_pixels | The number of pixels below which geometry should be deferred. |
CullingControl& HPS::CullingControl::SetDeferralExtent | ( | unsigned int | in_pixels | ) |
Controls whether geometry that falls below a certain size should be deferred.
This setting only becomes relevant in timed updates (or fixed-framerate) when deferred geometry is given a lower priority. During non-timed updates no geometry is deferred, regardless of this setting.
in_state | Whether deferral culling should be enabled. |
in_pixels | The number of pixels below which geometry should be deferred. |
CullingControl& HPS::CullingControl::SetExtent | ( | bool | in_state, |
unsigned int | in_pixels | ||
) |
Controls whether geometry that falls below a certain size should be culled.
in_state | Whether extent culling should be enabled. |
in_pixels | The longest dimension of the screen-space projection of the bounding-volume, in pixels. |
CullingControl& HPS::CullingControl::SetExtent | ( | unsigned int | in_pixels | ) |
Controls whether geometry that falls below a certain size should be culled.
This function implicitly enables extent culling.
in_pixels | The longest dimension of the screen-space projection of the bounding-volume, in pixels. |
CullingControl& HPS::CullingControl::SetFrustum | ( | bool | in_state | ) |
Controls whether geometry outside the current view frustum should be culled.
in_state | Whether geometry outside the current view frustum should be culled. |
CullingControl& HPS::CullingControl::SetVector | ( | bool | in_state, |
HPS::Vector const & | in_vector, | ||
float | in_tolerance_degrees | ||
) |
Controls the state of vector culling.
If the angle between the specified vector and the current view vector is less than the angle defined, then a segment with vector culling enabled will not be drawn.
in_state | Whether to use vector culling. |
in_vector | The reference vector to compare the view vector to. |
in_tolerance_degrees | The upper limit, in degrees, between the reference vector and the view vector. |
CullingControl& HPS::CullingControl::SetVector | ( | HPS::Vector const & | in_vector, |
float | in_tolerance_degrees | ||
) |
Controls the state of vector culling.
If the angle between the specified vector and the current view vector is less than the angle defined, then a segment with vector culling enabled will not be drawn. This function implicitly enables extent culling.
in_vector | The reference vector to compare the view vector to. |
in_tolerance_degrees | The upper limit, in degrees, between the reference vector and the view vector. |
CullingControl& HPS::CullingControl::SetVector | ( | bool | in_state, |
HPS::Vector const & | in_vector = Vector(0.0f, 0.0f, 1.0f) |
||
) |
Controls the state of vector culling.
If the angle between the specified vector and the current view vector is less than the angle defined, then a segment with vector culling enabled will not be drawn. This function does not modify the vector tolerance.
in_state | Whether to use vector culling. |
in_vector | The reference vector to compare the view vector to. |
CullingControl& HPS::CullingControl::SetVector | ( | HPS::Vector const & | in_vector | ) |
Controls the state of vector culling.
If the angle between the specified vector and the current view vector is less than the angle defined, then a segment with vector culling enabled will not be drawn. This function implicitly enables extent culling and does not modify the vector tolerance.
in_vector | The reference vector to compare the view vector to. |
CullingControl& HPS::CullingControl::SetVectorTolerance | ( | float | in_tolerance_degrees | ) |
Adjusts the tolerance value used in vector culling.
This setting will have no effect is vector culling is not enabled.
in_tolerance_degrees | The upper limit, in degrees, between the reference vector and the view vector. |
bool HPS::CullingControl::ShowBackFace | ( | bool & | out_state | ) | const |
Shows whether faces with normals that point away from the camera should be culled.
out_state | Whether faces with normals that point away from the camera should be culled. |
bool HPS::CullingControl::ShowDeferralExtent | ( | bool & | out_state, |
unsigned int & | out_pixels | ||
) | const |
Shows whether geometry that falls below a certain size should be deferred.
out_state | Whether deferral culling should be enabled. |
out_pixels | The number of pixels below which geometry should be deferred. |
bool HPS::CullingControl::ShowExtent | ( | bool & | out_state, |
unsigned int & | out_pixels | ||
) | const |
Shows whether geometry that falls below a certain size should be culled.
out_state | Whether extent culling should be enabled. |
out_pixels | The longest dimension of the screen-space projection of the bounding-volume, in pixels. |
bool HPS::CullingControl::ShowFrustum | ( | bool & | out_state | ) | const |
Shows whether geometry outside the current view frustum should be culled.
out_state | Whether geometry outside the current view frustum should be culled. |
bool HPS::CullingControl::ShowVector | ( | bool & | out_state, |
HPS::Vector & | out_vector | ||
) | const |
Shows the state of vector culling.
If the angle between the specified vector and the current view vector is less than the angle defined, then a segment with vector culling enabled will not be drawn.
out_state | Whether to use vector culling. |
out_vector | The reference vector to compare the view vector to. |
bool HPS::CullingControl::ShowVectorTolerance | ( | float & | out_tolerance_degrees | ) | const |
Shows the tolerance value used in vector culling.
This setting will have no effect is vector culling is not enabled.
out_tolerance_degrees | The upper limit, in degrees, between the reference vector and the view vector. |
|
inlinevirtual |
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 from HPS::Control.
CullingControl& HPS::CullingControl::UnsetBackFace | ( | ) |
Removes the back face culling setting.
If the control is attached to a WindowKey this function restores the default value of this setting as specified by CullingKit::GetDefault().
CullingControl& HPS::CullingControl::UnsetDeferralExtent | ( | ) |
Removes the extent culling setting.
If the control is attached to a WindowKey this function restores the default value of this setting as specified by CullingKit::GetDefault().
CullingControl& HPS::CullingControl::UnsetEverything | ( | ) |
Removes all settings from this object.
If the control is attached to a WindowKey this function restores the default settings of this control as specified by CullingKit::GetDefault().
CullingControl& HPS::CullingControl::UnsetExtent | ( | ) |
Removes the extent culling setting.
If the control is attached to a WindowKey this function restores the default value of this setting as specified by CullingKit::GetDefault().
CullingControl& HPS::CullingControl::UnsetFrustum | ( | ) |
Removes the frustum culling setting.
If the control is attached to a WindowKey this function restores the default value of this setting as specified by CullingKit::GetDefault().
CullingControl& HPS::CullingControl::UnsetVector | ( | ) |
Removes the vector culling setting while leaving the vector tolerance unmodified.
If the control is attached to a WindowKey this function restores the default value of this setting as specified by CullingKit::GetDefault().
CullingControl& HPS::CullingControl::UnsetVectorTolerance | ( | ) |
Removes the vector culling tolerance setting only.
If the control is attached to a WindowKey this function restores the default value of this setting as specified by CullingKit::GetDefault().
|
static |