RenderItemHandle.h

Go to the documentation of this file.
00001 //
00002 // Copyright 2010 Autodesk, Inc.  All rights reserved.
00003 //
00004 // Use of this software is subject to the terms of the Autodesk license
00005 // agreement provided at the time of installation or download, or which 
00006 // otherwise accompanies this software in either electronic or hard copy form.   
00007 //
00008 //
00009 
00010 #pragma once
00011 
00012 #include "./SmartHandle.h"
00013 #include "./GeometryEnums.h"
00014 #include "../containers/Array.h"
00015 
00016 class Mesh;
00017 class MNMesh;
00018 
00019 namespace MaxSDK { namespace Graphics {
00020 
00025 enum RenderItemCategory
00026 {
00030     RenderItemCategorySolidMesh              = 0x00000001, 
00031 
00035     RenderItemCategoryDiagonalMesh           = 0x00000002, 
00036 
00040     RenderItemCategoryEdgeMesh               = 0x00000004, 
00041 
00045     RenderItemCategorySubObjectVertexTicks   = 0x00000008, 
00046 
00051     RenderItemCategorySubObjectEdgeMesh      = 0x00000010, 
00052 
00056     RenderItemCategoryOtherSubObjects        = 0x00000020, 
00057 
00062     RenderItemCategoryGizmo                  = 0x00000040, 
00063 };
00064 
00072 class RenderItemHandle : public SmartHandle
00073 {
00074 public:
00075     GraphicsDriverAPI RenderItemHandle();
00076     GraphicsDriverAPI RenderItemHandle(const RenderItemHandle& from);
00077     GraphicsDriverAPI RenderItemHandle& operator = (const RenderItemHandle& from);
00078     GraphicsDriverAPI virtual ~RenderItemHandle();
00079 
00088     GraphicsDriverAPI void SetCategory(RenderItemCategory category);
00089 
00093     GraphicsDriverAPI RenderItemCategory GetCategory() const;
00094 
00101     MAX_DEPRECATED GraphicsDriverAPI void SetCustomMaterial(const BaseMaterialHandle& hMaterial);
00102 
00107     MAX_DEPRECATED GraphicsDriverAPI BaseMaterialHandle GetCustomMaterial() const;
00108 
00109 };
00110 
00113 typedef MaxSDK::Array<RenderItemHandle> RenderItemHandleArray;
00114 
00127 GraphicsDriverAPI void GenerateRenderItems(
00128     RenderItemHandleArray& renderItems, 
00129     Mesh* pMaxMesh, 
00130     unsigned long renderItemCategoryFlags, 
00131     const MaterialRequiredStreams& requiredStreams);
00132 
00147 GraphicsDriverAPI void GenerateRenderItems(
00148     RenderItemHandleArray& renderItems, 
00149     MNMesh* pMaxMesh, 
00150     unsigned long renderItemCategoryFlags, 
00151     const MaterialRequiredStreams& requiredStreams);
00152 } } // end namespace