Ignore:
Timestamp:
04/06/06 20:48:19 (18 years ago)
Author:
igarcia
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/IMGCluster.cpp

    r721 r731  
    1313} 
    1414 
    15 void Cluster::SetNormal(Ogre::Vector3* n)  
     15void Cluster::setNormal(Ogre::Vector3* n)  
    1616{  
    1717        normal = *n;  
    1818} 
    1919 
    20 Ogre::Vector3* Cluster::GetNormal()  
     20Ogre::Vector3* Cluster::getNormal()  
    2121{  
    2222        return &normal;  
    2323} 
    2424 
    25 BBox* Cluster::GetBound()  
     25BBox* Cluster::getBound()  
    2626{  
    2727        return &bound;  
    2828} 
    2929 
    30 Box2d* Cluster::GetBspNodeBound()  
     30Box2d* Cluster::getBspNodeBound()  
    3131{  
    3232        return &bspnodebound;  
    3333} 
    3434 
    35 void Cluster::SetBspNodeBound(Box2d* box)  
     35void Cluster::setBspNodeBound(Box2d* box)  
    3636{ 
    3737        bspnodebound = (*box); 
    3838} 
    3939 
    40 int Cluster::GetId() const  
     40int Cluster::getId() const  
    4141{  
    4242        return id;  
    4343} 
    4444 
    45 void Cluster::SetId(int id_)  
     45void Cluster::setId(int id_)  
    4646{  
    4747        id = id; 
    4848} 
    4949 
    50         std::vector<Ogre::Vector3>* Cluster::GetVector3sVector()  
     50std::vector<Ogre::Vector3>* Cluster::getVector3sVector()  
    5151{  
    5252        return &Vector3s_vector;  
    5353} 
    5454 
    55 Ogre::Vector3* Cluster::GetVector3sTex() const  
     55Ogre::Vector3* Cluster::getVector3sTex() const  
    5656{  
    5757        return Vector3s_triangle_text; 
    5858} 
    5959 
    60 void Cluster::SetPlane(Ogre::Vector3* normal, Ogre::Vector3 * point)  
     60void Cluster::setPlane(Ogre::Vector3* normal, Ogre::Vector3 * point)  
    6161{ 
    6262    plane.normal = *normal; 
     
    6565} 
    6666 
    67 Plane3 * Cluster::GetPlane() 
     67Plane3 * Cluster::getPlane() 
    6868{  
    6969        return &plane;  
     
    108108} 
    109109 
    110 void Cluster::Print()  
     110void Cluster::print()  
    111111{ 
    112112        Ogre::LogManager::getSingleton().logMessage("\n\nCluster: " + Ogre::StringConverter::toString(id) + ", axisproj: " + Ogre::StringConverter::toString(axisproj)  + ", order: " + Ogre::StringConverter::toString(order)); 
    113113         
    114         plane.Print(); 
     114        plane.print(); 
    115115        Ogre::LogManager::getSingleton().logMessage("\nOrigin (" + Ogre::StringConverter::toString(lumel_origin) + ")"); 
    116116        Ogre::LogManager::getSingleton().logMessage("Inc U (" + Ogre::StringConverter::toString(lumel_x_axis) + ")"); 
    117117        Ogre::LogManager::getSingleton().logMessage("Inc V (" + Ogre::StringConverter::toString(lumel_y_axis.z) + ")"); 
    118118         
    119         bound.Print(); 
    120  
    121         bspnodebound.Print(); 
     119        bound.print(); 
     120 
     121        bspnodebound.print(); 
    122122         
    123123        Ogre::LogManager::getSingleton().logMessage("Printant els vertexs: "); 
     
    125125 
    126126//* return the dominant normal axis, for calculate the 2d projection 
    127 int Cluster::AxisProjected() { 
    128          
    129         Ogre::Vector3 *normal = plane.GetNormal(); 
     127int Cluster::axisProjected()  
     128{ 
     129        Ogre::Vector3 *normal = plane.getNormal(); 
    130130         
    131131        if (Ogre::Math::Abs(normal->x) >= Ogre::Math::Abs(normal->y) && Ogre::Math::Abs(normal->x) >= Ogre::Math::Abs(normal->z)) 
     
    143143} 
    144144 
    145 void Cluster::Finish()  
     145void Cluster::finish()  
    146146{ 
    147147        Ogre::LogManager::getSingleton().logMessage("\nCluster::Finish()"); 
    148         Plane3 *plane = GetPlane(); 
    149         Ogre::Vector3 normal = *plane->GetNormal(); 
    150         float distance = plane->GetDistance(); 
     148        Plane3 *plane = getPlane(); 
     149        Ogre::Vector3 normal = *plane->getNormal(); 
     150        float distance = plane->getDistance(); 
    151151        Ogre::Vector3 corner; 
    152152        Cluster2d cluster2d;             
    153153        Ogre::Vector3 vertexfinal[3]; 
    154         Ogre::Vector2 *vertexs2d; 
    155154        int num_vertexs = 4; 
    156         //Box box; 
    157155        Ogre::Vector3 min; 
    158156        Ogre::Vector3 max; 
    159         float num, den;  
    160157        bool type = true; 
    161158 
    162159        Ogre::LogManager::getSingleton().logMessage("\tCreant cluster 2d"); 
    163         axisproj = cluster2d.Create2d (this, 0, true);   
     160        axisproj = cluster2d.create2d (this, 0, true);   
    164161        Ogre::LogManager::getSingleton().logMessage("\t Imprimint el que hi al del cluster"); 
    165162                 
    166163        std::vector<Ogre::Vector2> vector2; 
    167         vector2 =*cluster2d.GetVector3sVector(); 
     164        vector2 =*cluster2d.getVector3sVector(); 
    168165         
    169166        for (unsigned int i = 0; i < vector2.size(); i++) 
    170167        {                
    171                 bound.AddBoundingVector3 (vector2[i].x, vector2[i].y, 0);                
    172         } 
    173          
    174         min = bound.GetMinimum();        
    175         max = bound.GetMaximum(); 
     168                bound.addBoundingVector3 (vector2[i].x, vector2[i].y, 0);                
     169        } 
     170         
     171        min = bound.getMinimum();        
     172        max = bound.getMaximum(); 
    176173         
    177174        Ogre::LogManager::getSingleton().logMessage("Caixa Englobant del cluster 2d"); 
    178         bound.Print(); 
     175        bound.print(); 
    179176 
    180177        Ogre::Vector3 aux (-9999,-9999,-9999); 
     
    184181 
    185182//* Return the increment in U (lumel increment in x). For patchs calculation  
    186 Ogre::Vector3 Cluster::GetIncU()  
     183Ogre::Vector3 Cluster::getIncU()  
    187184{  
    188185        return lumel_x_axis; 
     
    190187 
    191188//* Return the increment in V (lumel increment in x). For patchs calculation  
    192 Ogre::Vector3 Cluster::GetIncV()  
     189Ogre::Vector3 Cluster::getIncV()  
    193190{ 
    194191        return lumel_y_axis; 
    195192} 
    196193 
    197 Ogre::Vector3 Cluster::GetOrigin()  
     194Ogre::Vector3 Cluster::getOrigin()  
    198195{ 
    199196        return lumel_origin; 
Note: See TracChangeset for help on using the changeset viewer.