Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

DepthSortObj.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *cr                                                                       
00003  *cr            (C) Copyright 1995-2019 The Board of Trustees of the           
00004  *cr                        University of Illinois                       
00005  *cr                         All Rights Reserved                        
00006  *cr                                                                   
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  * RCS INFORMATION:
00011  *
00012  *      $RCSfile: DepthSortObj.h,v $
00013  *      $Author: johns $       $Locker:  $             $State: Exp $
00014  *      $Revision: 1.17 $       $Date: 2019/01/17 21:20:59 $
00015  *
00016  ***************************************************************************
00017  * DESCRIPTION:
00018  *
00019  ***************************************************************************/
00020 #ifndef DEPTHSORTOBJECT_H
00021 #define DEPTHSORTOBJECT_H
00022 
00023 #include "Matrix4.h"
00024 
00025 // We only need to have support for the following objects, which are the
00026 // PostScript-level objects that get written:
00027 //   triangles
00028 //   quadrilaterals
00029 //   points
00030 //   lines
00031 //   text
00032 // We can do this by just having the number of coordinates (this
00033 // uniquely defines the object), and the color/material information.
00034 
00037 class DepthSortObject {
00038 public:
00039    float *points;     
00040    float light_scale; 
00041    int npoints;       
00042    int color;         
00043    float dist;        
00044    char* text;        
00045 
00046    DepthSortObject() : light_scale(0.0f), npoints(0), color(0), text(NULL) {}
00047 
00048    int operator>(const DepthSortObject& cmp) {
00049       return dist > cmp.dist;
00050    }
00051 
00052    int operator<(const DepthSortObject& cmp) {
00053       return dist < cmp.dist;
00054    }
00055 };
00056 
00057 #endif

Generated on Wed Apr 24 02:42:17 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002