#include "GeometryUtility.h"
FbxNode * CreatePyramid(
FbxScene * pScene,
const char * pName,
double pBottomWidth,
double pHeight)
{
const double lBottomWidthHalf = pBottomWidth / 2;
{
FbxVector4(lBottomWidthHalf, 0, lBottomWidthHalf),
FbxVector4(lBottomWidthHalf, 0, -lBottomWidthHalf),
FbxVector4(-lBottomWidthHalf, 0, -lBottomWidthHalf),
FbxVector4(-lBottomWidthHalf, 0, lBottomWidthHalf)
};
const int lControlPointCount =
sizeof(PyramidControlPointArray) /
sizeof(
FbxVector4);
for (int lIndex = 0; lIndex < lControlPointCount; ++lIndex)
{
}
return lPyramidNode;
}
typedef double Vector4[4];
typedef double Vector2[2];
{
static int vtxId[24] = {
0,1,2,3,
1,5,6,2,
5,4,7,6,
4,0,3,7,
0,4,5,1,
3,2,6,7
};
static Vector4 lControlPoints[8] = {
{ -5.0, 0.0, 5.0, 1.0}, { 5.0, 0.0, 5.0, 1.0}, { 5.0,10.0, 5.0, 1.0}, { -5.0,10.0, 5.0, 1.0},
{ -5.0, 0.0, -5.0, 1.0}, { 5.0, 0.0, -5.0, 1.0}, { 5.0,10.0, -5.0, 1.0}, { -5.0,10.0, -5.0, 1.0}
};
static Vector4 lNormals[8] = {
{-0.577350258827209,-0.577350258827209, 0.577350258827209, 1.0},
{ 0.577350258827209,-0.577350258827209, 0.577350258827209, 1.0},
{ 0.577350258827209, 0.577350258827209, 0.577350258827209, 1.0},
{-0.577350258827209, 0.577350258827209, 0.577350258827209, 1.0},
{-0.577350258827209,-0.577350258827209,-0.577350258827209, 1.0},
{ 0.577350258827209,-0.577350258827209,-0.577350258827209, 1.0},
{ 0.577350258827209, 0.577350258827209,-0.577350258827209, 1.0},
{-0.577350258827209, 0.577350258827209,-0.577350258827209, 1.0}
};
static Vector2 lUVs[14] = {
{ 0.0, 1.0},
{ 1.0, 0.0},
{ 0.0, 0.0},
{ 1.0, 1.0}
};
static int uvsId[24] = {
0,1,3,2,2,3,5,4,4,5,7,6,6,7,9,8,1,10,11,3,12,0,2,13
};
memcpy((
void*)vertex, (
void*)lControlPoints, 8*
sizeof(
FbxVector4));
int vId = 0;
for (int f=0; f<6; f++)
{
for (int v=0; v<4; v++)
}
for (int n=0; n<8; n++)
FBX_ASSERT( lUVElement1 !=
NULL);
for (int i = 0; i <4; i++)
for (int i = 0; i<24; i++)
return lNode;
}