Ignore:
Timestamp:
10/05/05 02:19:15 (19 years ago)
Author:
mattausch
Message:

bsp tree view cells sampling possible

File:
1 edited

Legend:

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

    r265 r308  
    11#include "ViewCell.h" 
    22#include "Mesh.h" 
     3#include "Intersectable.h" 
    34#include "MeshKdTree.h" 
    45#include "Triangle3.h" 
    56 
    6 ViewCell::ViewCell(): mMesh(NULL) 
     7ViewCell::ViewCell(): MeshInstance(NULL) 
    78{ 
    89} 
    910 
    10 ViewCell::ViewCell(Mesh *mesh): mMesh(mesh), mPvs(NULL)  
     11ViewCell::ViewCell(Mesh *mesh): MeshInstance(mesh) 
    1112{ 
    1213} 
    1314 
    14 ViewCell::~ViewCell() 
    15 { 
    16         // NOTE: should I really do this here? (I know that there is only one mesh per view cell) 
    17         DEL_PTR(mMesh); 
    18 } 
    19  
    20 Mesh *ViewCell::GetMesh()  
    21 { 
    22         return mMesh; 
    23 } 
    24  
    25 BspPvs *ViewCell::GetPVS()  
     15ViewCellPvs &ViewCell::GetPvs()  
    2616{ 
    2717        return mPvs; 
    2818} 
    2919 
    30 AxisAlignedBox3 ViewCell::GetBox() 
    31 { 
    32         return mMesh->mBox; 
    33 } 
    34    
    35 int ViewCell::CastRay(Ray &ray)  
    36 { 
    37         return 0; 
    38 } 
    39    
    40 bool ViewCell::IsConvex()  
    41 { 
    42         return mMesh->mIsConvex; 
    43 } 
    44  
    45 bool ViewCell::IsWatertight()  
    46 { 
    47         return mMesh->mIsWatertight; 
    48 } 
    49  
    50 float ViewCell::IntersectionComplexity()  
    51 { 
    52         return (float)mMesh->mFaces.size(); 
    53 } 
    54  
    5520int ViewCell::Type() const  
    5621{  
    57         return VIEWCELL;  
    58 } 
    59  
    60 void  ViewCell::GetRandomSurfacePoint(Vector3 &point, Vector3 &normal)  
    61 { 
    62         point = Vector3(0,0,0); 
     22        return VIEW_CELL;  
    6323} 
    6424 
     
    12282        return new ViewCell(mesh); 
    12383} 
     84 
     85void ViewCell::AddPassingRay(const Ray &ray, const int contributions) 
     86{ 
     87        mPassingRays.AddRay(ray, contributions); 
     88} 
Note: See TracChangeset for help on using the changeset viewer.