Ignore:
Timestamp:
02/28/07 19:38:47 (17 years ago)
Author:
mattausch
Message:

removed using namespace std from .h

File:
1 edited

Legend:

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

    r2168 r2176  
    33 
    44#include <iostream> 
    5 //using namespace std; 
     5// 
    66#include <math.h> 
    77#include "common.h" 
    88 
     9//using std::ostream; 
     10//using std::istream; 
    911 
    1012namespace GtpVisibilityPreprocessor { 
     
    1416class Vector2; 
    1517 
    16  
    17 // HACK of returning vector components as array fields. 
     18// HACK of returning std::vector components as array fields. 
    1819// NOT guarrantied to work with some strange variable allignment ! 
    1920#define __VECTOR_HACK 
     
    3940  Vector3(const Vector3 &v) { x = v.x; y = v.y; z = v.z; } 
    4041 
    41   // Functions to get at the vector components 
     42  // Functions to get at the std::vector components 
    4243  float& operator[] (int inx) { 
    4344#ifndef __VECTOR_HACK 
     
    8081  void SetValue(const float a) { x = y = z = a; } 
    8182   
    82   // returns the axis, where the vector has the largest value 
     83  // returns the axis, where the std::vector has the largest value 
    8384  int DrivingAxis(void) const; 
    8485 
    85   // returns the axis, where the vector has the smallest value 
     86  // returns the axis, where the std::vector has the smallest value 
    8687  int TinyAxis(void) const; 
    8788 
     
    9596   } 
    9697 
    97   // normalizes the vector of unit size corresponding to given vector 
     98  // normalizes the std::vector of unit size corresponding to given std::vector 
    9899  inline void Normalize(); 
    99100   
    100   /** Returns false if this vector has a nan component. 
     101  /** Returns false if this std::vector has a nan component. 
    101102  */ 
    102103  bool CheckValidity() const; 
     
    109110     In fact it tries v x (0,0,1) an if the result is too small, 
    110111     it definitely does v x (0,1,0). It will always work for 
    111      non-degenareted vector and is much faster than to use 
     112     non-degenareted std::vector and is much faster than to use 
    112113     TangentVectors. 
    113114 
    114      @param v(in) The vector we want to find normal for. 
    115      @return The normal vector to v. 
     115     @param v(in) The std::vector we want to find normal for. 
     116     @return The normal std::vector to v. 
    116117  */ 
    117118  friend inline Vector3 ArbitraryNormal(const Vector3 &v);  
     
    140141  void RightHandedBase(Vector3& U, Vector3& V) const; 
    141142 
    142   /// Transforms a vector to the global coordinate frame. 
     143  /// Transforms a std::vector to the global coordinate frame. 
    143144  /** 
    144145    Given a local coordinate frame (U,V,N) (i.e. U,V,N are  
    145146    the x,y,z axes of the local coordinate system) and 
    146     a vector 'loc' in the local coordiante system, this 
    147     function returns a the coordinates of the same vector 
     147    a std::vector 'loc' in the local coordiante system, this 
     148    function returns a the coordinates of the same std::vector 
    148149    in global frame (i.e. frame (1,0,0), (0,1,0), (0,0,1). 
    149150  */ 
     
    153154          const Vector3& N); 
    154155   
    155   /// Transforms a vector to a local coordinate frame. 
     156  /// Transforms a std::vector to a local coordinate frame. 
    156157  /** 
    157158    Given a local coordinate frame (U,V,N) (i.e. U,V,N are  
    158159    the x,y,z axes of the local coordinate system) and 
    159     a vector 'loc' in the global coordiante system, this 
    160     function returns a the coordinates of the same vector 
     160    a std::vector 'loc' in the global coordiante system, this 
     161    function returns a the coordinates of the same std::vector 
    161162    in the local frame. 
    162163  */ 
     
    166167          const Vector3& N); 
    167168 
    168   /// the magnitude=size of the vector 
     169  /// the magnitude=size of the std::vector 
    169170  friend inline float Magnitude(const Vector3 &v); 
    170   /// the squared magnitude of the vector .. for efficiency in some cases 
     171  /// the squared magnitude of the std::vector .. for efficiency in some cases 
    171172  friend inline float SqrMagnitude(const Vector3 &v); 
    172173  /// Magnitude(v1-v2) 
     
    175176  friend inline float SqrDistance(const Vector3 &v1, const Vector3 &v2); 
    176177 
    177   // creates the vector of unit size corresponding to given vector 
     178  // creates the std::vector of unit size corresponding to given std::vector 
    178179  friend inline Vector3 Normalize(const Vector3 &A); 
    179180 
    180   // Rotate a normal vector. 
     181  // Rotate a normal std::vector. 
    181182  friend Vector3 PlaneRotate(const Matrix4x4 &, const Vector3 &); 
    182183 
    183184  // construct view vectors .. DirAt is the main viewing direction 
    184   // Viewer is the coordinates of viewer location, UpL is the vector. 
     185  // Viewer is the coordinates of viewer location, UpL is the std::vector. 
    185186  friend void ViewVectors(const Vector3 &DirAt, const Vector3 &Viewer, 
    186187                                                  const Vector3 &UpL, Vector3 &ViewV, 
     
    224225  friend inline Vector3 CrossProd (const Vector3 &A, const Vector3 &B); 
    225226 
    226   friend ostream& operator<< (ostream &s, const Vector3 &A); 
    227   friend istream& operator>> (istream &s, Vector3 &A); 
     227  friend std::ostream& operator<< (std::ostream &s, const Vector3 &A); 
     228  friend std::istream& operator>> (std::istream &s, Vector3 &A); 
    228229     
    229230  friend void Minimize(Vector3 &min, const Vector3 &candidate); 
     
    477478 
    478479// Overload << operator for C++-style output 
    479 inline ostream& 
    480 operator<< (ostream &s, const Vector3 &A) 
     480inline std::ostream& 
     481operator<< (std::ostream &s, const Vector3 &A) 
    481482{ 
    482483  return s << "(" << A.x << ", " << A.y << ", " << A.z << ")"; 
     
    484485 
    485486// Overload >> operator for C++-style input 
    486 inline istream& 
    487 operator>> (istream &s, Vector3 &A) 
     487inline std::istream& 
     488operator>> (std::istream &s, Vector3 &A) 
    488489{ 
    489490  char a; 
Note: See TracChangeset for help on using the changeset viewer.