/*----------------------------------------------------------------------------*/ /* RectanglePrimitive_PropertySheet.h */ /*----------------------------------------------------------------------------*/ // Copyright (c) 2007 Scenomics. All Rights Reserved. You may not alter or remove this copyright notice. #if !defined(RECTANGLEPRIMITIVE_H) #define RECTANGLEPRIMITIVE_H #include "Vec.h" #include "Modifier.h" SCENOMEPLATFORMAPI_BEGINS; class Material; class Model3D; class Map_PointerToPointer; /*----------------------------------------------------------------------------*/ /* RectanglePrimitive Declaration */ /*----------------------------------------------------------------------------*/ class SPA_PARAMETRIC_CLASS RectanglePrimitive: public Modifier { protected: //@c Data //@ This data member stores the bounding box X-axis minimum point. Coord minX; //@ This data member stores the bounding box Y-axis minimum point. Coord minY; //@ This data member stores the bounding box X-axis maximum point. Coord maxX; //@ This data member stores the bounding box Y-axis maximum point. Coord maxY; //@ This data member stores the material for the box. MaterialSink pMaterial; //@ This data member stores the x subdivision resolution. int xRes; //@ This data member stores the y subdivision resolution. int yRes; //@ This data member stores a flag indicating if the box draws triangles //@ or quadrilaterals. int bTriangulate; public: //@c Constructors, Destructors, and Type Methods RectanglePrimitive(); RectanglePrimitive(const RectanglePrimitive ©); virtual ~RectanglePrimitive(); TYPEOF(RectanglePrimitive) //@c Box Methods void SetRectangle(const Coord *pDims); void GetRectangle(Coord *pDims) const; inline Coord GetXMin() const; inline Coord GetXMax() const; inline Coord GetYMin() const; inline Coord GetYMax() const; inline void SetXMin( Coord p_fX ); inline void SetXMax( Coord p_fX ); inline void SetYMin( Coord p_fY ); inline void SetYMax( Coord p_fY ); Material *GetMaterial() const; const MaterialSink & GetMaterialLink() const { return pMaterial; } void SetMaterial( Node * p_poMaterial ); void SetResolution(const int *pXYZRes); void GetResolution(int *pXYZRes) const; void SetTriangulate(const int i_bTriangulate); int GetTriangulate() const; //@c Operators int operator =(const RectanglePrimitive ©); int Swap(RectanglePrimitive &swap, int p_nSwapFlags); //@c Hierarchy Methods virtual void SetModel(Model3D *pModel, int updateDependencies=0); virtual int ListDependencies( DependencyMap & p_roMap ); virtual int EditDependencies( DependencyMap & p_roMap ); virtual Node *Clone(); //@c Persistence, Storage, and Transmission Methods virtual int Read(TypeIO &IO); virtual int Write(TypeIO &IO); //@c Mesh Generation virtual int Apply(ModifierParams & p_roApply); virtual int GenerateHandles(); virtual int SetHandles( const VecArray & p_ravHandles ); }; inline Coord RectanglePrimitive::GetXMin() const { return minX; } inline Coord RectanglePrimitive::GetXMax() const { return maxX; } inline Coord RectanglePrimitive::GetYMin() const { return minY; } inline Coord RectanglePrimitive::GetYMax() const { return maxY; } inline void RectanglePrimitive::SetXMin( Coord p_fX ) { minX = p_fX; } inline void RectanglePrimitive::SetXMax( Coord p_fX ) { maxX = p_fX; } inline void RectanglePrimitive::SetYMin( Coord p_fY ) { minY = p_fY; } inline void RectanglePrimitive::SetYMax( Coord p_fY ) { maxY = p_fY; } SCENOMEPLATFORMAPI_ENDS; // !RECTANGLEPRIMITIVE_H #endif