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::GridKit Class Reference

The GridKit class is a user space object. More...

#include <hps.h>

Inheritance diagram for HPS::GridKit:
Collaboration diagram for HPS::GridKit:

Public Member Functions

 GridKit ()
 The default constructor creates an empty GridKit object. More...
 
 GridKit (GridKit const &in_kit)
 The copy constructor creates a new GridKit object that contains the same settings as the source GridKit. More...
 
 GridKit (GridKit &&in_that)
 The move constructor creates a GridKit by transferring the underlying object of the rvalue reference to this GridKit. More...
 
virtual ~GridKit ()
 
HPS::Type ObjectType () const
 
void Consume (GridKit &in_kit)
 Copies the source GridKit into this GridKit and resets the source kit. More...
 
void Set (GridKit const &in_kit)
 Copies the source GridKit into this GridKit. More...
 
void Show (GridKit &out_kit) const
 Copies this GridKit into the given GridKit. More...
 
GridKitoperator= (GridKit const &in_kit)
 Copies the source GridKit into this GridKit. More...
 
GridKitoperator= (GridKit &&in_that)
 The move assignment operator transfers the underlying object of the rvalue reference to this GridKit. More...
 
bool Empty () const
 Indicates whether this GridKit has any values set on it. More...
 
bool Equals (GridKit const &in_kit) const
 Check if the source GridKit is equivalent to this GridKit. More...
 
bool operator== (GridKit const &in_kit) const
 Check if the source GridKit is equivalent to this GridKit. More...
 
bool operator!= (GridKit const &in_kit) const
 Check if the source GridKit is not equivalent to this GridKit. More...
 
GridKitSetPriority (int in_priority)
 Assigns a specific drawing priority value to the GridKit. More...
 
GridKitSetType (Grid::Type in_type)
 Sets the type of this GridKit. More...
 
GridKitSetOrigin (Point const &in_origin)
 Sets the origin for this GridKit. More...
 
GridKitSetFirstPoint (Point const &in_first_point)
 Sets the first reference point for this GridKit. More...
 
GridKitSetSecondPoint (Point const &in_second_point)
 Sets the second reference point for this GridKit. More...
 
GridKitSetFirstCount (int in_first_count)
 Sets the first reference count for this GridKit, i.e., the number of grid elements along the vector determined by the first reference point. More...
 
GridKitSetSecondCount (int in_second_count)
 Sets the second reference count for this GridKit, i.e., the number of grid elements along the vector determined by the second reference point. More...
 
GridKitUnsetPriority ()
 Removes a drawing priority setting. More...
 
GridKitUnsetType ()
 Removes the type from this GridKit. More...
 
GridKitUnsetOrigin ()
 Removes the origin from this GridKit. More...
 
GridKitUnsetFirstPoint ()
 Removes the first reference point from this GridKit. More...
 
GridKitUnsetSecondPoint ()
 Removes the second reference point from this GridKit. More...
 
GridKitUnsetFirstCount ()
 Removes the first reference count from this GridKit. More...
 
GridKitUnsetSecondCount ()
 Removes the second reference count from this GridKit. More...
 
GridKitUnsetEverything ()
 Removes the all settings from this GridKit. More...
 
bool ShowPriority (int &out_priority) const
 Shows the drawing priority. More...
 
bool ShowType (Grid::Type &out_type) const
 Shows the type for this GridKit. More...
 
bool ShowOrigin (Point &out_origin) const
 Shows the origin for this GridKit. More...
 
bool ShowFirstPoint (Point &out_first_point) const
 Shows the first reference point for this GridKit. More...
 
bool ShowSecondPoint (Point &out_second_point) const
 Shows the second reference point for this GridKit. More...
 
bool ShowFirstCount (int &out_first_count) const
 Shows the first reference count for this GridKit. More...
 
bool ShowSecondCount (int &out_second_count) const
 Shows the second reference count for this GridKit. More...
 
GridKitSetUserData (intptr_t in_index, size_t in_bytes, byte const in_data[])
 Sets user data on this kit. More...
 
GridKitSetUserData (intptr_t in_index, ByteArray const &in_data)
 Sets user data on this kit. More...
 
GridKitSetUserData (IntPtrTArray const &in_indices, ByteArrayArray const &in_data)
 Sets user data on this kit. More...
 
GridKitUnsetUserData (intptr_t in_index)
 Removes the user data at the given index from this kit. More...
 
GridKitUnsetUserData (size_t in_count, intptr_t const in_indices[])
 Removes the user data at the given indices from this kit. More...
 
GridKitUnsetUserData (IntPtrTArray const &in_indices)
 Removes the user data at the given indices from this kit. More...
 
GridKitUnsetAllUserData ()
 Removes all user data from this kit. More...
 
size_t ShowUserDataCount () const
 Get the number of user data indices set on this kit. More...
 
bool ShowUserDataIndices (IntPtrTArray &out_indices) const
 Shows the indices of all user data set on this kit. More...
 
bool ShowUserData (intptr_t in_index, ByteArray &out_data) const
 Shows the user data at a given index for this kit. More...
 
bool ShowUserData (IntPtrTArray &out_indices, ByteArrayArray &out_data) const
 Shows all user data for this kit. 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

template<typename T >
static intptr_t ClassID ()
 Unique identifier for this class. More...
 

Static Public Attributes

static const HPS::Type staticType = HPS::Type::GridKit
 

Detailed Description

The GridKit class is a user space object.

It is a kit analog to a GridKey.

Constructor & Destructor Documentation

◆ GridKit() [1/3]

HPS::GridKit::GridKit ( )

The default constructor creates an empty GridKit object.

◆ GridKit() [2/3]

HPS::GridKit::GridKit ( GridKit const &  in_kit)

The copy constructor creates a new GridKit object that contains the same settings as the source GridKit.

Parameters
in_kitThe source GridKit to copy.

◆ GridKit() [3/3]

HPS::GridKit::GridKit ( GridKit &&  in_that)

The move constructor creates a GridKit by transferring the underlying object of the rvalue reference to this GridKit.

Parameters
in_thatAn rvalue reference to a GridKit to take the underlying object from.

◆ ~GridKit()

virtual HPS::GridKit::~GridKit ( )
virtual

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.

◆ Consume()

void HPS::GridKit::Consume ( GridKit in_kit)

Copies the source GridKit into this GridKit and resets the source kit.

Parameters
in_kitThe source GridKit to consume.

◆ Empty()

bool HPS::GridKit::Empty ( ) const
virtual

Indicates whether this GridKit has any values set on it.

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

Reimplemented from HPS::Object.

◆ Equals()

bool HPS::GridKit::Equals ( GridKit const &  in_kit) const

Check if the source GridKit is equivalent to this GridKit.

Parameters
in_kitThe source GridKit to compare to this GridKit.
Returns
true if the objects are equivalent, false otherwise.

◆ 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::GridKit::ObjectType ( ) const
inlinevirtual

Reimplemented from HPS::Kit.

Here is the call graph for this function:

◆ operator!=()

bool HPS::GridKit::operator!= ( GridKit const &  in_kit) const

Check if the source GridKit is not equivalent to this GridKit.

Parameters
in_kitThe source GridKit to compare to this GridKit.
Returns
true if the objects are not equivalent, false otherwise.

◆ operator=() [1/2]

GridKit& HPS::GridKit::operator= ( GridKit const &  in_kit)

Copies the source GridKit into this GridKit.

Parameters
in_kitThe source GridKit to copy.
Returns
A reference to this GridKit.

◆ operator=() [2/2]

GridKit& HPS::GridKit::operator= ( GridKit &&  in_that)

The move assignment operator transfers the underlying object of the rvalue reference to this GridKit.

Parameters
in_thatAn rvalue reference to a GridKit to take the underlying object from.
Returns
A reference to this GridKit.

◆ operator==()

bool HPS::GridKit::operator== ( GridKit const &  in_kit) const

Check if the source GridKit is equivalent to this GridKit.

Parameters
in_kitThe source GridKit to compare to this GridKit.
Returns
true if the objects are equivalent, false otherwise.

◆ Reset()

◆ Set()

void HPS::GridKit::Set ( GridKit const &  in_kit)

Copies the source GridKit into this GridKit.

Parameters
in_kitThe source GridKit to copy.

◆ SetFirstCount()

GridKit& HPS::GridKit::SetFirstCount ( int  in_first_count)

Sets the first reference count for this GridKit, i.e., the number of grid elements along the vector determined by the first reference point.

If the type of the grid is Grid::Type::Quadrilateral, there are three type of behavior depending on if the count is greater than zero, less than zero, or equal to zero. If the count is greater than zero, the count determines the finite number of grid lines which will intersect with the vector determined by the first reference point. If the count is less than zero, the count determines the finite number of grid lines which will intersect with the vector determined by the first reference point and additionally that same number of intersections along the negation of that vector. Lastly, if the count is zero, the grid will extend infinitely along the vector determined by the first reference point and its negation. If the type of the grid is Grid::Type::Radial, there are two types of behavior depending on if the count is greater than zero or equal to zero. If the count is greater than zero, it determines the finite number of circular arcs which will intersect with the radial vectors. If the count is equal to zero, there will be an infinite number of intersections along the radial arcs. Negative counts are invalid in this case.

Parameters
in_first_countThe count of the number of grid elements along the vector determined by the first reference point.
Returns
A reference to this GridKit.

◆ SetFirstPoint()

GridKit& HPS::GridKit::SetFirstPoint ( Point const &  in_first_point)

Sets the first reference point for this GridKit.

If the type of the grid is Grid::Type::Quadrilateral, this defines the first point along one of the vectors defining the grid (the other vector is determined by the second point). It also determines the spacing between the grid lines along the vector. If the type of the grid is Grid::Type::Radial, this defines the first point along the radius vector which will intersect with the circular grid arcs.

Parameters
in_first_pointThe first reference point for this GridKit.
Returns
A reference to this GridKit.

◆ SetOrigin()

GridKit& HPS::GridKit::SetOrigin ( Point const &  in_origin)

Sets the origin for this GridKit.

Parameters
in_originThe origin for this GridKit.
Returns
A reference to this GridKit.

◆ SetPriority()

GridKit& HPS::GridKit::SetPriority ( int  in_priority)

Assigns a specific drawing priority value to the GridKit.

It affects the order in which the contents of this segment are drawn if and only if the rendering algorithm is set to Priority.

Parameters
in_priorityThe drawing priority, higher priority items are drawn on top of lower priority items.
Returns
A reference to this object.
See also
SubwindowKit::SetPriority()
SubwindowKit::SetRenderingAlgorithm()

◆ SetSecondCount()

GridKit& HPS::GridKit::SetSecondCount ( int  in_second_count)

Sets the second reference count for this GridKit, i.e., the number of grid elements along the vector determined by the second reference point.

If the type of the grid is Grid::Type::Quadrilateral, there are three type of behavior depending on if the count is greater than zero, less than zero, or equal to zero. If the count is greater than zero, the count determines the finite number of grid lines which will intersect with the vector determined by the second reference point. If the count is less than zero, the count determines the finite number of grid lines which will intersect with the vector determined by the second reference point and additionally that same number of intersections along the negation of that vector. Lastly, if the count is zero, the grid will extend infinitely along the vector determined by the second reference point and its negation. If the type of the grid is Grid::Type::Radial, the count determines the number of radial vectors for the grid.

Parameters
in_second_countThe count of the number of grid elements along the vector determined by the second reference point.
Returns
A reference to this GridKit.

◆ SetSecondPoint()

GridKit& HPS::GridKit::SetSecondPoint ( Point const &  in_second_point)

Sets the second reference point for this GridKit.

If the type of the grid Grid::Type::Quadrilateral, this defines the first point along the second vector defining the grid (the other vector is determined by the first point). It also determines the spacing between the grid lines along the vector. If the type of the grid is Grid::Type::Radial, this defines the first point on the first circular arc which intersects with the radial vectors, and determines the spacing of the arcs along the radial vectors.

Parameters
in_second_pointThe second reference point for this GridKit.
Returns
A reference to this GridKit.

◆ SetType()

GridKit& HPS::GridKit::SetType ( Grid::Type  in_type)

Sets the type of this GridKit.

Parameters
in_typeThe type of this GridKit.
Returns
A reference to this GridKit.

◆ SetUserData() [1/3]

GridKit& HPS::GridKit::SetUserData ( intptr_t  in_index,
size_t  in_bytes,
byte const  in_data[] 
)

Sets user data on this kit.

Parameters
in_indexThe index of the user data to set.
in_bytesThe number of bytes of user data to set.
in_dataThe bytes of user data to set.
Returns
A reference to this kit.

◆ SetUserData() [2/3]

GridKit& HPS::GridKit::SetUserData ( intptr_t  in_index,
ByteArray const &  in_data 
)

Sets user data on this kit.

Parameters
in_indexThe index of the user data to set.
in_dataThe bytes of user data to set.
Returns
A reference to this kit.

◆ SetUserData() [3/3]

GridKit& HPS::GridKit::SetUserData ( IntPtrTArray const &  in_indices,
ByteArrayArray const &  in_data 
)

Sets user data on this kit.

Parameters
in_indicesAn array of user data indices to set.
in_dataAn array of bytes of user data to set.
Returns
A reference to this kit.

◆ Show()

void HPS::GridKit::Show ( GridKit out_kit) const

Copies this GridKit into the given GridKit.

Parameters
out_kitThe GridKit to populate with the contents of this GridKit.

◆ ShowFirstCount()

bool HPS::GridKit::ShowFirstCount ( int &  out_first_count) const

Shows the first reference count for this GridKit.

Parameters
out_first_countThe first reference count for this GridKit.
Returns
true if a first reference count was set, false otherwise.

◆ ShowFirstPoint()

bool HPS::GridKit::ShowFirstPoint ( Point out_first_point) const

Shows the first reference point for this GridKit.

Parameters
out_first_pointThe first reference point for this GridKit.
Returns
true if a first reference point was set, false otherwise.

◆ ShowOrigin()

bool HPS::GridKit::ShowOrigin ( Point out_origin) const

Shows the origin for this GridKit.

Parameters
out_originThe origin for this GridKit.
Returns
true if an origin was set, false otherwise.

◆ ShowPriority()

bool HPS::GridKit::ShowPriority ( int &  out_priority) const

Shows the drawing priority.

Parameters
out_priorityThe drawing priority, higher priority items are drawn on top of lower priority items.
Returns
true if the setting is valid, false otherwise.

◆ ShowSecondCount()

bool HPS::GridKit::ShowSecondCount ( int &  out_second_count) const

Shows the second reference count for this GridKit.

Parameters
out_second_countThe second reference count for this GridKit.
Returns
true if a second reference count was set, false otherwise.

◆ ShowSecondPoint()

bool HPS::GridKit::ShowSecondPoint ( Point out_second_point) const

Shows the second reference point for this GridKit.

Parameters
out_second_pointThe second reference point for this GridKit.
Returns
true if a second reference point was set, false otherwise.

◆ ShowType()

bool HPS::GridKit::ShowType ( Grid::Type out_type) const

Shows the type for this GridKit.

Parameters
out_typeThe type for this GridKit.
Returns
true if a type was set, false otherwise.

◆ ShowUserData() [1/2]

bool HPS::GridKit::ShowUserData ( intptr_t  in_index,
ByteArray out_data 
) const

Shows the user data at a given index for this kit.

Parameters
in_indexThe index of the user data to show.
out_dataThe user data at the given index.
Returns
true if there is user data at the given index, false otherwise.

◆ ShowUserData() [2/2]

bool HPS::GridKit::ShowUserData ( IntPtrTArray out_indices,
ByteArrayArray out_data 
) const

Shows all user data for this kit.

Parameters
out_indicesAn array of all user data indices set on this kit.
out_dataAn array of all user data set on this kit.
Returns
true if there is user data on this kit, false otherwise.

◆ ShowUserDataCount()

size_t HPS::GridKit::ShowUserDataCount ( ) const

Get the number of user data indices set on this kit.

◆ ShowUserDataIndices()

bool HPS::GridKit::ShowUserDataIndices ( IntPtrTArray out_indices) const

Shows the indices of all user data set on this kit.

Parameters
out_indicesThe user data indices set on this kit.
Returns
The number of user data indices set on this kit.

◆ Type()

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

Returns
The true type of the object in question.

Reimplemented from HPS::Object.

◆ UnsetAllUserData()

GridKit& HPS::GridKit::UnsetAllUserData ( )

Removes all user data from this kit.

Returns
A reference to this kit.

◆ UnsetEverything()

GridKit& HPS::GridKit::UnsetEverything ( )

Removes the all settings from this GridKit.

Returns
A reference to this GridKit.

◆ UnsetFirstCount()

GridKit& HPS::GridKit::UnsetFirstCount ( )

Removes the first reference count from this GridKit.

Returns
A reference to this GridKit.

◆ UnsetFirstPoint()

GridKit& HPS::GridKit::UnsetFirstPoint ( )

Removes the first reference point from this GridKit.

Returns
A reference to this GridKit.

◆ UnsetOrigin()

GridKit& HPS::GridKit::UnsetOrigin ( )

Removes the origin from this GridKit.

Returns
A reference to this GridKit.

◆ UnsetPriority()

GridKit& HPS::GridKit::UnsetPriority ( )

Removes a drawing priority setting.

Returns
A reference to this GridKit.

◆ UnsetSecondCount()

GridKit& HPS::GridKit::UnsetSecondCount ( )

Removes the second reference count from this GridKit.

Returns
A reference to this GridKit.

◆ UnsetSecondPoint()

GridKit& HPS::GridKit::UnsetSecondPoint ( )

Removes the second reference point from this GridKit.

Returns
A reference to this GridKit.

◆ UnsetType()

GridKit& HPS::GridKit::UnsetType ( )

Removes the type from this GridKit.

Returns
A reference to this GridKit.

◆ UnsetUserData() [1/3]

GridKit& HPS::GridKit::UnsetUserData ( intptr_t  in_index)

Removes the user data at the given index from this kit.

Parameters
in_indexThe index of the user data to remove.
Returns
A reference to this kit.

◆ UnsetUserData() [2/3]

GridKit& HPS::GridKit::UnsetUserData ( size_t  in_count,
intptr_t const  in_indices[] 
)

Removes the user data at the given indices from this kit.

Parameters
in_countThe size of the following array.
in_indicesThe indices of the user data to remove.
Returns
A reference to this kit.

◆ UnsetUserData() [3/3]

GridKit& HPS::GridKit::UnsetUserData ( IntPtrTArray const &  in_indices)

Removes the user data at the given indices from this kit.

Parameters
in_indicesThe indices of the user data to remove.
Returns
A reference to this kit.

Member Data Documentation

◆ staticType

const HPS::Type HPS::GridKit::staticType = HPS::Type::GridKit
static

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