-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathBaseSourceOps.cs
52 lines (38 loc) · 1.28 KB
/
BaseSourceOps.cs
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
40
41
42
43
44
45
46
47
48
49
50
51
52
// Copyright (c) Ryan Schmidt (rms@gradientspace.com) - All Rights Reserved
// Unauthorized copying of this file, via any medium is strictly prohibited. Proprietary and confidential.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using g3;
namespace gs
{
public abstract class BaseDMeshSourceOp : BaseSingleOutputModelingOperator, DMeshSourceOp
{
/*
* IMeshSourceOp / DMeshSourceOp interface you have to implement
*/
public abstract IMesh GetIMesh();
public abstract DMesh3 GetDMeshUnsafe();
public abstract bool HasSpatial { get; }
public abstract ISpatial GetSpatial();
public abstract DMesh3 ExtractDMesh();
DMeshModifierStack Modifiers;
public BaseDMeshSourceOp()
{
Modifiers = new DMeshModifierStack();
}
public virtual void AppendModifier(DMeshModifier modifier)
{
Modifiers.Append(modifier);
}
public virtual void ApplyModifiers(DMesh3 mesh)
{
Modifiers.Apply(mesh);
}
protected virtual DMesh3 make_failure_output(DMesh3 lastOKMesh, bool bCopy = true)
{
return DMeshOpUtil.MakeFailureOutput(lastOKMesh, bCopy);
}
}
}