#include <vuNormalTable.h>
Collaboration diagram for vuNormalTable:
Public Member Functions | |
vuNormalTable () | |
Default constructor. | |
vuNormalTable (const vuNormalTable &inst) | |
Copy constructor doing a deep copy. | |
~vuNormalTable () | |
Destructor. | |
void | setCollection (const float *n, dword size) |
Initializes the normal collection to an array of normals. | |
void | initCollection (dword size) |
Initializes the normal collection to the given size of zero normals. | |
void | addToCollection (const float *n) |
Adds a normal to the collection. | |
void | computeTable (void) |
Computes the quantized normal table. | |
void | destroyTable (void) |
Destroys the allocated normal table and frees memory. | |
dword | findNearest (const float *n) |
Returns the index of the nearest normal that's in the table. | |
vuNormalTable & | operator= (const vuNormalTable &rhs) |
An assignment operator which does a deep copy. | |
const float * | operator[] (dword index) |
An access operator into the normal table. | |
Private Attributes | |
vuNormalBlock * | m_Block |
The block of quantized normals. | |
float * | m_Table |
dword | m_Size |
The size of the normal table. |
Definition at line 9 of file vuNormalTable.h.
|
Default constructor.
Definition at line 19 of file vuNormalTable.cpp. |
|
Copy constructor doing a deep copy.
Definition at line 26 of file vuNormalTable.cpp. |
|
Destructor.
Definition at line 40 of file vuNormalTable.cpp. |
|
Adds a normal to the collection.
Definition at line 71 of file vuNormalTable.cpp. References vuNormalBlock::addNormal(), and m_Block. Referenced by vu1112111::preprocess(), vu1512111::preprocess(), and vu1112115::preprocess(). |
Here is the call graph for this function:
|
Computes the quantized normal table.
Definition at line 76 of file vuNormalTable.cpp. References vuNormalBlock::computeAverage(), vuNormalBlock::computeStats(), dword, vuNormalBlock::getRange(), vuNormalBlock::getStdDev(), m_Block, BList::m_data, BList::m_next, m_Size, m_Table, and vuNormalBlock::medianSplit(). Referenced by vu1112111::preprocess(), vu1512111::preprocess(), and vu1112115::preprocess(). |
Here is the call graph for this function:
|
Destroys the allocated normal table and frees memory.
Definition at line 159 of file vuNormalTable.cpp. References m_Table. |
|
Returns the index of the nearest normal that's in the table. This method goes through the quantized normal table and finds the normal that's closest in length to the the one passed in.
Definition at line 168 of file vuNormalTable.cpp. References dword, m_Size, m_Table, and min. Referenced by vu1112111::preprocess(), vu1512111::preprocess(), and vu1112115::preprocess(). |
|
Initializes the normal collection to the given size of zero normals.
Definition at line 62 of file vuNormalTable.cpp. References dword, m_Block, m_Size, vuNormalBlock::setSize(), and size. Referenced by vu1112111::preprocess(), vu1512111::preprocess(), and vu1112115::preprocess(). |
Here is the call graph for this function:
|
An assignment operator which does a deep copy.
Definition at line 191 of file vuNormalTable.cpp. |
|
An access operator into the normal table.
Definition at line 208 of file vuNormalTable.cpp. |
|
Initializes the normal collection to an array of normals.
Definition at line 48 of file vuNormalTable.cpp. References vuNormalBlock::addNormal(), dword, m_Block, m_Size, vuNormalBlock::setSize(), and size. |
Here is the call graph for this function:
|
The block of quantized normals.
Definition at line 50 of file vuNormalTable.h. Referenced by addToCollection(), computeTable(), initCollection(), operator=(), setCollection(), and vuNormalTable(). |
|
The size of the normal table.
Definition at line 54 of file vuNormalTable.h. Referenced by computeTable(), findNearest(), initCollection(), setCollection(), and vuNormalTable(). |
|
Definition at line 52 of file vuNormalTable.h. Referenced by computeTable(), destroyTable(), findNearest(), operator=(), operator[](), and vuNormalTable(). |