}
}
- delete repeatlist;
+ delete[] repeatlist;
return pointlist;
}
};
class ForEachFace : public BrushVisitor {
- Brush &m_brush;
public:
mutable int m_contentFlagsVis;
mutable int m_surfaceFlagsVis;
- ForEachFace(Brush &brush)
- : m_brush(brush)
+ ForEachFace()
{
m_contentFlagsVis = -1;
m_surfaceFlagsVis = -1;
{
Brush *brush = Node_getBrush(path.top());
if (brush != 0) {
- ForEachFace faces(*brush);
+ ForEachFace faces{};
brush->forEachFace(faces);
// contentflags?
if (m_content) {
const UB1Traits& ub1traits,
const UB4x1Traits& ub4x1traits
){
- register ub4 a,b,c,len;
+ ub4 a,b,c,len;
/* Set up the internal state */
len = length;
c += length;
switch ( len ) /* all the case statements fall through */
{
- case 11: c += ( ( ub4 ) UB1Traits::as_ub1( k[10] ) << 24 ); __attribute((fallthrough));
- case 10: c += ( ( ub4 ) UB1Traits::as_ub1( k[9] ) << 16 ); __attribute((fallthrough));
- case 9: c += ( ( ub4 ) UB1Traits::as_ub1( k[8] ) << 8 ); __attribute((fallthrough));
+ case 11: c += ( ( ub4 ) UB1Traits::as_ub1( k[10] ) << 24 ); [[clang::fallthrough]];
+ case 10: c += ( ( ub4 ) UB1Traits::as_ub1( k[9] ) << 16 ); [[clang::fallthrough]];
+ case 9: c += ( ( ub4 ) UB1Traits::as_ub1( k[8] ) << 8 ); [[clang::fallthrough]];
/* the first byte of c is reserved for the length */
- case 8: b += ( ( ub4 ) UB1Traits::as_ub1( k[7] ) << 24 ); __attribute((fallthrough));
- case 7: b += ( ( ub4 ) UB1Traits::as_ub1( k[6] ) << 16 ); __attribute((fallthrough));
- case 6: b += ( ( ub4 ) UB1Traits::as_ub1( k[5] ) << 8 ); __attribute((fallthrough));
- case 5: b += UB1Traits::as_ub1( k[4] ); __attribute((fallthrough));
- case 4: a += ( ( ub4 ) UB1Traits::as_ub1( k[3] ) << 24 ); __attribute((fallthrough));
- case 3: a += ( ( ub4 ) UB1Traits::as_ub1( k[2] ) << 16 ); __attribute((fallthrough));
- case 2: a += ( ( ub4 ) UB1Traits::as_ub1( k[1] ) << 8 ); __attribute((fallthrough));
+ case 8: b += ( ( ub4 ) UB1Traits::as_ub1( k[7] ) << 24 ); [[clang::fallthrough]];
+ case 7: b += ( ( ub4 ) UB1Traits::as_ub1( k[6] ) << 16 ); [[clang::fallthrough]];
+ case 6: b += ( ( ub4 ) UB1Traits::as_ub1( k[5] ) << 8 ); [[clang::fallthrough]];
+ case 5: b += UB1Traits::as_ub1( k[4] ); [[clang::fallthrough]];
+ case 4: a += ( ( ub4 ) UB1Traits::as_ub1( k[3] ) << 24 ); [[clang::fallthrough]];
+ case 3: a += ( ( ub4 ) UB1Traits::as_ub1( k[2] ) << 16 ); [[clang::fallthrough]];
+ case 2: a += ( ( ub4 ) UB1Traits::as_ub1( k[1] ) << 8 ); [[clang::fallthrough]];
case 1: a += UB1Traits::as_ub1( k[0] );
/* case 0: nothing left to add */
}
ub4 initval, /* the previous hash, or an arbitrary value */
const UB4Traits& ub4traits
){
- register ub4 a,b,c,len;
+ ub4 a,b,c,len;
/* Set up the internal state */
len = length;
Test test;
const Test& testconst = test;
{
- Callback<void()> a = makeCallbackF(&test0free);
+ Callback<void()> a = makeCallbackF(test0free);
Callback<void()> b = Test::Test0Caller( test );
b = makeCallback( Test::Test0(), test );
Callback<void()> c = Test::Test0ConstCaller( testconst );
}
{
typedef Callback<void(A1)> TestCallback1;
- TestCallback1 a = makeCallbackF(&test1free);
+ TestCallback1 a = makeCallbackF(test1free);
TestCallback1 b = Test::Test1Caller( test );
b = makeCallback( Test::Test1(), test );
TestCallback1 c = Test::Test1ConstCaller( testconst );
namespace detail {
template<class Type>
- struct ConvertFromOpaque {
+ struct ConvertToOpaque {
};
- // reference
+ template<class Type>
+ struct ConvertFromOpaque {
+ };
- template<class T>
- inline const void *convertToOpaque(const T &t) {
- return &t;
- }
+ // pointer
template<class T>
- struct ConvertFromOpaque<const T &> {
- static T const &apply(void *p) {
- return *static_cast<const T *>(p);
+ struct ConvertToOpaque<T const *> {
+ static void const *apply(const T *t) {
+ return t;
}
};
template<class T>
- inline void *convertToOpaque(T &t) {
- return &t;
- }
-
- template<class T>
- struct ConvertFromOpaque<T &> {
- static T &apply(void *p) {
- return *static_cast<T *>( p );
+ struct ConvertFromOpaque<T const *> {
+ static T const *apply(void const *p) {
+ return static_cast<T const *>(p);
}
};
- // pointer
-
template<class T>
- inline const void *convertToOpaque(const T *t) {
- return t;
- }
-
- template<class T>
- struct ConvertFromOpaque<const T *> {
- static const T *apply(void *p) {
- return static_cast<const T *>(p);
+ struct ConvertToOpaque<T *> {
+ static void *apply(T *t) {
+ return t;
}
};
- template<class T>
- inline void *convertToOpaque(T *t) {
- return t;
- }
-
template<class T>
struct ConvertFromOpaque<T *> {
static T *apply(void *p) {
}
};
- // function pointer
-
- template<class R, class... Ts>
- inline const void *convertToOpaque(R(*const &t)(Ts...)) {
- return &t;
- }
-
- template<class R, class... Ts>
- struct ConvertFromOpaque<R(*const &)(Ts...)> {
- using Type = R(*)(Ts...);
+ // reference
- static Type const &apply(void *p) {
- return *static_cast<Type *>(p);
+ template<class T>
+ struct ConvertToOpaque<T const &> {
+ static void const *apply(T const &t) {
+ return &t;
}
};
- template<class R, class... Ts>
- inline void *convertToOpaque(R(*&t)(Ts...)) {
- return &t;
- }
+ template<class T>
+ struct ConvertFromOpaque<T const &> {
+ static T const &apply(void const *p) {
+ return *static_cast<T const *>(p);
+ }
+ };
- template<class R, class... Ts>
- struct ConvertFromOpaque<R(*&)(Ts...)> {
- using Type = R(*)(Ts...);
+ template<class T>
+ struct ConvertToOpaque<T &> {
+ static void *apply(T &t) {
+ return &t;
+ }
+ };
- static Type &apply(void *p) {
- return *static_cast<Type *>(p);
- }
- };
+ template<class T>
+ struct ConvertFromOpaque<T &> {
+ static T &apply(void *p) {
+ return *static_cast<T *>( p );
+ }
+ };
template<class Caller, class F>
class BindFirstOpaqueN;
}
void *getEnvironment() const {
- return const_cast<void *>(detail::convertToOpaque(firstBound));
+ return const_cast<void *>(detail::ConvertToOpaque<FirstBound>::apply(firstBound));
}
};
const int DEFAULTnet_hostport = 26000;
-const int MAXHOSTNAMELEN = 256;
+#define MAXHOSTNAMELEN 256
static int net_acceptsocket = -1; // socket for fielding new connections
static int net_controlsocket;
from "Graphics Gems", Academic Press, 1990
*/
-const int NUMDIM = 3;
+#define NUMDIM 3
const int RIGHT = 0;
const int LEFT = 1;
const int MIDDLE = 2;
#endif
int matrix_solve_ge( vec_t* matrix, vec_t* aug, vec3_t x ){
- const int N = 3;
+ #define N 3
int indx[N];
int c,r;
int i;
#endif
continue;
}
- else if ( ( p_index_LUT[triangle->index_xyz[j]].next == NULL ) ) { // Not equal to Main entry, and no LL entry
+ else if ( p_index_LUT[triangle->index_xyz[j]].next == NULL ) { // Not equal to Main entry, and no LL entry
// Add first entry of LL from Main
p_index_LUT2 = (index_LUT_t *)_pico_alloc( sizeof( index_LUT_t ) );
if ( p_index_LUT2 == NULL ) {
const int MD2_MAX_VERTS = 2048;
const int MD2_MAX_FRAMES = 512;
const int MD2_MAX_MD2SKINS = 32;
-const int MD2_MAX_SKINNAME = 64;
+#define MD2_MAX_SKINNAME 64
typedef struct index_LUT_s
{
continue;
}
- else if ( ( p_index_LUT[p_md2Triangle->index_xyz[j]].next == NULL ) ) { // Not equal to Main entry, and no LL entry
+ else if ( p_index_LUT[p_md2Triangle->index_xyz[j]].next == NULL ) { // Not equal to Main entry, and no LL entry
// Add first entry of LL from Main
p_index_LUT2 = (index_LUT_t *)_pico_alloc( sizeof( index_LUT_t ) );
if ( p_index_LUT2 == NULL ) {
/* ms3d limits */
const int MS3D_MAX_VERTS = 8192;
const int MS3D_MAX_TRIS = 16384;
-const int MS3D_MAX_GROUPS = 128;
+#define MS3D_MAX_GROUPS 128
const int MS3D_MAX_MATERIALS = 128;
const int MS3D_MAX_JOINTS = 128;
const int MS3D_MAX_KEYFRAMES = 216;
// chain
+template <class DST, class SRC, class X, class A>
+struct PropertyChainImpl {
+ static void ExportThunk(const Callback<void(DST)> &self, SRC value) {
+ PropertyImpl<SRC, DST>::Export(value, self);
+ }
+
+ static void Export(const X &self, const Callback<void(DST)> &returnz) {
+ A::Get::thunk_(self, ConstReferenceCaller<Callback<void(DST)>, void(SRC), ExportThunk>(returnz));
+ }
+
+ static void Import(X &self, DST value) {
+ SRC out;
+ PropertyImpl<SRC, DST>::Import(out, value);
+ A::Set::thunk_(self, out);
+ }
+};
+
template<class I_Outer, class I_Inner>
Property<detail::propertyimpl_other<I_Outer>> make_property_chain(detail::propertyimpl_self<I_Inner> &it) {
using DST = detail::propertyimpl_other<I_Outer>;
using SRC = detail::propertyimpl_self<I_Outer>;
using X = detail::propertyimpl_self<I_Inner>;
-
using A = property_impl<I_Inner>;
- struct I {
- static void ExportThunk(const Callback<void(DST)> &self, SRC value) {
- PropertyImpl<SRC, DST>::Export(value, self);
- }
-
- static void Export(const X &self, const Callback<void(DST)> &returnz) {
- A::Get::thunk_(self, ConstReferenceCaller<Callback<void(DST)>, void(SRC), ExportThunk>(returnz));
- }
-
- static void Import(X &self, DST value) {
- SRC out;
- PropertyImpl<SRC, DST>::Import(out, value);
- A::Set::thunk_(self, out);
- }
- };
- return make_property<PropertyAdaptor<X, DST, I>>(it);
+ return make_property<PropertyAdaptor<X, DST, PropertyChainImpl<DST, SRC, X, A>>>(it);
}
+template <class DST, class SRC, class A>
+struct PropertyChainImpl_free {
+ static void ExportThunk(const Callback<void(DST)> &self, SRC value) {
+ PropertyImpl<SRC, DST>::Export(value, self);
+ }
+
+ static void Export(const Callback<void(DST)> &returnz) {
+ A::Get::thunk_(nullptr, ConstReferenceCaller<Callback<void(DST)>, void(SRC), ExportThunk>(returnz));
+ }
+
+ static void Import(DST value) {
+ SRC out;
+ PropertyImpl<SRC, DST>::Import(out, value);
+ A::Set::thunk_(nullptr, out);
+ }
+};
+
template<class I_Outer, class I_Inner>
Property<detail::propertyimpl_other<I_Outer>> make_property_chain() {
using DST = detail::propertyimpl_other<I_Outer>;
using SRC = detail::propertyimpl_self<I_Outer>;
-
using A = property_impl_free<I_Inner>;
- struct I {
- static void ExportThunk(const Callback<void(DST)> &self, SRC value) {
- PropertyImpl<SRC, DST>::Export(value, self);
- }
-
- static void Export(const Callback<void(DST)> &returnz) {
- A::Get::thunk_(nullptr, ConstReferenceCaller<Callback<void(DST)>, void(SRC), ExportThunk>(returnz));
- }
-
- static void Import(DST value) {
- SRC out;
- PropertyImpl<SRC, DST>::Import(out, value);
- A::Set::thunk_(nullptr, out);
- }
- };
- return make_property<PropertyAdaptorFree<DST, I>>();
+ return make_property<PropertyAdaptorFree<DST, PropertyChainImpl_free<DST, SRC, A>>>();
}
// specializations
}
};
-class ObservedSelectable : public Selectable
+class ObservedSelectable final : public Selectable
{
SelectionChangeCallback m_onchanged;
bool m_selected;
>::type
>;
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wkeyword-macro"
#define this (verify<self>::test(*static_cast<self>(const_cast<pointer_remove_const<decltype(this)>::type>(this))))
+#pragma clang diagnostic pop
IMPL(Editable, GTK_EDITABLE);
}
}
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wkeyword-macro"
#define this (*static_cast<self>(this))
+#pragma clang diagnostic pop
template<class Lambda>
gulong Object::connect(char const *detailed_signal, Lambda &&c_handler, void *data)
CopiedString m_savefilename;
xmlDocPtr doc;
xmlXPathContextPtr context;
-xmlNodeSetPtr nodePtr;
xmlXPathObjectPtr XpathEval( const char* queryString ){
xmlChar* expression = (xmlChar*)queryString;
virtual TreeXMLImporter &child() = 0;
};
-class SubPrimitiveImporter : public TreeXMLImporter {
+class SubPrimitiveImporter final : public TreeXMLImporter {
XMLImporter *m_importer;
public:
SubPrimitiveImporter(XMLImporter *importer) : m_importer(importer)
}
};
-class PrimitiveImporter : public TreeXMLImporter {
+class PrimitiveImporter final : public TreeXMLImporter {
scene::Node &m_parent;
XMLImporter *m_importer;
char m_child[sizeof(SubPrimitiveImporter)];
}
};
-class EntityImporter : public TreeXMLImporter {
+class EntityImporter final : public TreeXMLImporter {
scene::Node &m_parent;
char m_node[sizeof(NodeSmartReference)];
char m_child[sizeof(PrimitiveImporter)];
#include "traverselib.h"
#include "render.h"
-class VectorLightList : public LightList {
+class VectorLightList final : public LightList {
typedef std::vector<const RendererLight *> Lights;
Lights m_lights;
public:
#include "traverselib.h"
#include "render.h"
-class VectorLightList : public LightList {
+class VectorLightList final : public LightList {
typedef std::vector<const RendererLight *> Lights;
Lights m_lights;
public:
}
const char *ext = strrchr(name, '.');
- char tmppath[PATH_MAX];
+ char tmppath[PATH_MAX + 1];
if (is_dpk_vfs) {
if (!!ext && !string_compare_nocase_upper(ext, ".dpkdir")) {
typedef const Plane3 *PlanePointer;
typedef PlanePointer *PlanesIterator;
-class VectorLightList : public LightList {
+class VectorLightList final : public LightList {
typedef std::vector<const RendererLight *> Lights;
Lights m_lights;
public:
}
};
+template <class Widget, class Self, class T, class native>
+struct AddDataCustomWrapper {
+ static void Export(const native &self, const Callback<void(T)> &returnz)
+ {
+ native *p = &const_cast<native &>(self);
+ auto widget = Self::from(p);
+ Widget::Get::thunk_(widget, returnz);
+ }
+
+ static void Import(native &self, T value)
+ {
+ native *p = &self;
+ auto widget = Self::from(p);
+ Widget::Set::thunk_(widget, value);
+ }
+};
+
template<class Widget>
void AddDataCustom(DialogDataList &self, typename Widget::Type widget, Property<typename Widget::Other> const &property)
{
using Self = typename Widget::Type;
using T = typename Widget::Other;
using native = typename std::remove_pointer<typename Self::native>::type;
- struct Wrapper {
- static void Export(const native &self, const Callback<void(T)> &returnz)
- {
- native *p = &const_cast<native &>(self);
- auto widget = Self::from(p);
- Widget::Get::thunk_(widget, returnz);
- }
-
- static void Import(native &self, T value)
- {
- native *p = &self;
- auto widget = Self::from(p);
- Widget::Set::thunk_(widget, value);
- }
- };
- self.push_back(new CallbackDialogData<typename Widget::Other>(
- make_property<PropertyAdaptor<native, T, Wrapper>>(*static_cast<native *>(widget)),
+ self.push_back(new CallbackDialogData<T>(
+ make_property<PropertyAdaptor<native, T, AddDataCustomWrapper<Widget, Self, T, native>>>(*static_cast<native *>(widget)),
property
));
}
}
};
- class AttributeImporter : public TreeXMLImporter {
+ class AttributeImporter final : public TreeXMLImporter {
StringOutputStream &m_comment;
public:
}
- class ClassImporter : public TreeXMLImporter {
+ class ClassImporter final : public TreeXMLImporter {
EntityClassCollector &m_collector;
EntityClass *m_eclass;
StringOutputStream m_comment;
}
};
- class ItemImporter : public TreeXMLImporter {
+ class ItemImporter final : public TreeXMLImporter {
public:
ItemImporter(ListAttributeType &list, const XMLElement &element)
{
return string_equal(name, "item");
}
- class ListAttributeImporter : public TreeXMLImporter {
+ class ListAttributeImporter final : public TreeXMLImporter {
ListAttributeType *m_listType;
Storage<ItemImporter> m_item;
public:
return string_equal(name, "list");
}
- class ClassesImporter : public TreeXMLImporter {
+ class ClassesImporter final : public TreeXMLImporter {
EntityClassCollector &m_collector;
Storage<ClassImporter> m_class;
Storage<ListAttributeImporter> m_list;
}
}
-struct ModelResource : public Resource {
+struct ModelResource final : public Resource {
NodeSmartReference m_model;
const CopiedString m_originalName;
CopiedString m_path;
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#if !defined( INCLUDEDE_SCENEGRAPH_H )
+#if !defined( INCLUDED_SCENEGRAPH_H )
#define INCLUDED_SCENEGRAPH_H
#endif
char *m_sBSPName;
// buffer we use in push mode to receive data directly from the network
xmlParserInputBufferPtr m_xmlInputBuffer;
- xmlParserInputPtr m_xmlInput;
xmlParserCtxtPtr m_xmlParserCtxt;
// call this to switch the set listening mode
hypotSide = 2;
origin = 1;
}
+ else {
+ assert(0);
+ }
len[hypotSide] = -1;
if ( len[0] > len[1] && len[0] > len[2] ) {
else if ( len[2] > len[0] && len[2] > len[1] ) {
longestSide = 2;
}
+ else {
+ assert(0);
+ }
len[longestSide] = -1;
if ( len[0] > len[1] && len[0] > len[2] ) {
else if ( len[2] > len[0] && len[2] > len[1] ) {
shortestSide = 2;
}
+ else {
+ assert(0);
+ }
len[shortestSide] = -1;
continue;
}
}
- if ( abs( DotProduct( vert[0]->xyz, buildPlane->normal ) - buildPlane->dist ) >= distanceEpsilon ) {
+ if ( fabsf( DotProduct( vert[0]->xyz, buildPlane->normal ) - buildPlane->dist ) >= distanceEpsilon ) {
continue;
}
- if ( abs( DotProduct( vert[1]->xyz, buildPlane->normal ) - buildPlane->dist ) >= distanceEpsilon ) {
+ if ( fabsf( DotProduct( vert[1]->xyz, buildPlane->normal ) - buildPlane->dist ) >= distanceEpsilon ) {
continue;
}
- if ( abs( DotProduct( vert[2]->xyz, buildPlane->normal ) - buildPlane->dist ) >= distanceEpsilon ) {
+ if ( fabsf( DotProduct( vert[2]->xyz, buildPlane->normal ) - buildPlane->dist ) >= distanceEpsilon ) {
continue;
}
// Okay. Correct surface type, correct shader, correct plane. Let's start with the business...
/* return to sender */
return 0;
-}
\ No newline at end of file
+}
/* multiply by texture color */
if ( !RadSampleImage( si->lightImage->pixels, si->lightImage->width, si->lightImage->height, rw->verts[ samples ].st, textureColor ) ) {
VectorCopy( si->averageColor, textureColor );
- textureColor[ 4 ] = 255.0f;
+ textureColor[ 3 ] = 255.0f;
}
for ( i = 0; i < 3; i++ )
color[ i ] = ( textureColor[ i ] / 255 ) * ( rw->verts[ samples ].color[ lightmapNum ][ i ] / 255.0f );
/* multiply by texture color */
if ( !RadSampleImage( si->lightImage->pixels, si->lightImage->width, si->lightImage->height, st, textureColor ) ) {
VectorCopy( si->averageColor, textureColor );
- textureColor[ 4 ] = 255;
+ textureColor[ 3 ] = 255;
}
for ( i = 0; i < 3; i++ )
color[ i ] = ( textureColor[ i ] / 255 ) * ( radLuxel[ i ] / 255 );
static qboolean SubmapRawLuxel( rawLightmap_t *lm, int x, int y, float bx, float by, int *sampleCluster, vec3_t sampleOrigin, vec3_t sampleNormal ){
int i, *cluster, *cluster2;
- float *origin, *origin2, *normal; //% , *normal2;
+ float *origin = NULL, *origin2 = NULL, *normal; //% , *normal2;
vec3_t originVecs[ 2 ]; //% , normalVecs[ 2 ];
Sys_FPrintf( SYS_WRN, "WARNING: Spurious lightmap S vector\n" );
}
- VectorSubtract( origin2, origin, originVecs[ 0 ] );
+ if (origin && origin2) {
+ VectorSubtract(origin2, origin, originVecs[0]);
+ }
//% VectorSubtract( normal2, normal, normalVecs[ 0 ] );
+ origin = origin2 = NULL;
+
/* calulate y vector */
if ( ( y < ( lm->sh - 1 ) && bx >= 0.0f ) || ( y == 0 && bx <= 0.0f ) ) {
cluster = SUPER_CLUSTER( x, y );
Sys_FPrintf( SYS_WRN, "WARNING: Spurious lightmap T vector\n" );
}
- VectorSubtract( origin2, origin, originVecs[ 1 ] );
+ if (origin && origin2) {
+ VectorSubtract(origin2, origin, originVecs[1]);
+ }
/* calculate new origin */
for ( i = 0; i < 3; i++ )
inside = qfalse;
tree->outside_node.occupied = 0;
- tripped = qfalse;
+ tripped = NULL;
c_floodedleafs = 0;
for ( i = 1; i < numEntities; i++ )
{
struct foliage_s *next;
char model[ MAX_QPATH ];
float scale, density, odds;
- qboolean inverseAlpha;
+ int inverseAlpha;
}
foliage_t;
/* determine error squared */
VectorSubtract( color, si->averageColor, delta );
- delta[ 3 ] = color[ 3 ] - si->averageColor[ 3 ];
+ delta[ 3 ] = color[ 3 ] - 255;
dist = delta[ 0 ] * delta[ 0 ] + delta[ 1 ] * delta[ 1 ] + delta[ 2 ] * delta[ 2 ] + delta[ 3 ] * delta[ 3 ];
if ( dist < bestDist ) {
si->stFlat[ 0 ] = st[ 0 ];
else if ( !Q_stricmp( token, "sun" ) /* sof2 */ || !Q_stricmp( token, "q3map_sun" ) || !Q_stricmp( token, "q3map_sunExt" ) ) {
float a, b;
sun_t *sun;
- qboolean ext;
+ qboolean ext = qfalse;
/* ydnar: extended sun directive? */
edge->kingpinLength = edge->edge[ edge->kingpin ];
VectorNormalize( edge->edge, edge->edge );
- edge->edge[ 3 ] = DotProduct( a, edge->edge );
- edge->length = DotProduct( b, edge->edge ) - edge->edge[ 3 ];
+ edge->length = DotProduct( b, edge->edge ) - DotProduct( a, edge->edge );
/* create perpendicular plane that edge lies in */
CrossProduct( plane, edge->edge, edge->plane );