Skip to content

Commit cd7091a

Browse files
committed
Remove translation from point node.
1 parent e7d6ab6 commit cd7091a

File tree

3 files changed

+0
-68
lines changed

3 files changed

+0
-68
lines changed

Sources/Basic3DNodes/Basic3DNodes.cpp

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ NE::DynamicSerializationInfo PointNode::serializationInfo (NE::ObjectId ("{F387D
1313
NE::DynamicSerializationInfo VectorNode::serializationInfo (NE::ObjectId ("{72FD83E7-EE2A-4F16-BAEC-5447554B93A5}"), NE::ObjectVersion (1), VectorNode::CreateSerializableInstance);
1414
NE::DynamicSerializationInfo LinePointsNode::serializationInfo (NE::ObjectId ("{6228348D-9DE5-43DA-A3D8-7AA59BEE551A}"), NE::ObjectVersion (1), LinePointsNode::CreateSerializableInstance);
1515
NE::DynamicSerializationInfo ArcPointsNode::serializationInfo (NE::ObjectId ("{968F0889-E537-4A0F-9D76-4E0378868AB2}"), NE::ObjectVersion (1), ArcPointsNode::CreateSerializableInstance);
16-
NE::DynamicSerializationInfo PointTranslationNode::serializationInfo (NE::ObjectId ("{23F99EC7-E0E1-42FB-88BD-239A27F1E24E}"), NE::ObjectVersion (1), PointTranslationNode::CreateSerializableInstance);
1716

1817
PointNodeBase::PointNodeBase () :
1918
PointNodeBase (L"", NUIE::Point ())
@@ -434,52 +433,3 @@ NE::Stream::Status ArcPointsNode::Write (NE::OutputStream& outputStream) const
434433
PointNodeBase::Write (outputStream);
435434
return outputStream.GetStatus ();
436435
}
437-
438-
PointTranslationNode::PointTranslationNode () :
439-
PointTranslationNode (L"", NUIE::Point ())
440-
{
441-
442-
}
443-
444-
PointTranslationNode::PointTranslationNode (const std::wstring& name, const NUIE::Point& position) :
445-
BI::BasicUINode (name, position)
446-
{
447-
448-
}
449-
450-
void PointTranslationNode::Initialize ()
451-
{
452-
RegisterUIInputSlot (NUIE::UIInputSlotPtr (new NUIE::UIInputSlot (NE::SlotId ("point"), L"Point", NE::ValuePtr (new PointValue (glm::dvec3 (0.0, 0.0, 0.0))), NE::OutputSlotConnectionMode::Single)));
453-
RegisterUIOutputSlot (NUIE::UIOutputSlotPtr (new NUIE::UIOutputSlot (NE::SlotId ("transformation"), L"Transformation")));
454-
}
455-
456-
NE::ValueConstPtr PointTranslationNode::Calculate (NE::EvaluationEnv& env) const
457-
{
458-
NE::ValueConstPtr pointValue = EvaluateInputSlot (NE::SlotId ("point"), env);
459-
if (!NE::IsComplexType<CoordinateValue> (pointValue)) {
460-
return nullptr;
461-
}
462-
463-
NE::ListValuePtr result (new NE::ListValue ());
464-
NE::FlatEnumerate (pointValue, [&] (const NE::ValueConstPtr& val) {
465-
glm::dvec3 offset (CoordinateValue::Get (val));
466-
glm::dmat4 transformation = glm::translate (glm::dmat4 (1.0), offset);
467-
result->Push (NE::ValuePtr (new TransformationValue (transformation)));
468-
});
469-
470-
return result;
471-
}
472-
473-
NE::Stream::Status PointTranslationNode::Read (NE::InputStream& inputStream)
474-
{
475-
NE::ObjectHeader header (inputStream);
476-
BI::BasicUINode::Read (inputStream);
477-
return inputStream.GetStatus ();
478-
}
479-
480-
NE::Stream::Status PointTranslationNode::Write (NE::OutputStream& outputStream) const
481-
{
482-
NE::ObjectHeader header (outputStream, serializationInfo);
483-
BI::BasicUINode::Write (outputStream);
484-
return outputStream.GetStatus ();
485-
}

Sources/Basic3DNodes/Basic3DNodes.hpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -126,19 +126,4 @@ class ArcPointsNode : public PointNodeBase
126126
virtual NE::Stream::Status Write (NE::OutputStream& outputStream) const override;
127127
};
128128

129-
class PointTranslationNode : public BI::BasicUINode
130-
{
131-
DYNAMIC_SERIALIZABLE (PointTranslationNode);
132-
133-
public:
134-
PointTranslationNode ();
135-
PointTranslationNode (const std::wstring& name, const NUIE::Point& position);
136-
137-
virtual void Initialize () override;
138-
virtual NE::ValueConstPtr Calculate (NE::EvaluationEnv& env) const override;
139-
140-
virtual NE::Stream::Status Read (NE::InputStream& inputStream) override;
141-
virtual NE::Stream::Status Write (NE::OutputStream& outputStream) const override;
142-
};
143-
144129
#endif

Sources/VisualScriptCAD/Editor/NodeRegistry.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,6 @@ NodeRegistry::NodeRegistry () :
112112
RegisterNode (L"Matrix Nodes", L"Translation Matrix",
113113
[] (const NUIE::Point& position) { return NUIE::UINodePtr (new TranslationMatrixNode (L"Translation Matrix", position)); }
114114
);
115-
RegisterNode (L"Matrix Nodes", L"Translation From Point",
116-
[] (const NUIE::Point& position) { return NUIE::UINodePtr (new PointTranslationNode (L"Translation From Point", position)); }
117-
);
118115
RegisterNode (L"Matrix Nodes", L"Rotation Matrix",
119116
[] (const NUIE::Point& position) { return NUIE::UINodePtr (new RotationMatrixNode (L"Rotation Matrix", position)); }
120117
);

0 commit comments

Comments
 (0)