geometryOverrideHighPerformance/geometryOverrideHighPerformanceHelper.h

geometryOverrideHighPerformance/geometryOverrideHighPerformanceHelper.h
//-
// ==========================================================================
// Copyright 2018 Autodesk, Inc. All rights reserved.
//
// Use of this software is subject to the terms of the Autodesk
// license agreement provided at the time of installation or download,
// or which otherwise accompanies this software in either electronic
// or hard copy form.
// ==========================================================================
//+
#ifndef GeometryOverrideHighPerformanceHelper_h
#define GeometryOverrideHighPerformanceHelper_h
#include <vector>
#include <maya/MBoundingBox.h>
struct Float2
{
Float2() {}
Float2(float x, float y)
: x(x), y(y) {}
float x = 0;
float y = 0;
};
struct Float3
{
Float3() {}
Float3(float x, float y, float z)
: x(x), y(y), z(z) {}
float x = 0;
float y = 0;
float z = 0;
};
typedef std::vector<Float3> Float3Array;
typedef std::vector<Float2> Float2Array;
typedef std::vector<unsigned int> IndexList;
void createSphere(float radius,
unsigned int sliceCount,
unsigned int stackCount,
Float3Array& positions,
Float3Array& normals,
Float3Array& tangents,
Float3Array& biTangents,
Float2Array& texCoords,
IndexList& indices,
MBoundingBox& boundingBox
);
#endif // GeometryOverrideHighPerformanceHelper_h