[drape] add depth attribute

This commit is contained in:
ExMix 2014-01-10 12:57:51 +03:00 committed by Alex Zolotarev
parent 7e232d12d7
commit 459acded9f
2 changed files with 9 additions and 1 deletions

View file

@ -7,9 +7,15 @@ namespace df
{
AreaShape::AreaShape(const Color & c)
: m_color(c)
, m_depth(0.0f)
{
}
void AreaShape::SetDepth(float depth)
{
m_depth = depth;
}
void AreaShape::AddTriangle(const m2::PointF & v1,
const m2::PointF & v2,
const m2::PointF & v3)
@ -38,7 +44,7 @@ namespace df
provider.InitStream(0, info, MakeStackRefPointer((void *)&m_vertexes[0]));
}
vector<float> depthMemory(m_vertexes.size(), 0.0);
vector<float> depthMemory(m_vertexes.size(), m_depth);
{
BindingInfo info(1);
BindingDecl & decl = info.GetBindingDecl(0);

View file

@ -14,6 +14,7 @@ namespace df
{
public:
AreaShape(Color const & c);
void SetDepth(float depth);
void AddTriangle(const m2::PointF & v1,
const m2::PointF & v2,
@ -24,5 +25,6 @@ namespace df
private:
Color m_color;
vector<m2::PointF> m_vertexes;
float m_depth;
};
}