#include "nameable.h"
#include "ifilter.h"
#include "imap.h"
+#include "ipatch.h"
#include "cullable.h"
#include "renderable.h"
#include "editable.h"
#include "debugging/debugging.h"
#include <set>
+#include <limits>
#include "math/frustum.h"
#include "string/string.h"
#include "stringio.h"
#include "shaderlib.h"
#include "generic/callback.h"
+#include "signal/signalfwd.h"
#include "texturelib.h"
#include "xml/ixml.h"
#include "dragplanes.h"
Vector3 right;
};
-const std::size_t BEZIERCURVETREE_MAX_INDEX = 1 << ((sizeof(std::size_t) * 8) - 1);
+const std::size_t BEZIERCURVETREE_MAX_INDEX = std::size_t(1) << (std::numeric_limits<std::size_t>::digits - 1);
struct BezierCurveTree
{
return VertexPointer(VertexPointer::pointer(&array->vertex), sizeof(ArbitraryMeshVertex));
}
-class PatchControl
-{
-public:
- Vector3 m_vertex;
- Vector2 m_texcoord;
-};
-
typedef PatchControl* PatchControlIter;
typedef const PatchControl* PatchControlConstIter;
bool patch_filtered(Patch& patch);
void add_patch_filter(PatchFilter& filter, int mask, bool invert = false);
-void Patch_addTextureChangedCallback(const Callback& callback);
+void Patch_addTextureChangedCallback(const SignalHandler& handler);
void Patch_textureChanged();
inline void BezierCurveTreeArray_deleteAll(Array<BezierCurveTree*>& curveTrees)
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())));
}
}