VR-Forces 4.0.4 Class Documentation
include/vrfExtObjects/3dAttachDescriptor.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 2010 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 /*********************************************************************
00006 ** $RCSfile: 3dAttachDescriptor.h,v $ $Revision: 1.1 $ $State: Exp $
00007 *********************************************************************/
00008 #ifndef attachDescriptor_H_
00009 #define attachDescriptor_H_
00010 
00011 class DtAttachmentDescriptor;
00012 
00013 #include <vlutil/vlNetTypes.h>
00014 
00015 #include <vrfExtObjects/vrfExtObjectsDefines.h>
00016 
00017 class DT_DLL_vrfExtObjects DtNetAttachmentDescriptor
00018 {
00019 public:
00020    DtNetInt32 myVertexIndex;
00021    DtNetFloat32 myPercentage;
00022 
00023    DtAttachmentDescriptor operator=(const DtAttachmentDescriptor&);
00024    DtNetAttachmentDescriptor& operator=(const DtNetAttachmentDescriptor&);
00025 };
00026 
00027 class DT_DLL_vrfExtObjects DtAttachmentDescriptor
00028 {
00029 public:
00031    DtAttachmentDescriptor();
00032 
00034    DtAttachmentDescriptor(int vIndex, float percent);
00035 
00037    DtAttachmentDescriptor(const DtAttachmentDescriptor& orig);
00038 
00040    DtAttachmentDescriptor& operator=(const DtAttachmentDescriptor& orig);
00041 
00043    DtAttachmentDescriptor(const DtNetAttachmentDescriptor& netDesc);
00044    
00046    operator DtNetAttachmentDescriptor() const;
00047 
00049    bool operator==(const DtAttachmentDescriptor& other) const;
00050    bool operator!=(const DtAttachmentDescriptor& other) const;
00051 
00053    virtual void setVertexIndex(int index);
00054    virtual int vertexIndex() const;
00055 
00057    virtual void setPercentage(float percent);
00058    virtual float percentage() const;
00059 protected:
00060    int    myVertexIndex;
00061    float  myPercentage;
00062 };
00063 
00064 class DT_DLL_vrfExtObjects DtAttachmentDescriptorList
00065 {
00066 public:
00068    DtAttachmentDescriptorList();
00069 
00071    virtual ~DtAttachmentDescriptorList();
00072 
00074    DtAttachmentDescriptorList(const DtAttachmentDescriptorList& orig);
00075 
00077    DtAttachmentDescriptorList& operator=(
00078       const DtAttachmentDescriptorList& orig);
00079 
00081    int operator==(const DtAttachmentDescriptorList& other) const;   
00082    int operator!=(const DtAttachmentDescriptorList& other) const;   
00083 
00086    virtual void setNumDescriptors(int num);
00087    virtual int numDescriptors() const;   
00088 
00090    virtual bool setDescriptor(int index, 
00091       const DtAttachmentDescriptor& desc);
00092 
00095    virtual const DtAttachmentDescriptor& descriptor(
00096       int index, bool* valid = 0) const;
00097 
00099    virtual void setFromNet(const void* netRep, int length);
00100 
00104    virtual const void* netRep(int* size = 0) const;
00105 
00107    virtual int netSize() const;
00108 
00109 protected:
00110    int                     myNumberOfDescriptors;
00111    DtAttachmentDescriptor* myDescriptors;   
00112    DtAttachmentDescriptor  myEmptyDescriptor;
00113    void*                   myNetRep;
00114 };
00115 
00116 #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)