ProtoTracer  1.0
Real-time 3D rendering and animation engine
Loading...
Searching...
No Matches
IndexGroup Class Reference

Represents a group of three unsigned integer indices. More...

#include <IndexGroup.h>

Public Member Functions

 IndexGroup ()
 Default constructor.
 
 IndexGroup (const IndexGroup &indexGroup)
 Copy constructor.
 
 IndexGroup (unsigned int X, unsigned int Y, unsigned int Z)
 Parameterized constructor.
 
IndexGroup Add (IndexGroup indexGroup)
 Adds two IndexGroup objects component-wise.
 
IndexGroup Subtract (IndexGroup indexGroup)
 Subtracts two IndexGroup objects component-wise.
 
IndexGroup Multiply (IndexGroup indexGroup)
 Multiplies two IndexGroup objects component-wise.
 
IndexGroup Divide (IndexGroup indexGroup)
 Divides two IndexGroup objects component-wise.
 
String ToString ()
 Converts the IndexGroup to a string representation.
 

Public Attributes

unsigned int A
 First index in the group.
 
unsigned int B
 Second index in the group.
 
unsigned int C
 Third index in the group.
 

Detailed Description

Represents a group of three unsigned integer indices.

Definition at line 22 of file IndexGroup.h.

Constructor & Destructor Documentation

◆ IndexGroup() [1/3]

Default constructor.

Definition at line 3 of file IndexGroup.cpp.

◆ IndexGroup() [2/3]

IndexGroup ( const IndexGroup indexGroup)

Copy constructor.

Parameters
indexGroupThe IndexGroup to copy from.

Definition at line 5 of file IndexGroup.cpp.

◆ IndexGroup() [3/3]

Parameterized constructor.

Parameters
XValue for the first index.
YValue for the second index.
ZValue for the third index.

Definition at line 7 of file IndexGroup.cpp.

Member Function Documentation

◆ Add()

IndexGroup Add ( IndexGroup  indexGroup)

Adds two IndexGroup objects component-wise.

Parameters
indexGroupThe IndexGroup to add.
Returns
A new IndexGroup with the result of the addition.

Definition at line 9 of file IndexGroup.cpp.

References A, B, and C.

◆ Divide()

IndexGroup Divide ( IndexGroup  indexGroup)

Divides two IndexGroup objects component-wise.

Parameters
indexGroupThe IndexGroup to divide.
Returns
A new IndexGroup with the result of the division.

Definition at line 33 of file IndexGroup.cpp.

References A, B, and C.

◆ Multiply()

IndexGroup Multiply ( IndexGroup  indexGroup)

Multiplies two IndexGroup objects component-wise.

Parameters
indexGroupThe IndexGroup to multiply.
Returns
A new IndexGroup with the result of the multiplication.

Definition at line 25 of file IndexGroup.cpp.

References A, B, and C.

◆ Subtract()

IndexGroup Subtract ( IndexGroup  indexGroup)

Subtracts two IndexGroup objects component-wise.

Parameters
indexGroupThe IndexGroup to subtract.
Returns
A new IndexGroup with the result of the subtraction.

Definition at line 17 of file IndexGroup.cpp.

References A, B, and C.

◆ ToString()

String ToString ( )

Converts the IndexGroup to a string representation.

Returns
A string representation of the IndexGroup in the format "[A, B, C]".

Definition at line 41 of file IndexGroup.cpp.

References A, B, and C.

Member Data Documentation

◆ A

First index in the group.

Definition at line 24 of file IndexGroup.h.

Referenced by Add(), Divide(), Multiply(), Subtract(), and ToString().

◆ B

Second index in the group.

Definition at line 25 of file IndexGroup.h.

Referenced by Add(), Divide(), Multiply(), Subtract(), and ToString().

◆ C

Third index in the group.

Definition at line 26 of file IndexGroup.h.

Referenced by Add(), Divide(), Multiply(), Subtract(), and ToString().


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