Changeset 1344 for GTP/trunk/Lib/Vis/Preprocessing/src/Triangle3.h
- Timestamp:
- 09/12/06 17:39:08 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/Triangle3.h
r1328 r1344 30 30 31 31 /// 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; 33 33 34 ////////////////////////////// 34 friend ostream& operator<< (ostream &s, const Triangle3 &A); 35 friend istream& operator>> (istream &s, Triangle3 &A); 35 36 36 /// the triangle vertices 37 Vector3 mVertices[3]; 37 38 ////////////////////////////// 39 /// the triangle vertices 40 Vector3 mVertices[3]; 38 41 }; 42 43 44 // Overload << operator for C++-style output 45 inline ostream& 46 operator<< (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 52 inline istream& 53 operator>> (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 39 60 40 61 }
Note: See TracChangeset
for help on using the changeset viewer.