Ignore:
Timestamp:
10/12/05 01:15:22 (19 years ago)
Author:
mattausch
Message:

changed the from rays construction (not finished yet)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/VUT/GtpVisibilityPreprocessor/src/Polygon3.cpp

    r318 r319  
    66#include "Ray.h" 
    77 
    8 Polygon3::Polygon3(): mMaterial(NULL), mParent(NULL) 
     8Polygon3::Polygon3():  
     9mMaterial(NULL), mParent(NULL), mPiercingRays(NULL) 
    910{} 
    1011 
    11 Polygon3::Polygon3(const VertexContainer &vertices): mVertices(vertices), mMaterial(NULL), mParent(NULL) 
     12Polygon3::Polygon3(const VertexContainer &vertices):  
     13mVertices(vertices), mMaterial(NULL), mParent(NULL), mPiercingRays(NULL) 
    1214{} 
    1315 
    14 Polygon3::Polygon3(MeshInstance *parent): mMaterial(NULL), mParent(parent) 
     16Polygon3::Polygon3(MeshInstance *parent):  
     17mMaterial(NULL), mParent(parent) 
    1518{} 
    16  
    17 // creates an "infinite" polygon from this plane 
    18 //Polygon3::Polygon3(Plane3 plane) 
    19 //{} 
    2019 
    2120Polygon3::Polygon3(Face *face, Mesh *parentMesh) 
     
    2726                mMaterial = parentMesh->mMaterial; 
    2827        } 
     28} 
     29 
     30Polygon3::~Polygon3() 
     31{ 
     32        DEL_PTR(mPiercingRays); 
    2933} 
    3034 
     
    352356} 
    353357 
     358RayContainer *Polygon3::GetPiercingRays() 
     359{ 
     360        if (!mPiercingRays) 
     361                mPiercingRays = new RayContainer(); 
     362        return mPiercingRays; 
     363} 
     364 
     365void Polygon3::AddPiercingRay(Ray *ray) 
     366{ 
     367        if (!mPiercingRays) 
     368                mPiercingRays = new RayContainer(); 
     369        //if (binary_search(mPiercingRays.begin(), mPiercingRays.end(), ray)) return false; 
     370         
     371        mPiercingRays->push_back(ray); 
     372} 
Note: See TracChangeset for help on using the changeset viewer.