Ignore:
Timestamp:
09/12/06 17:39:08 (18 years ago)
Author:
mattausch
Message:

worked on triangle processing. logical units will be created by grouping objects
using their visibility definitions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/Triangle3.h

    r1328 r1344  
    3030 
    3131        /// Casts ray into this triangle. Returns hit 
    32         int CastRay(const Ray &ray, float &t, const float nearestT) const; 
     32        int CastRay(const Ray &ray, float &t, const float nearestT, Vector3 &normal) const; 
    3333 
    34         ////////////////////////////// 
     34         friend ostream& operator<< (ostream &s, const Triangle3 &A); 
     35         friend istream& operator>> (istream &s, Triangle3 &A); 
    3536 
    36         /// the triangle vertices 
    37         Vector3 mVertices[3]; 
     37 
     38         ////////////////////////////// 
     39         /// the triangle vertices 
     40         Vector3 mVertices[3]; 
    3841}; 
     42 
     43 
     44// Overload << operator for C++-style output 
     45inline ostream& 
     46operator<< (ostream &s, const Triangle3 &A) 
     47{ 
     48  return s << "(" << A.mVertices[0] << ", " << A.mVertices[1] << ", " << A.mVertices[2] << ")"; 
     49} 
     50 
     51// Overload >> operator for C++-style input 
     52inline istream& 
     53operator>> (istream &s, Triangle3 &A) 
     54{ 
     55  char a; 
     56  // read "(x, y, z)" 
     57  return s >> a >> A.mVertices[0] >> a >> A.mVertices[1] >> a >> A.mVertices[2] >> a; 
     58} 
     59 
    3960 
    4061} 
Note: See TracChangeset for help on using the changeset viewer.