NDEVR
API Documentation
VulkanBitflagObject

Stores bools to be sent to both the Vertex and Fragment shaders in the Vulkan space. More...

Collaboration diagram for VulkanBitflagObject:
[legend]

Public Types

enum  ModelProperties {
  e_3D_selected , e_3D_focussed , e_orient_to_camera , e_follow_camera ,
  e_scale_to_camera
}
 Properties describing the state of a model within the 3D scene. More...
enum class  RenderProperties {
  e_parity , e_wireframe , e_use_custom_color , e_use_lighting ,
  e_smooth_normals , e_use_texture_model_coord , e_use_linework_model_coord
}
 Properties controlling how geometry is rendered. More...

Public Member Functions

 VulkanBitflagObject ()
 Default constructor initializing all flags to zero.
 VulkanBitflagObject (const VulkanBitflagObject &object)
 Copy constructor.
bool get (const ModelProperties &property) const
 Gets the value of a model property flag.
bool operator!= (const VulkanBitflagObject &object) const
 Inequality comparison operator.
VulkanBitflagObjectoperator= (const VulkanBitflagObject &object)
 Copy assignment operator.
bool operator== (const VulkanBitflagObject &object) const
 Equality comparison operator.
void set (const ModelProperties &property, bool value)
 Sets a model property flag.
void set (const VertexProperty &property, bool value)
 Sets a vertex property flag.
void setExtra (bool value)
 Sets the extra bit in flag[0] bit 7.
void setHasImage (uint01 type, bool has_image)
 Sets whether a specific image type is present.
void setRenderProperty (RenderProperties property, bool value)
 Sets a render property flag.

Public Attributes

BitFlag flag [4]
 Array of four BitFlag values: [0]=vertex, [1]=model, [2]=render, [3]=image.

Detailed Description

Stores bools to be sent to both the Vertex and Fragment shaders in the Vulkan space.


Definition at line 40 of file VulkanBitflagObject.h.

Member Enumeration Documentation

◆ ModelProperties

Properties describing the state of a model within the 3D scene.


Enumerator
e_3D_selected 

Whether the model is currently selected in the 3D view.

e_3D_focussed 

Whether the model is currently focused in the 3D view.

e_orient_to_camera 

Whether the model should orient itself toward the camera.

e_follow_camera 

Whether the model should follow the camera position.

e_scale_to_camera 

Whether the model should scale based on camera distance.

Definition at line 45 of file VulkanBitflagObject.h.

◆ RenderProperties

Properties controlling how geometry is rendered.


Enumerator
e_parity 

Whether parity-based culling is enabled.

e_wireframe 

Whether the object should render as wireframe.

e_use_custom_color 

Whether to use a custom color override.

e_use_lighting 

Whether lighting calculations should be applied.

e_smooth_normals 

Whether normals should be interpolated for smooth shading.

e_use_texture_model_coord 

Whether to use model coordinates for texture mapping.

e_use_linework_model_coord 

Whether to use model coordinates for linework.

Definition at line 56 of file VulkanBitflagObject.h.

Constructor & Destructor Documentation

◆ VulkanBitflagObject()

VulkanBitflagObject::VulkanBitflagObject ( const VulkanBitflagObject & object)
inline

Copy constructor.

Parameters
[in]objectThe object to copy from.

Definition at line 72 of file VulkanBitflagObject.h.

References VulkanBitflagObject(), and flag.

Member Function Documentation

◆ get()

bool VulkanBitflagObject::get ( const ModelProperties & property) const
inlinenodiscard

Gets the value of a model property flag.

Parameters
[in]propertyThe model property to query.
Returns
The boolean value of the property.

Definition at line 102 of file VulkanBitflagObject.h.

References cast(), and flag.

◆ operator!=()

bool VulkanBitflagObject::operator!= ( const VulkanBitflagObject & object) const
inline

Inequality comparison operator.

Parameters
[in]objectThe object to compare against.
Returns
True if any flags differ.

Definition at line 142 of file VulkanBitflagObject.h.

References VulkanBitflagObject(), and flag.

◆ operator=()

VulkanBitflagObject & VulkanBitflagObject::operator= ( const VulkanBitflagObject & object)
inline

Copy assignment operator.

Parameters
[in]objectThe object to copy from.
Returns
A reference to this object.

Definition at line 123 of file VulkanBitflagObject.h.

References VulkanBitflagObject(), and flag.

◆ operator==()

bool VulkanBitflagObject::operator== ( const VulkanBitflagObject & object) const
inline

Equality comparison operator.

Parameters
[in]objectThe object to compare against.
Returns
True if all flags are equal.

Definition at line 132 of file VulkanBitflagObject.h.

References VulkanBitflagObject(), and flag.

◆ set() [1/2]

void VulkanBitflagObject::set ( const ModelProperties & property,
bool value )
inline

Sets a model property flag.

Parameters
[in]propertyThe model property to set.
[in]valueThe boolean value to assign.

Definition at line 95 of file VulkanBitflagObject.h.

References cast(), and flag.

◆ set() [2/2]

void VulkanBitflagObject::set ( const VertexProperty & property,
bool value )
inline

Sets a vertex property flag.

Parameters
[in]propertyThe vertex property to set.
[in]valueThe boolean value to assign.

Definition at line 82 of file VulkanBitflagObject.h.

References cast(), and flag.

◆ setExtra()

void VulkanBitflagObject::setExtra ( bool value)
inline

Sets the extra bit in flag[0] bit 7.

Parameters
[in]valueThe boolean value to assign.

Definition at line 88 of file VulkanBitflagObject.h.

References flag.

◆ setHasImage()

void VulkanBitflagObject::setHasImage ( uint01 type,
bool has_image )
inline

Sets whether a specific image type is present.

Parameters
[in]typeThe image type index.
[in]has_imageWhether the image type is present.

Definition at line 116 of file VulkanBitflagObject.h.

References flag, and type.

◆ setRenderProperty()

void VulkanBitflagObject::setRenderProperty ( RenderProperties property,
bool value )
inline

Sets a render property flag.

Parameters
[in]propertyThe render property to set.
[in]valueThe boolean value to assign.

Definition at line 109 of file VulkanBitflagObject.h.

References cast(), and flag.


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