#include "nameable.h"
#include "ifilter.h"
#include "imap.h"
+#include "ipatch.h"
#include "cullable.h"
#include "renderable.h"
#include "editable.h"
return VertexPointer(VertexPointer::pointer(&array->vertex), sizeof(ArbitraryMeshVertex));
}
-class PatchControl
-{
-public:
- Vector3 m_vertex;
- Vector2 m_texcoord;
-};
-
typedef PatchControl* PatchControlIter;
typedef const PatchControl* PatchControlConstIter;
class PatchTesselation
{
public:
+ PatchTesselation()
+ : m_numStrips(0), m_lenStrips(0), m_nArrayWidth(0), m_nArrayHeight(0)
+ {
+ }
Array<ArbitraryMeshVertex> m_vertices;
Array<RenderIndex> m_indices;
std::size_t m_numStrips;
TransformNode(other),
Bounded(other),
Cullable(other),
+ Snappable(),
Undoable(other),
Filterable(other),
Nameable(other),
evaluateTransform();
UpdateCachedData();
}
+ bool isValid() const;
void snapto(float snap)
{
return m_ctrl.data() + m_ctrl.size();
}
+ PatchControlArray& getControlPoints()
+ {
+ return m_ctrl;
+ }
PatchControlArray& getControlPointsTransformed()
{
return m_ctrlTransformed;
if(m_dragPlanes.isSelected()) // this should only be true when the transform is a pure translation.
{
- m_patch.transform(m_dragPlanes.evaluateTransform(matrix.t()));
+ m_patch.transform(m_dragPlanes.evaluateTransform(vector4_to_vector3(matrix.t())));
}
}