Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
MeshTransport.h
Upload User: kellyonhid
Upload Date: 2013-10-12
Package Size: 932k
Code Size: 2k
Category:
3D Graphic
Development Platform:
Visual C++
- //############################################################
- //
- // MeshTransport.h
- //
- // Matt Ginzton
- // Tue Feb 9 16:38:33 CET 1999
- //
- // Wrapper class for sending geometry information, as one or
- // more triangle meshes, from point a to b, managing memory
- // issues along the way.
- //
- //############################################################
- #ifndef _MESHTRANSPORT_H_
- #define _MESHTRANSPORT_H_
- #include <vector.h>
- #ifdef WIN32
- # include "winGLdecs.h"
- #endif
- #include <GL/gl.h>
- #include "Pnt3.h"
- #include "Xform.h"
- #include "Bbox.h"
- #include "defines.h"
- class MeshTransport {
- public:
- MeshTransport();
- ~MeshTransport();
- vector<const vector<Pnt3>*> vtx;
- vector< Xform<float> > xf;
- vector<Bbox> bbox;
- vector<const vector<int>*> tri_inds;
- vector<const vector<uchar>*> color;
- static const GLenum normal_type;
- #ifdef SCZ_NORMAL_FORCEFLOAT
- vector<const vector<float>*> nrm;
- #else
- vector<const vector<short>*> nrm;
- #endif
- enum TransportMode { copy, share, steal };
- void setVtx (const vector<Pnt3>* in, TransportMode mode,
- const Xform<float>& xfBy = Xform<float>());
- void setBbox (const Bbox& in);
- void setNrm (const vector<short>* in, TransportMode mode);
- void setTris (const vector<int>* in, TransportMode mode);
- void setColor (const vector<uchar>* in, TransportMode mode);
- void appendMT (MeshTransport* in,
- const Xform<float>& xfBy = Xform<float>());
- #ifdef SCZ_NORMAL_FORCEFLOAT
- private:
- void setNrm (const vector<float>* in, TransportMode mode);
- #endif
- private:
- vector<bool> freeVtx;
- vector<bool> freeNrm;
- vector<bool> freeTris;
- vector<bool> freeColor;
- };
- #endif // _MESHTRANSPORT_H_