godot/thirdparty/vhacd/src/vhacdVolume.cpp

/* Copyright (c) 2011 Khaled Mamou (kmamou at gmail dot com)
 All rights reserved.
 
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 
 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 
 3. The names of the contributors may not be used to endorse or promote products derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#ifndef _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_WARNINGS
#endif

#include "btConvexHullComputer.h"
#include "vhacdVolume.h"
#include <algorithm>
#include <float.h>
#include <math.h>
#include <queue>
#include <string.h>

#ifdef _MSC_VER
#pragma warning(disable:4458 4100)
#endif


namespace VHACD {
/********************************************************/
/* AABB-triangle overlap test code                      */
/* by Tomas Akenine-M�ller                              */
/* Function: int32_t triBoxOverlap(float boxcenter[3],      */
/*          float boxhalfsize[3],float triverts[3][3]); */
/* History:                                             */
/*   2001-03-05: released the code in its first version */
/*   2001-06-18: changed the order of the tests, faster */
/*                                                      */
/* Acknowledgement: Many thanks to Pierre Terdiman for  */
/* suggestions and discussions on how to optimize code. */
/* Thanks to David Hunt for finding a ">="-bug!         */
/********************************************************/

#define X
#define Y
#define Z
#define FINDMINMAX(x0, x1, x2, min, max)

#define AXISTEST_X01(a, b, fa, fb)

#define AXISTEST_X2(a, b, fa, fb)

#define AXISTEST_Y02(a, b, fa, fb)

#define AXISTEST_Y1(a, b, fa, fb)

#define AXISTEST_Z12(a, b, fa, fb)

#define AXISTEST_Z0(a, b, fa, fb)

int32_t PlaneBoxOverlap(const Vec3<double>& normal,
    const Vec3<double>& vert,
    const Vec3<double>& maxbox)
{}

int32_t TriBoxOverlap(const Vec3<double>& boxcenter,
    const Vec3<double>& boxhalfsize,
    const Vec3<double>& triver0,
    const Vec3<double>& triver1,
    const Vec3<double>& triver2)
{}

// Slightly modified version of  Stan Melax's code for 3x3 matrix diagonalization (Thanks Stan!)
// source: http://www.melax.com/diag.html?attredirects=0
void Diagonalize(const double (&A)[3][3], double (&Q)[3][3], double (&D)[3][3])
{}
const double TetrahedronSet::EPS =;
VoxelSet::VoxelSet()
{}
VoxelSet::~VoxelSet(void)
{}
void VoxelSet::ComputeBB()
{}
void VoxelSet::ComputeConvexHull(Mesh& meshCH, const size_t sampling) const
{}
void VoxelSet::GetPoints(const Voxel& voxel,
    Vec3<double>* const pts) const
{}
void VoxelSet::Intersect(const Plane& plane,
    SArray<Vec3<double> >* const positivePts,
    SArray<Vec3<double> >* const negativePts,
    const size_t sampling) const
{}
void VoxelSet::ComputeExteriorPoints(const Plane& plane,
    const Mesh& mesh,
    SArray<Vec3<double> >* const exteriorPts) const
{}
void VoxelSet::ComputeClippedVolumes(const Plane& plane,
    double& positiveVolume,
    double& negativeVolume) const
{}
void VoxelSet::SelectOnSurface(PrimitiveSet* const onSurfP) const
{}
void VoxelSet::Clip(const Plane& plane,
    PrimitiveSet* const positivePartP,
    PrimitiveSet* const negativePartP) const
{}
void VoxelSet::Convert(Mesh& mesh, const VOXEL_VALUE value) const
{}
void VoxelSet::ComputePrincipalAxes()
{}
Volume::Volume()
{}
Volume::~Volume(void)
{}
void Volume::Allocate()
{}
void Volume::Free()
{}
void Volume::FillOutsideSurface(const size_t i0,
    const size_t j0,
    const size_t k0,
    const size_t i1,
    const size_t j1,
    const size_t k1)
{}
void Volume::FillInsideSurface()
{}
void Volume::Convert(Mesh& mesh, const VOXEL_VALUE value) const
{}
void Volume::Convert(VoxelSet& vset) const
{}

void Volume::Convert(TetrahedronSet& tset) const
{}

void Volume::AlignToPrincipalAxes(double (&rot)[3][3]) const
{}
TetrahedronSet::TetrahedronSet()
{}
TetrahedronSet::~TetrahedronSet(void)
{}
void TetrahedronSet::ComputeBB()
{}
void TetrahedronSet::ComputeConvexHull(Mesh& meshCH, const size_t sampling) const
{}
inline bool TetrahedronSet::Add(Tetrahedron& tetrahedron)
{}

void TetrahedronSet::AddClippedTetrahedra(const Vec3<double> (&pts)[10], const int32_t nPts)
{}

void TetrahedronSet::Intersect(const Plane& plane,
    SArray<Vec3<double> >* const positivePts,
    SArray<Vec3<double> >* const negativePts,
    const size_t sampling) const
{}
void TetrahedronSet::ComputeExteriorPoints(const Plane& plane,
    const Mesh& mesh,
    SArray<Vec3<double> >* const exteriorPts) const
{}
void TetrahedronSet::ComputeClippedVolumes(const Plane& plane,
    double& positiveVolume,
    double& negativeVolume) const
{}

void TetrahedronSet::SelectOnSurface(PrimitiveSet* const onSurfP) const
{}
void TetrahedronSet::Clip(const Plane& plane,
    PrimitiveSet* const positivePartP,
    PrimitiveSet* const negativePartP) const
{}
void TetrahedronSet::Convert(Mesh& mesh, const VOXEL_VALUE value) const
{}
const double TetrahedronSet::ComputeVolume() const
{}
const double TetrahedronSet::ComputeMaxVolumeError() const
{}
void TetrahedronSet::RevertAlignToPrincipalAxes()
{}
void TetrahedronSet::ComputePrincipalAxes()
{}
void TetrahedronSet::AlignToPrincipalAxes()
{}
}