VR-Forces 4.0.4 Class Documentation
include/gdb/pointIM.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 1999 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 /*********************************************************************
00006 ** $RCSfile: pointIM.h,v $ $Revision: 1.8 $ $State: Exp $
00007 *********************************************************************/
00008 #ifndef pointIM_H_
00009 #define pointIM_H_
00010 
00011 #include "gdb/gdbDefines.h"
00012 #include "geometry/point.h"
00013 #include "gdb/indexedMarked.h"
00014 
00015 //
00016 // A DtPointIndexedMarked associates a specified DtPoint with an IndexedMarked
00017 // This is used by the DtVectorNetwork to remove duplicate vertices.
00018 // @see DtVectorNetwork
00019 //
00020 // @note This class has no virtual functions on purpose to reduce the size.  
00021 // Because an instance is created for every vertex during vertex reduction, the size
00022 // difference becomes important for large scenes.  Additionally, classes should
00023 // @b not be derived from this class.
00024 //
00025 class DT_DLL_gdb DtPointIndexedMarked
00026 {
00027 public:
00028 
00029    // default constructor
00030    DtPointIndexedMarked();
00031 
00032    // destructor
00033    ~DtPointIndexedMarked();
00034 
00035    // constructor from a parent
00036    DtPointIndexedMarked(DtPoint& orig);
00037 
00038    // copy constructor
00039    DtPointIndexedMarked(const DtPointIndexedMarked& orig);
00040 
00041    // assignment operator
00042    DtPointIndexedMarked& operator=(const DtPointIndexedMarked& orig);
00043 
00044    // This function replaces the sortWorldCoordinatePointsByX
00045    // @returns true if the specified other DtPointIndexedMarked
00046    // is larger.  
00047    // DtPointIndexedMarked point1 is < DtPointIndexedMarked point2 
00048    // iff its X, Y, and Z components are each < their corresponding component 
00049    // in point2.  The order is important.  If x1 < x2, then point1 < point2, 
00050    // even if y1 > y2 or z1 > z2.  
00051    // @note Essentially sorts in x direction, then y and then z only if the 
00052    // previous components are equal.  
00053    bool operator<(const DtPointIndexedMarked& other) const;
00054 
00055    DtPoint* point();
00056    const DtPoint* point() const;
00057 
00058    // access to the indexer
00059    DtIndexedMarked* indexer();
00060 
00061 protected:
00062 
00063    DtIndexedMarked myIndexer;
00064    DtPoint* myPoint;
00065 };
00066 
00067 
00068 #endif

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)