summaryrefslogtreecommitdiff
path: root/src/primitives.cc
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2011-06-05 17:55:50 (GMT)
committerMarius Kintel <marius@kintel.net>2011-06-05 17:55:50 (GMT)
commitc807f9bbd1622292b32eb39c21133d7a0a548fc8 (patch)
tree98ef197205a63b74e434571b00be4fbcadd25ddd /src/primitives.cc
parent8d9c0cccf07bac61c8ed4bb26c6007cccc218008 (diff)
Windows build fixes from Kliment Yanev
Diffstat (limited to 'src/primitives.cc')
-rw-r--r--src/primitives.cc15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/primitives.cc b/src/primitives.cc
index e2e5602..5180c16 100644
--- a/src/primitives.cc
+++ b/src/primitives.cc
@@ -34,6 +34,8 @@
#include "printutils.h"
#include <assert.h>
+#define F_MINIMUM 0.01
+
enum primitive_type_e {
CUBE,
SPHERE,
@@ -57,7 +59,6 @@ class PrimitiveNode : public AbstractPolyNode
public:
bool center;
double x, y, z, h, r1, r2;
- static const double F_MINIMUM = 0.01;
double fn, fs, fa;
primitive_type_e type;
int convexity;
@@ -106,13 +107,13 @@ AbstractNode *PrimitiveModule::evaluate(const Context *ctx, const ModuleInstanti
node->fs = c.lookup_variable("$fs").num;
node->fa = c.lookup_variable("$fa").num;
- if (node->fs < PrimitiveNode::F_MINIMUM) {
- PRINTF("WARNING: $fs too small - clamping to %f", PrimitiveNode::F_MINIMUM);
- node->fs = PrimitiveNode::F_MINIMUM;
+ if (node->fs < F_MINIMUM) {
+ PRINTF("WARNING: $fs too small - clamping to %f", F_MINIMUM);
+ node->fs = F_MINIMUM;
}
- if (node->fa < PrimitiveNode::F_MINIMUM) {
- PRINTF("WARNING: $fa too small - clamping to %f", PrimitiveNode::F_MINIMUM);
- node->fa = PrimitiveNode::F_MINIMUM;
+ if (node->fa < F_MINIMUM) {
+ PRINTF("WARNING: $fa too small - clamping to %f", F_MINIMUM);
+ node->fa = F_MINIMUM;
}
contact: Jan Huwald // Impressum