-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathObject.cpp
More file actions
39 lines (31 loc) · 1.03 KB
/
Object.cpp
File metadata and controls
39 lines (31 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include "Object.h"
//-----------------------------------------------------------------------------
Object::Object(
double i_isolevel,
const gmtl::Vec3f &i_lowerLimits,
const gmtl::Vec3f &i_higherLimits
):
m_lowerLimits(i_lowerLimits),
m_higherLimits(i_higherLimits),
m_isolevel(i_isolevel)
{
}
//-----------------------------------------------------------------------------
double Object::functionValue(const gmtl::Vec3f &i_point)
{
// the equation of a sphere passing through the origin with radius 3
return i_point[0]*i_point[0]+i_point[1]*i_point[1]+i_point[2]*i_point[2]-9;
}
//-----------------------------------------------------------------------------
const gmtl::Vec3f Object::getMinLimits()const
{
return m_lowerLimits;
}
//-----------------------------------------------------------------------------
const gmtl::Vec3f Object::getMaxLimits()const
{
return m_higherLimits;
}
//-----------------------------------------------------------------------------
Object::~Object()
{}