Hoops Visualize HPS  version 2018-SP2
Hoops Visualize HPS 3D Rendering Engine
Looking for a senior C++ dev?
I'm looking for work. Hire me!
HPS::CullingControl Class Reference

#include <hps.h>

Inheritance diagram for HPS::CullingControl:
Collaboration diagram for HPS::CullingControl:

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...
 
CullingControloperator= (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
 
CullingControloperator= (CullingControl const &in_that)
 Share the underlying smart-pointer of the CullingControl source. More...
 
CullingControlSetDeferralExtent (bool in_state, unsigned int in_pixels)
 Controls whether geometry that falls below a certain size should be deferred. More...
 
CullingControlSetDeferralExtent (unsigned int in_pixels)
 Controls whether geometry that falls below a certain size should be deferred. More...
 
CullingControlSetExtent (bool in_state, unsigned int in_pixels)
 Controls whether geometry that falls below a certain size should be culled. More...
 
CullingControlSetExtent (unsigned int in_pixels)
 Controls whether geometry that falls below a certain size should be culled. More...
 
CullingControlSetBackFace (bool in_state)
 Controls whether faces with normals that point away from the camera should be culled. More...
 
CullingControlSetVector (bool in_state, HPS::Vector const &in_vector, float in_tolerance_degrees)
 Controls the state of vector culling. More...
 
CullingControlSetVector (HPS::Vector const &in_vector, float in_tolerance_degrees)
 Controls the state of vector culling. More...
 
CullingControlSetVector (bool in_state, HPS::Vector const &in_vector=Vector(0.0f, 0.0f, 1.0f))
 Controls the state of vector culling. More...
 
CullingControlSetVector (HPS::Vector const &in_vector)
 Controls the state of vector culling. More...
 
CullingControlSetVectorTolerance (float in_tolerance_degrees)
 Adjusts the tolerance value used in vector culling. More...
 
CullingControlSetFrustum (bool in_state)
 Controls whether geometry outside the current view frustum should be culled. More...
 
CullingControlUnsetDeferralExtent ()
 Removes the extent culling setting. More...
 
CullingControlUnsetExtent ()
 Removes the extent culling setting. More...
 
CullingControlUnsetBackFace ()
 Removes the back face culling setting. More...
 
CullingControlUnsetVector ()
 Removes the vector culling setting while leaving the vector tolerance unmodified. More...
 
CullingControlUnsetVectorTolerance ()
 Removes the vector culling tolerance setting only. More...
 
CullingControlUnsetFrustum ()
 Removes the frustum culling setting. More...
 
CullingControlUnsetEverything ()
 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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ CullingControl() [1/4]

HPS::CullingControl::CullingControl ( SegmentKey in_seg)
explicit

Initializes a control tied to the segment in_seg.

◆ CullingControl() [2/4]

HPS::CullingControl::CullingControl ( CullingControl const &  in_that)

Initializes a control tied to the same object as in_that.

◆ ~CullingControl()

HPS::CullingControl::~CullingControl ( )

Releases a reference to the database object this control is tied to.

◆ CullingControl() [3/4]

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.

Parameters
in_thatAn rvalue reference to a CullingControl to take the impl from.

◆ CullingControl() [4/4]

HPS::CullingControl::CullingControl ( )
private

Private default constructor to prevent instantiation without a segment.

Member Function Documentation

◆ ClassID()

template<typename T >
static intptr_t HPS::Object::ClassID ( )
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.

◆ Empty()

virtual bool HPS::Object::Empty ( ) const
inlinevirtualinherited

Indicates whether this object has any values set on it.

Returns
true if no values are set on this object, false otherwise.

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.

◆ GetClassID()

intptr_t HPS::Object::GetClassID ( ) const
inherited

Returns a unique identifier that is shared by all objects of the same class.

Returns
A unique value shared by all objects of the same class.

◆ GetInstanceID()

intptr_t HPS::Object::GetInstanceID ( ) const
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.

Returns
A value unique to an instance of an object and all objects that are backed by the same database resource.

◆ HasType()

bool HPS::Object::HasType ( HPS::Type  in_mask) const
inherited

This function indicates whether this Object has the given Type mask.

Parameters
in_maskThe Type mask to check against this Object.
Returns
true if this Object has the given Type mask, false otherwise.

◆ ObjectType()

HPS::Type HPS::CullingControl::ObjectType ( ) const
inlinevirtual

Reimplemented from HPS::Control.

◆ operator=() [1/2]

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.

Parameters
in_thatAn rvalue reference to a CullingControl to take the impl from.
Returns
A reference to this CullingControl.

◆ operator=() [2/2]

CullingControl& HPS::CullingControl::operator= ( CullingControl const &  in_that)

Share the underlying smart-pointer of the CullingControl source.

Parameters
in_thatThe CullingControl source of the assignment.
Returns
A reference to this CullingControl.

◆ Reset()

◆ SetBackFace()

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.

Parameters
in_stateWhether faces with normals that point away from the camera should be culled.
Returns
A reference to this object.

◆ SetDeferralExtent() [1/2]

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.

Parameters
in_stateWhether deferral culling should be enabled.
in_pixelsThe number of pixels below which geometry should be deferred.
Returns
A reference to this object.

◆ SetDeferralExtent() [2/2]

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.

Parameters
in_stateWhether deferral culling should be enabled.
in_pixelsThe number of pixels below which geometry should be deferred.
Returns
A reference to this object.

◆ SetExtent() [1/2]

CullingControl& HPS::CullingControl::SetExtent ( bool  in_state,
unsigned int  in_pixels 
)

Controls whether geometry that falls below a certain size should be culled.

Parameters
in_stateWhether extent culling should be enabled.
in_pixelsThe longest dimension of the screen-space projection of the bounding-volume, in pixels.
Returns
A reference to this object.

◆ SetExtent() [2/2]

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.

Parameters
in_pixelsThe longest dimension of the screen-space projection of the bounding-volume, in pixels.
Returns
A reference to this object.

◆ SetFrustum()

CullingControl& HPS::CullingControl::SetFrustum ( bool  in_state)

Controls whether geometry outside the current view frustum should be culled.

Parameters
in_stateWhether geometry outside the current view frustum should be culled.
Returns
A reference to this object.

◆ SetVector() [1/4]

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.

Parameters
in_stateWhether to use vector culling.
in_vectorThe reference vector to compare the view vector to.
in_tolerance_degreesThe upper limit, in degrees, between the reference vector and the view vector.
Returns
A reference to this object.

◆ SetVector() [2/4]

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.

Parameters
in_vectorThe reference vector to compare the view vector to.
in_tolerance_degreesThe upper limit, in degrees, between the reference vector and the view vector.
Returns
A reference to this object.

◆ SetVector() [3/4]

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.

Parameters
in_stateWhether to use vector culling.
in_vectorThe reference vector to compare the view vector to.
Returns
A reference to this object.

◆ SetVector() [4/4]

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.

Parameters
in_vectorThe reference vector to compare the view vector to.
Returns
A reference to this object.

◆ SetVectorTolerance()

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.

Parameters
in_tolerance_degreesThe upper limit, in degrees, between the reference vector and the view vector.
Returns
A reference to this object.

◆ ShowBackFace()

bool HPS::CullingControl::ShowBackFace ( bool &  out_state) const

Shows whether faces with normals that point away from the camera should be culled.

Parameters
out_stateWhether faces with normals that point away from the camera should be culled.
Returns
true if the setting is valid, false otherwise.

◆ ShowDeferralExtent()

bool HPS::CullingControl::ShowDeferralExtent ( bool &  out_state,
unsigned int &  out_pixels 
) const

Shows whether geometry that falls below a certain size should be deferred.

Parameters
out_stateWhether deferral culling should be enabled.
out_pixelsThe number of pixels below which geometry should be deferred.
Returns
true if the setting is valid, false otherwise.

◆ ShowExtent()

bool HPS::CullingControl::ShowExtent ( bool &  out_state,
unsigned int &  out_pixels 
) const

Shows whether geometry that falls below a certain size should be culled.

Parameters
out_stateWhether extent culling should be enabled.
out_pixelsThe longest dimension of the screen-space projection of the bounding-volume, in pixels.
Returns
true if the setting is valid, false otherwise.

◆ ShowFrustum()

bool HPS::CullingControl::ShowFrustum ( bool &  out_state) const

Shows whether geometry outside the current view frustum should be culled.

Parameters
out_stateWhether geometry outside the current view frustum should be culled.
Returns
true if the setting is valid, false otherwise.

◆ ShowVector()

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.

Parameters
out_stateWhether to use vector culling.
out_vectorThe reference vector to compare the view vector to.
Returns
true if the setting is valid, false otherwise.

◆ ShowVectorTolerance()

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.

Parameters
out_tolerance_degreesThe upper limit, in degrees, between the reference vector and the view vector.
Returns
true if the setting is valid, false otherwise.

◆ Type()

virtual HPS::Type HPS::CullingControl::Type ( ) const
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.

Returns
The true type of the object in question.

Reimplemented from HPS::Control.

◆ UnsetBackFace()

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().

Returns
A reference to this object.

◆ UnsetDeferralExtent()

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().

Returns
A reference to this object.

◆ UnsetEverything()

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().

Returns
A reference to this object.

◆ UnsetExtent()

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().

Returns
A reference to this object.

◆ UnsetFrustum()

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().

Returns
A reference to this object.

◆ UnsetVector()

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().

Returns
A reference to this object.

◆ UnsetVectorTolerance()

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().

Returns
A reference to this object.

Member Data Documentation

◆ staticType

const HPS::Type HPS::CullingControl::staticType = HPS::Type::CullingControl
static

The documentation for this class was generated from the following file: