#include <hps.h>
Public Member Functions | |
CullingControl (SegmentKey &in_seg) | |
CullingControl (CullingControl const &in_that) | |
~CullingControl () | |
CullingControl (CullingControl &&in_that) | |
CullingControl & | operator= (CullingControl &&in_that) |
HPS::Type | ObjectType () const |
CullingControl & | operator= (CullingControl const &in_that) |
CullingControl & | SetDeferralExtent (bool in_state, unsigned int in_pixels) |
CullingControl & | SetDeferralExtent (unsigned int in_pixels) |
CullingControl & | SetExtent (bool in_state, unsigned int in_pixels) |
CullingControl & | SetExtent (unsigned int in_pixels) |
CullingControl & | SetBackFace (bool in_state) |
CullingControl & | SetVector (bool in_state, HPS::Vector const &in_vector, float in_tolerance_degrees) |
CullingControl & | SetVector (HPS::Vector const &in_vector, float in_tolerance_degrees) |
CullingControl & | SetVector (bool in_state, HPS::Vector const &in_vector=Vector(0.0f, 0.0f, 1.0f)) |
CullingControl & | SetVector (HPS::Vector const &in_vector) |
CullingControl & | SetVectorTolerance (float in_tolerance_degrees) |
CullingControl & | SetFrustum (bool in_state) |
CullingControl & | UnsetDeferralExtent () |
CullingControl & | UnsetExtent () |
CullingControl & | UnsetBackFace () |
CullingControl & | UnsetVector () |
CullingControl & | UnsetVectorTolerance () |
CullingControl & | UnsetFrustum () |
CullingControl & | UnsetEverything () |
bool | ShowDeferralExtent (bool &out_state, unsigned int &out_pixels) const |
bool | ShowExtent (bool &out_state, unsigned int &out_pixels) const |
bool | ShowBackFace (bool &out_state) const |
bool | ShowVector (bool &out_state, HPS::Vector &out_vector) const |
bool | ShowVectorTolerance (float &out_tolerance_degrees) const |
bool | ShowFrustum (bool &out_state) const |
![]() | |
Object & | operator= (Object const &other_object) |
Object (Object &&in_that) | |
Object & | operator= (Object &&in_that) |
HPS::Type | Type () const |
virtual bool | Empty () const |
virtual void | Reset () |
bool | HasType (HPS::Type in_mask) const |
intptr_t | GetClassID () const |
intptr_t | GetInstanceID () const |
Additional Inherited Members | |
![]() | |
template<typename T > | |
static intptr_t | ClassID () |
![]() | |
Control (Control &&in_that) | |
Control & | operator= (Control &&in_that) |
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. |
|
inlinevirtual |
This function returns the type the object, as declared. This does not necessarily give the true type of the underlying object.
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 smart-pointer.
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. |
CullingControl& HPS::CullingControl::UnsetBackFace | ( | ) |
Removes the back face culling setting.
CullingControl& HPS::CullingControl::UnsetDeferralExtent | ( | ) |
Removes the extent culling setting.
CullingControl& HPS::CullingControl::UnsetEverything | ( | ) |
Removes all settings from this object.
CullingControl& HPS::CullingControl::UnsetExtent | ( | ) |
Removes the extent culling setting.
CullingControl& HPS::CullingControl::UnsetFrustum | ( | ) |
Removes the frustum culling setting.
CullingControl& HPS::CullingControl::UnsetVector | ( | ) |
Removes the vector culling setting while leaving the vector tolerance unmodified.
CullingControl& HPS::CullingControl::UnsetVectorTolerance | ( | ) |
Removes the vector culling tolerance setting only.