Ignore:
Timestamp:
11/28/06 19:46:36 (18 years ago)
Author:
bittner
Message:

global lines support

File:
1 edited

Legend:

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

    r1594 r1824  
    33 
    44#include <vector> 
     5#include <algorithm> 
    56#include "Matrix4x4.h" 
    67#include "Vector3.h" 
     
    4647          Intersectable *mObject; 
    4748 
    48         /// the face of the intersectable 
     49                /// the face of the intersectable 
    4950          int mFace; 
    5051 
    5152          Intersection(const float t, 
    52                                   const Vector3 &normal, 
    53                                   Intersectable *object, 
    54                                   const int face):  
    55           mT(t), mNormal(normal), mObject(object), mFace(face)  
     53                                                                const Vector3 &normal, 
     54                                                                Intersectable *object, 
     55                                                                const int face):  
     56                        mT(t), mNormal(normal), mObject(object), mFace(face)  
    5657          {} 
    57  
     58                 
    5859          Intersection(): mT(0), mNormal(0,0,0), mObject(NULL), mFace(0)  
    5960          {} 
    60  
     61                 
    6162          bool operator<(const Intersection &b) const  
    6263          { 
     
    113114  void Init(const VssRay &vssRay); 
    114115 
     116        void SortIntersections() { 
     117                sort(intersections.begin(), intersections.end()); 
     118        } 
     119         
    115120  Intersectable *GetIntersectionObject(const int i) const { 
    116121    return intersections[i].mObject; 
     
    215220 
    216221  int GetType() const { return mType; } 
     222  void SetType(const int t) { mType = t; } 
    217223   
    218224  // make such operation to slightly change the ray direction 
     
    313319  Vector3 mDirection; 
    314320  float mPdf; 
    315  
    316   SimpleRay() {} 
     321        int mType; 
     322         
     323  SimpleRay(): mType(Ray::LOCAL_RAY) {} 
    317324  SimpleRay(const Vector3 &o, const Vector3 &d, const float p=1.0f): 
    318         mOrigin(o), mDirection(d), mPdf(p) {} 
    319  
     325                mOrigin(o), mDirection(d), mPdf(p), mType(Ray::LOCAL_RAY) {} 
     326         
    320327  Vector3 Extrap(const float t) const { 
    321328        return mOrigin + mDirection * t; 
Note: See TracChangeset for help on using the changeset viewer.