//===========================================================================// // Copyright (C) Microsoft Corporation. All rights reserved. // //===========================================================================// #pragma once #define MLR_MLRPOLYMESH_HPP #if !defined(MLR_MLR_HPP) #include #endif #if !defined(MLR_MLRPRIMITIVE_HPP) #include #endif namespace MidLevelRenderer { //########################################################################## //######################## MLRPolyMesh ############################### //########################################################################## class MLRPolyMesh: public MLRPrimitive { //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Initialization // public: static void InitializeClass(); static void TerminateClass(); //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Constructors/Destructors // protected: MLRPolyMesh( Stuff::MemoryStream *stream, int version ); ~MLRPolyMesh(); public: MLRPolyMesh(); static MLRPolyMesh* Make( Stuff::MemoryStream *stream, int version ); void Save(Stuff::MemoryStream *stream); virtual void SetPrimitiveLength(unsigned char *, int); virtual void GetPrimitiveLength(unsigned char **, int*); void FindFacePlanes(); virtual int FindBackFace(const Stuff::Point3D&); const Stuff::Plane *GetPolygonPlane(int i) { Check_Object(this); Verify(i testList; Stuff::DynamicArrayOf facePlanes; }; MLRPolyMesh* CreateCube(Stuff::Scalar, Stuff::RGBAColor*, Stuff::Vector3D*, MLRState*); }