#ifndef GeometryOverrideHighPerformance_h
#define GeometryOverrideHighPerformance_h
#include "geometryOverrideHighPerformanceHelper.h"
#include <maya/MPxGeometryOverride.h>
#include <maya/MPxSurfaceShape.h>
#include <maya/MFloatVector.h>
#include <maya/MHWGeometry.h>
#include <maya/MHWGeometryUtilities.h>
#include <maya/MDagMessage.h>
#include <vector>
{
public:
static void * creator()
{
return new GeometryOverrideHighPerformance_shape();
}
~GeometryOverrideHighPerformance_shape() override;
bool isBounded()
const override {
return true; }
void setSizeChangedSinceVP2Update(bool value);
bool evalSizeChangedSinceVP2Update();
bool evalInputMeshChangedSinceVP2Update();
void setInputMeshChangedSinceVP2Update(bool value);
bool evalInputMeshGeoChangedSinceVP2Update();
void setInputMeshGeoChangedSinceVP2Update(bool value);
bool evalMaterialChangedSinceVP2Update();
void setMaterialChangedSinceVP2Update(bool value);
const Float3Array& getPositions() const { return fPositions; }
const Float3Array& getNormals() const { return fNormals; }
const Float3Array& getTangents() const { return fTangents; }
const Float3Array& getBiTangents() const { return fBiTangents; }
const Float2Array & getTexCoords() const { return fTextureCoords; }
const IndexList& getIndices() const { return fIndices; }
public:
static MObject fsInputMeshBoundingBoxMin;
static MObject fsInputMeshBoundingBoxMax;
static MObject fsSizeChangedSinceVP2Update;
static MObject fsInputMeshGeoChanged;
private:
GeometryOverrideHighPerformance_shape();
static Float3Array fPositions;
static Float3Array fNormals;
static Float3Array fTangents;
static Float3Array fBiTangents;
static Float2Array fTextureCoords;
static IndexList fIndices;
bool fUseInputMesh = false;
};
{
public:
{
return new GeometryOverrideHighPerformance(obj);
}
~GeometryOverrideHighPerformance() override;
private:
GeometryOverrideHighPerformance(
const MObject& obj);
void updateWireframeItems(const char* renderItemName, MGeometry::DrawMode mode, unsigned int depthPriority,
private:
static const char* sActiveWireframeRenderItemName;
static const char* sDormantWireframeRenderItemName;
static const char* sCustomShadedItemName;
GeometryOverrideHighPerformance_shape* fMesh = nullptr;
MColor fWireframeDisplayColor;
float fSizeMultiplier = 1.0f;
};
#endif // GeometryOverrideHighPerformance_h