Class holding various SAH and batch processing parameters.  
 More...
#include <Platform.hpp>
Class holding various SAH and batch processing parameters. 
Definition at line 46 of file Platform.hpp.
 
  
  
      
        
          | FW::Platform::Platform  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
  
  
      
        
          | FW::Platform::Platform  | 
          ( | 
          const String &  | 
          name,  | 
         
        
           | 
           | 
          float  | 
          nodeCost = 1.f,  | 
         
        
           | 
           | 
          float  | 
          triCost = 1.f,  | 
         
        
           | 
           | 
          S32  | 
          nodeBatchSize = 1,  | 
         
        
           | 
           | 
          S32  | 
          triBatchSize = 1  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Constructor. 
- Parameters
 - 
  
    | [in] | name | Name of the platform settings.  | 
    | [in] | nodeCost | Cost of a single node.  | 
    | [in] | triCost | Cost of a single triangle.  | 
    | [in] | nodeBatchSize | Size of a node batch.  | 
    | [in] | triBatchSize | Size of a triangle batch.  | 
  
   
Definition at line 63 of file Platform.hpp.
 
 
  
  
      
        
          | U32 FW::Platform::computeHash  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
 
  
  
      
        
          | float FW::Platform::getCost  | 
          ( | 
          int  | 
          numChildNodes,  | 
         
        
           | 
           | 
          int  | 
          numTris  | 
         
        
           | 
          ) | 
           |  const | 
         
       
   | 
  
inline   | 
  
 
Calculates cost of a single node. 
- Parameters
 - 
  
    | [in] | numChildNodes | Number of child nodes.  | 
    | [in] | numTrix | Number of triangles.  | 
  
   
- Returns
 - SAH cost of a node. 
 
Definition at line 88 of file Platform.hpp.
 
 
  
  
      
        
          | S32 FW::Platform::getMaxLeafSize  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
 
  
  
      
        
          | S32 FW::Platform::getMinLeafSize  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
 
  
  
      
        
          | const String& FW::Platform::getName  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
- Returns
 - Name of the platform settings. 
 
Definition at line 68 of file Platform.hpp.
 
 
  
  
      
        
          | S32 FW::Platform::getNodeBatchSize  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
- Returns
 - Size of the node batch. 
 
Definition at line 113 of file Platform.hpp.
 
 
  
  
      
        
          | float FW::Platform::getNodeCost  | 
          ( | 
          S32  | 
          n | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Calculates cost of a given number of nodes rounded to the batch size. 
- Parameters
 - 
  
  
 
- Returns
 - Cost of nodes. 
 
Definition at line 102 of file Platform.hpp.
 
 
  
  
      
        
          | float FW::Platform::getSAHNodeCost  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
- Returns
 - SAH cost of a single node. 
 
Definition at line 79 of file Platform.hpp.
 
 
  
  
      
        
          | float FW::Platform::getSAHTriangleCost  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
- Returns
 - SAH cost of a single triangle. 
 
Definition at line 74 of file Platform.hpp.
 
 
  
  
      
        
          | S32 FW::Platform::getTriangleBatchSize  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
- Returns
 - Size of the triangle batch. 
 
Definition at line 108 of file Platform.hpp.
 
 
  
  
      
        
          | float FW::Platform::getTriangleCost  | 
          ( | 
          S32  | 
          n | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Calcuates cost of a given number of triangles rounded to the batch size. 
- Parameters
 - 
  
    | [in] | n | Number of triangles.  | 
  
   
- Returns
 - Cost of triangles. 
 
Definition at line 95 of file Platform.hpp.
 
 
  
  
      
        
          | S32 FW::Platform::roundToNodeBatchSize  | 
          ( | 
          S32  | 
          n | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Rounds given value up to the nearest node batch size multiple. 
- Parameters
 - 
  
    | [in] | n | Value to be rounded.  | 
  
   
- Returns
 - Rounded value. 
 
Definition at line 139 of file Platform.hpp.
 
 
  
  
      
        
          | S32 FW::Platform::roundToTriangleBatchSize  | 
          ( | 
          S32  | 
          n | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Rounds given value up to the nearest triangle batch size multiple. 
- Parameters
 - 
  
    | [in] | n | Value to be rounded.  | 
  
   
- Returns
 - Rounded value. 
 
Definition at line 132 of file Platform.hpp.
 
 
  
  
      
        
          | void FW::Platform::setLeafPreferences  | 
          ( | 
          S32  | 
          minSize,  | 
         
        
           | 
           | 
          S32  | 
          maxSize  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Sets leaf size preferences (desired number of triangles in one leaf node). 
- Parameters
 - 
  
    | [in] | minSize | Minimum leaf size.  | 
    | [in] | maxSize | Maximum leaf size.  | 
  
   
Definition at line 147 of file Platform.hpp.
 
 
  
  
      
        
          | void FW::Platform::setNodeBatchSize  | 
          ( | 
          S32  | 
          nodeBatchSize | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Sets node batch size to a given value. 
- Parameters
 - 
  
    | [in] | nodeBatchSize | New node batch size.  | 
  
   
Definition at line 125 of file Platform.hpp.
 
 
  
  
      
        
          | void FW::Platform::setTriangleBatchSize  | 
          ( | 
          S32  | 
          triBatchSize | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Sets triangle batch size to a given value. 
- Parameters
 - 
  
    | [in] | triBatchSize | New triangle batch size.  | 
  
   
Definition at line 119 of file Platform.hpp.
 
 
The documentation for this class was generated from the following file: