Fix unresolved symbols in src/constraint.cpp when building libslvs.

pull/3/head
whitequark 2015-03-17 18:01:49 +03:00
parent ba8202d54a
commit 5894efcfe5
1 changed files with 5 additions and 5 deletions

View File

@ -52,6 +52,8 @@ char *Constraint::DescriptionString(void) {
return ret; return ret;
} }
#ifndef LIBRARY
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Delete all constraints with the specified type, entityA, ptA. We use this // Delete all constraints with the specified type, entityA, ptA. We use this
// when auto-removing constraints that would become redundant. // when auto-removing constraints that would become redundant.
@ -112,8 +114,6 @@ void Constraint::ConstrainCoincident(hEntity ptA, hEntity ptB) {
Entity::NO_ENTITY, Entity::NO_ENTITY, false, false); Entity::NO_ENTITY, Entity::NO_ENTITY, false, false);
} }
#ifndef LIBRARY
void Constraint::MenuConstrain(int id) { void Constraint::MenuConstrain(int id) {
Constraint c; Constraint c;
ZERO(&c); ZERO(&c);
@ -351,7 +351,7 @@ void Constraint::MenuConstrain(int id) {
c.entityA = gs.entity[0]; c.entityA = gs.entity[0];
c.ptA = gs.point[0]; c.ptA = gs.point[0];
c.ptB = gs.point[1]; c.ptB = gs.point[1];
} else if(gs.lineSegments == 1 && } else if(gs.lineSegments == 1 &&
((gs.workplanes == 1 && gs.n == 2) || ((gs.workplanes == 1 && gs.n == 2) ||
(gs.n == 1))) (gs.n == 1)))
{ {
@ -492,7 +492,7 @@ void Constraint::MenuConstrain(int id) {
// normal vector; allow that, since the numerical // normal vector; allow that, since the numerical
// constraint does // constraint does
SWAP(Vector, ru, rv); SWAP(Vector, ru, rv);
} }
fu = fu.Dot(ru) > 0 ? ru : ru.ScaledBy(-1); fu = fu.Dot(ru) > 0 ? ru : ru.ScaledBy(-1);
fv = fv.Dot(rv) > 0 ? rv : rv.ScaledBy(-1); fv = fv.Dot(rv) > 0 ? rv : rv.ScaledBy(-1);
@ -550,7 +550,7 @@ void Constraint::MenuConstrain(int id) {
return; return;
} }
Entity *ea = SK.GetEntity(c.entityA), Entity *ea = SK.GetEntity(c.entityA),
*eb = SK.GetEntity(c.entityB); *eb = SK.GetEntity(c.entityB);
if(ea->type == Entity::LINE_SEGMENT && if(ea->type == Entity::LINE_SEGMENT &&
eb->type == Entity::LINE_SEGMENT) eb->type == Entity::LINE_SEGMENT)