The HPS::CullingKit class is a user space object, useful for carrying a group attribute settings. More...
#include <hps.h>
Public Member Functions | |
CullingKit () | |
Initializes an empty kit. More... | |
CullingKit (CullingKit const &in_kit) | |
The copy constructor creates a new CullingKit object that contains the same settings as the source object. More... | |
CullingKit (CullingKit &&in_that) | |
The move constructor creates a CullingKit by transferring the underlying impl of the rvalue reference to this CullingKit thereby avoiding a copy and allocation. More... | |
CullingKit & | operator= (CullingKit &&in_that) |
The move assignment operator transfers the underlying impl of the rvalue reference to this CullingKit thereby avoiding a copy. More... | |
virtual | ~CullingKit () |
Destroy this kit. More... | |
HPS::Type | ObjectType () const |
void | Set (CullingKit const &in_kit) |
Copies all settings from the source CullingKit into this object. More... | |
void | Show (CullingKit &out_kit) const |
Copies all settings from this CullingKit into the given CullingKit. More... | |
CullingKit & | operator= (CullingKit const &in_kit) |
Copies the source CullingKit into this object. More... | |
bool | Empty () const |
Indicates whether this object has any values set on it. More... | |
bool | Equals (CullingKit const &in_kit) const |
Check if the source CullingKit is equivalent to this object. More... | |
bool | operator== (CullingKit const &in_kit) const |
Check if the source CullingKit is equivalent to this object. More... | |
bool | operator!= (CullingKit const &in_kit) const |
Check if the source CullingKit is not equivalent to this object. More... | |
CullingKit & | SetDeferralExtent (bool in_state, unsigned int in_pixels) |
Controls whether geometry that falls below a certain size in pixels should be culled with deferral. More... | |
CullingKit & | SetDeferralExtent (unsigned int in_pixels) |
Controls whether geometry that falls below a certain size in pixels should be culled with deferral. More... | |
CullingKit & | SetExtent (bool in_state, unsigned int in_pixels) |
Controls whether geometry that falls below a certain size in pixels should be culled. More... | |
CullingKit & | SetExtent (unsigned int in_pixels) |
Controls whether geometry that falls below a certain size in pixels should be culled. More... | |
CullingKit & | SetBackFace (bool in_state) |
Controls whether faces with normals that point away from the camera should be culled. More... | |
CullingKit & | SetVector (bool in_state, HPS::Vector const &in_vector, float in_tolerance_degrees) |
Controls the state of vector culling. More... | |
CullingKit & | SetVector (HPS::Vector const &in_vector, float in_tolerance_degrees) |
Controls the state of vector culling. More... | |
CullingKit & | SetVector (bool in_state, HPS::Vector const &in_vector=Vector(0.0f, 0.0f, 1.0f)) |
Controls the state of vector culling. More... | |
CullingKit & | SetVector (HPS::Vector const &in_vector) |
Controls the state of vector culling. More... | |
CullingKit & | SetVectorTolerance (float in_tolerance_degrees) |
Adjusts the tolerance value used in vector culling. More... | |
CullingKit & | SetFrustum (bool in_state) |
Controls whether geometry outside the current view frustum should be culled. More... | |
CullingKit & | UnsetDeferralExtent () |
Removes the extent culling setting. More... | |
CullingKit & | UnsetExtent () |
Removes the extent culling setting. More... | |
CullingKit & | UnsetBackFace () |
Removes the back face culling setting. More... | |
CullingKit & | UnsetVector () |
Removes the vector culling setting while leaving the vector tolerance unmodified. More... | |
CullingKit & | UnsetVectorTolerance () |
Removes the vector culling tolerance setting only. More... | |
CullingKit & | UnsetFrustum () |
Removes the frustum culling setting. More... | |
CullingKit & | 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 culled with deferral. 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 HPS::Type | Type () const |
This function returns the true type of the underlying object. 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 CullingKit | GetDefault () |
Creates a CullingKit which contains the default settings. More... | |
template<typename T > | |
static intptr_t | ClassID () |
Unique identifier for this class. More... | |
Static Public Attributes | |
static const HPS::Type | staticType = HPS::Type::CullingKit |
The HPS::CullingKit class is a user space object, useful for carrying a group attribute settings.
Calling HPS::CullingKit::GetDefault() will return a kit with values found in this table.
HPS::CullingKit::CullingKit | ( | ) |
Initializes an empty kit.
HPS::CullingKit::CullingKit | ( | CullingKit const & | in_kit | ) |
The copy constructor creates a new CullingKit object that contains the same settings as the source object.
in_kit | The source object to copy. |
HPS::CullingKit::CullingKit | ( | CullingKit && | in_that | ) |
The move constructor creates a CullingKit by transferring the underlying impl of the rvalue reference to this CullingKit thereby avoiding a copy and allocation.
in_that | An rvalue reference to a CullingKit to take the impl from. |
|
virtual |
Destroy this kit.
|
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.
|
virtual |
Indicates whether this object has any values set on it.
Reimplemented from HPS::Object.
bool HPS::CullingKit::Equals | ( | CullingKit const & | in_kit | ) | const |
Check if the source CullingKit is equivalent to this object.
in_kit | The source CullingKit to compare to this object. |
|
inherited |
Returns a unique identifier that is shared by all objects of the same class.
|
static |
Creates a CullingKit which contains the default settings.
The returned object will not necessarily have values set for every option, but it will have settings for those options where it is reasonable to have a default.
|
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 |
bool HPS::CullingKit::operator!= | ( | CullingKit const & | in_kit | ) | const |
Check if the source CullingKit is not equivalent to this object.
in_kit | The source CullingKit to compare to this object. |
CullingKit& HPS::CullingKit::operator= | ( | CullingKit && | in_that | ) |
The move assignment operator transfers the underlying impl of the rvalue reference to this CullingKit thereby avoiding a copy.
in_that | An rvalue reference to a CullingKit to take the impl from. |
CullingKit& HPS::CullingKit::operator= | ( | CullingKit const & | in_kit | ) |
Copies the source CullingKit into this object.
in_kit | The source CullingKit to copy. |
bool HPS::CullingKit::operator== | ( | CullingKit const & | in_kit | ) | const |
Check if the source CullingKit is equivalent to this object.
in_kit | The source CullingKit to compare to this object. |
|
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::CullingKit::Set | ( | CullingKit const & | in_kit | ) |
Copies all settings from the source CullingKit into this object.
in_kit | The source CullingKit to copy. |
CullingKit& HPS::CullingKit::SetBackFace | ( | bool | in_state | ) |
Controls whether faces with normals that point away from the camera should be culled.
in_state | Whether faces with normals that point away from the camera should be culled. |
CullingKit& HPS::CullingKit::SetDeferralExtent | ( | bool | in_state, |
unsigned int | in_pixels | ||
) |
Controls whether geometry that falls below a certain size in pixels should be culled with deferral.
Deferral culling means the object is given a low-priority draw order, effectively delaying draw time until the end of the frame.
in_state | Whether deferral culling should be enabled. |
in_pixels | The number of pixels below which geometry should be culled with deferral. |
CullingKit& HPS::CullingKit::SetDeferralExtent | ( | unsigned int | in_pixels | ) |
Controls whether geometry that falls below a certain size in pixels should be culled with deferral.
Deferral culling means the object is given a low-priority draw order, effectively delaying draw time until the end of the frame. This function implicitly enables deferral extent culling.
in_pixels | The number of pixels below which geometry should be culled with deferral. |
CullingKit& HPS::CullingKit::SetExtent | ( | bool | in_state, |
unsigned int | in_pixels | ||
) |
Controls whether geometry that falls below a certain size in pixels 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. |
CullingKit& HPS::CullingKit::SetExtent | ( | unsigned int | in_pixels | ) |
Controls whether geometry that falls below a certain size in pixels 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. |
CullingKit& HPS::CullingKit::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. |
CullingKit& HPS::CullingKit::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. |
CullingKit& HPS::CullingKit::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. |
CullingKit& HPS::CullingKit::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. |
CullingKit& HPS::CullingKit::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. |
CullingKit& HPS::CullingKit::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. |
void HPS::CullingKit::Show | ( | CullingKit & | out_kit | ) | const |
Copies all settings from this CullingKit into the given CullingKit.
out_kit | The CullingKit to populate with the contents of this object. |
bool HPS::CullingKit::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::CullingKit::ShowDeferralExtent | ( | bool & | out_state, |
unsigned int & | out_pixels | ||
) | const |
Shows whether geometry that falls below a certain size should be culled with deferral.
out_state | Whether deferral culling should be enabled. |
out_pixels | The longest dimension of the screen-space projection of the bounding-volume, in pixels. |
bool HPS::CullingKit::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::CullingKit::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::CullingKit::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::CullingKit::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. |
|
inlinevirtualinherited |
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::Object.
CullingKit& HPS::CullingKit::UnsetBackFace | ( | ) |
Removes the back face culling setting.
CullingKit& HPS::CullingKit::UnsetDeferralExtent | ( | ) |
Removes the extent culling setting.
CullingKit& HPS::CullingKit::UnsetEverything | ( | ) |
Removes all settings from this object.
CullingKit& HPS::CullingKit::UnsetExtent | ( | ) |
Removes the extent culling setting.
CullingKit& HPS::CullingKit::UnsetFrustum | ( | ) |
Removes the frustum culling setting.
CullingKit& HPS::CullingKit::UnsetVector | ( | ) |
Removes the vector culling setting while leaving the vector tolerance unmodified.
CullingKit& HPS::CullingKit::UnsetVectorTolerance | ( | ) |
Removes the vector culling tolerance setting only.
|
static |