Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/yafray/intern')
-rwxr-xr-xsource/blender/yafray/intern/export_File.cpp108
-rw-r--r--source/blender/yafray/intern/export_Plugin.cpp44
-rw-r--r--source/blender/yafray/intern/export_Plugin.h6
-rw-r--r--source/blender/yafray/intern/yafexternal.h1
4 files changed, 105 insertions, 54 deletions
diff --git a/source/blender/yafray/intern/export_File.cpp b/source/blender/yafray/intern/export_File.cpp
index 070ff9abc01..25e51a1b0bb 100755
--- a/source/blender/yafray/intern/export_File.cpp
+++ b/source/blender/yafray/intern/export_File.cpp
@@ -157,7 +157,7 @@ bool yafrayFileRender_t::initExport()
#ifdef WIN32
// try to create it
cout << "Trying to create...\n";
- if (createDir(xmlpath.c_str())==0) dir_failed=true; else dir_failed=false;
+ if (createDir(const_cast<char*>(xmlpath.c_str()))==0) dir_failed=true; else dir_failed=false;
#else
dir_failed = true;
#endif
@@ -1048,7 +1048,8 @@ void yafrayFileRender_t::writeMaterialsAndModulators()
else if ((mtex->texco & TEXCO_GLOB) || (mtex->texco & TEXCO_OBJECT))
// object mode is also set as global, but the object matrix was specified above with <modulator..>
ostr << "\t\t<texco value=\"global\" />\n";
- else if (mtex->texco & TEXCO_ORCO)
+ else if ((mtex->texco & TEXCO_ORCO) || (mtex->texco & TEXCO_STRAND))
+ // orco flag now used for 'strand'-mapping as well, see mesh code
ostr << "\t\t<texco value=\"orco\" />\n";
else if (mtex->texco & TEXCO_WINDOW)
ostr << "\t\t<texco value=\"window\" />\n";
@@ -1217,10 +1218,13 @@ void yafrayFileRender_t::writeObject(Object* obj, const vector<VlakRen*> &VLR_li
// Test the rendermaterial texco flag instead.
// update2: bug #3193 it seems it has changed again with the introduction of static 'hair' particles,
// now it uses the vert pointer again as an extra test to make sure there are orco coords available
- bool EXPORT_ORCO = (((face0mat->texco & TEXCO_ORCO)!=0) && (face0->v1->orco!=NULL));
+ int has_orco = 0;
+ if (face0mat->texco & TEXCO_STRAND)
+ has_orco = 1;
+ else
+ has_orco = (((face0mat->texco & TEXCO_ORCO)!=0) && (face0->v1->orco!=NULL)) ? 2 : 0;
- string has_orco = "off";
- if (EXPORT_ORCO) has_orco = "on";
+ string has_orco_st = has_orco ? "on" : "off";
// smooth shading if enabled
bool no_auto = true; //in case non-mesh, or mesh has no autosmooth
@@ -1229,7 +1233,7 @@ void yafrayFileRender_t::writeObject(Object* obj, const vector<VlakRen*> &VLR_li
if (mesh->flag & ME_AUTOSMOOTH) {
no_auto = false;
ostr.str("");
- ostr << "\t<mesh autosmooth=\"" << mesh->smoothresh << "\" has_orco=\"" << has_orco << "\" >\n";
+ ostr << "\t<mesh autosmooth=\"" << mesh->smoothresh << "\" has_orco=\"" << has_orco_st << "\" >\n";
xmlfile << ostr.str();
}
}
@@ -1239,9 +1243,9 @@ void yafrayFileRender_t::writeObject(Object* obj, const vector<VlakRen*> &VLR_li
// or flat shaded, the smooth flag of the first face is used to determine
// the shading for the whole mesh
if (face0->flag & ME_SMOOTH)
- xmlfile << "\t<mesh autosmooth=\"180\" has_orco=\"" << has_orco << "\" >\n";
+ xmlfile << "\t<mesh autosmooth=\"180\" has_orco=\"" << has_orco_st << "\" >\n";
else
- xmlfile << "\t<mesh autosmooth=\"0.1\" has_orco=\"" << has_orco << "\" >\n"; //0 shows artefacts
+ xmlfile << "\t<mesh autosmooth=\"0.1\" has_orco=\"" << has_orco_st << "\" >\n"; //0 shows artefacts
}
// now all vertices
@@ -1271,13 +1275,19 @@ void yafrayFileRender_t::writeObject(Object* obj, const vector<VlakRen*> &VLR_li
MTC_cp3Float(ver->co, tvec);
MTC_Mat4MulVecfl(imat, tvec);
ostr << "\t\t\t<p x=\"" << tvec[0]
- << "\" y=\"" << tvec[1]
- << "\" z=\"" << tvec[2] << "\" />\n";
- if (EXPORT_ORCO) {
+ << "\" y=\"" << tvec[1]
+ << "\" z=\"" << tvec[2] << "\" />\n";
+ // has_orco now an int, if 1 -> strand mapping, if 2 -> normal orco mapping
+ if (has_orco==1) {
+ ostr << "\t\t\t<p x=\"" << ver->accum
+ << "\" y=\"" << ver->accum
+ << "\" z=\"" << ver->accum << "\" />\n";
+ }
+ else if (has_orco==2) {
orco = ver->orco;
ostr << "\t\t\t<p x=\"" << orco[0]
- << "\" y=\"" << orco[1]
- << "\" z=\"" << orco[2] << "\" />\n";
+ << "\" y=\"" << orco[1]
+ << "\" z=\"" << orco[2] << "\" />\n";
}
}
if (vert_idx.find(vlr->v2)==vert_idx.end()) {
@@ -1286,13 +1296,19 @@ void yafrayFileRender_t::writeObject(Object* obj, const vector<VlakRen*> &VLR_li
MTC_cp3Float(ver->co, tvec);
MTC_Mat4MulVecfl(imat, tvec);
ostr << "\t\t\t<p x=\"" << tvec[0]
- << "\" y=\"" << tvec[1]
- << "\" z=\"" << tvec[2] << "\" />\n";
- if (EXPORT_ORCO) {
+ << "\" y=\"" << tvec[1]
+ << "\" z=\"" << tvec[2] << "\" />\n";
+ // has_orco now an int, if 1 -> strand mapping, if 2 -> normal orco mapping
+ if (has_orco==1) {
+ ostr << "\t\t\t<p x=\"" << ver->accum
+ << "\" y=\"" << ver->accum
+ << "\" z=\"" << ver->accum << "\" />\n";
+ }
+ else if (has_orco==2) {
orco = ver->orco;
ostr << "\t\t\t<p x=\"" << orco[0]
- << "\" y=\"" << orco[1]
- << "\" z=\"" << orco[2] << "\" />\n";
+ << "\" y=\"" << orco[1]
+ << "\" z=\"" << orco[2] << "\" />\n";
}
}
if (vert_idx.find(vlr->v3)==vert_idx.end()) {
@@ -1301,13 +1317,19 @@ void yafrayFileRender_t::writeObject(Object* obj, const vector<VlakRen*> &VLR_li
MTC_cp3Float(ver->co, tvec);
MTC_Mat4MulVecfl(imat, tvec);
ostr << "\t\t\t<p x=\"" << tvec[0]
- << "\" y=\"" << tvec[1]
- << "\" z=\"" << tvec[2] << "\" />\n";
- if (EXPORT_ORCO) {
+ << "\" y=\"" << tvec[1]
+ << "\" z=\"" << tvec[2] << "\" />\n";
+ // has_orco now an int, if 1 -> strand mapping, if 2 -> normal orco mapping
+ if (has_orco==1) {
+ ostr << "\t\t\t<p x=\"" << ver->accum
+ << "\" y=\"" << ver->accum
+ << "\" z=\"" << ver->accum << "\" />\n";
+ }
+ else if (has_orco==2) {
orco = ver->orco;
ostr << "\t\t\t<p x=\"" << orco[0]
- << "\" y=\"" << orco[1]
- << "\" z=\"" << orco[2] << "\" />\n";
+ << "\" y=\"" << orco[1]
+ << "\" z=\"" << orco[2] << "\" />\n";
}
}
if ((vlr->v4) && (vert_idx.find(vlr->v4)==vert_idx.end())) {
@@ -1316,13 +1338,19 @@ void yafrayFileRender_t::writeObject(Object* obj, const vector<VlakRen*> &VLR_li
MTC_cp3Float(ver->co, tvec);
MTC_Mat4MulVecfl(imat, tvec);
ostr << "\t\t\t<p x=\"" << tvec[0]
- << "\" y=\"" << tvec[1]
- << "\" z=\"" << tvec[2] << "\" />\n";
- if (EXPORT_ORCO) {
+ << "\" y=\"" << tvec[1]
+ << "\" z=\"" << tvec[2] << "\" />\n";
+ // has_orco now an int, if 1 -> strand mapping, if 2 -> normal orco mapping
+ if (has_orco==1) {
+ ostr << "\t\t\t<p x=\"" << ver->accum
+ << "\" y=\"" << ver->accum
+ << "\" z=\"" << ver->accum << "\" />\n";
+ }
+ else if (has_orco==2) {
orco = ver->orco;
ostr << "\t\t\t<p x=\"" << orco[0]
- << "\" y=\"" << orco[1]
- << "\" z=\"" << orco[2] << "\" />\n";
+ << "\" y=\"" << orco[1]
+ << "\" z=\"" << orco[2] << "\" />\n";
}
}
xmlfile << ostr.str();
@@ -1352,7 +1380,7 @@ void yafrayFileRender_t::writeObject(Object* obj, const vector<VlakRen*> &VLR_li
int idx2 = vert_idx.find(vlr->v2)->second;
int idx3 = vert_idx.find(vlr->v3)->second;
// make sure the indices point to the vertices when orco coords exported
- if (EXPORT_ORCO) { idx1*=2; idx2*=2; idx3*=2; }
+ if (has_orco) { idx1*=2; idx2*=2; idx3*=2; }
ostr.str("");
ostr << "\t\t\t<f a=\"" << idx1 << "\" b=\"" << idx2 << "\" c=\"" << idx3 << "\"";
@@ -1368,8 +1396,8 @@ void yafrayFileRender_t::writeObject(Object* obj, const vector<VlakRen*> &VLR_li
TFace* uvc = vlr->tface; // possible uvcoords (v upside down)
if (uvc) {
ostr << " u_a=\"" << uvc->uv[ui1][0] << "\" v_a=\"" << 1-uvc->uv[ui1][1] << "\""
- << " u_b=\"" << uvc->uv[ui2][0] << "\" v_b=\"" << 1-uvc->uv[ui2][1] << "\""
- << " u_c=\"" << uvc->uv[ui3][0] << "\" v_c=\"" << 1-uvc->uv[ui3][1] << "\"";
+ << " u_b=\"" << uvc->uv[ui2][0] << "\" v_b=\"" << 1-uvc->uv[ui2][1] << "\""
+ << " u_c=\"" << uvc->uv[ui3][0] << "\" v_c=\"" << 1-uvc->uv[ui3][1] << "\"";
}
// since Blender seems to need vcols when uvs are used, for yafray only export when the material actually uses vcols
@@ -1377,13 +1405,13 @@ void yafrayFileRender_t::writeObject(Object* obj, const vector<VlakRen*> &VLR_li
// vertex colors
unsigned char* pt = reinterpret_cast<unsigned char*>(&vlr->vcol[ui1]);
ostr << " vcol_a_r=\"" << (float)pt[3]/255.f << "\" vcol_a_g=\"" << (float)pt[2]/255.f
- << "\" vcol_a_b=\"" << (float)pt[1]/255.f << "\"";
+ << "\" vcol_a_b=\"" << (float)pt[1]/255.f << "\"";
pt = reinterpret_cast<unsigned char*>(&vlr->vcol[ui2]);
ostr << " vcol_b_r=\"" << (float)pt[3]/255.f << "\" vcol_b_g=\"" << (float)pt[2]/255.f
- << "\" vcol_b_b=\"" << (float)pt[1]/255.f << "\"";
+ << "\" vcol_b_b=\"" << (float)pt[1]/255.f << "\"";
pt = reinterpret_cast<unsigned char*>(&vlr->vcol[ui3]);
ostr << " vcol_c_r=\"" << (float)pt[3]/255.f << "\" vcol_c_g=\"" << (float)pt[2]/255.f
- << "\" vcol_c_b=\"" << (float)pt[1]/255.f << "\"";
+ << "\" vcol_c_b=\"" << (float)pt[1]/255.f << "\"";
}
ostr << " shader_name=\"" << fmatname << "\" />\n";
@@ -1394,7 +1422,7 @@ void yafrayFileRender_t::writeObject(Object* obj, const vector<VlakRen*> &VLR_li
idx3 = vert_idx.find(vlr->v1)->second;
// make sure the indices point to the vertices when orco coords exported
- if (EXPORT_ORCO) { idx1*=2; idx2*=2; idx3*=2; }
+ if (has_orco) { idx1*=2; idx2*=2; idx3*=2; }
ostr << "\t\t\t<f a=\"" << idx1 << "\" b=\"" << idx2 << "\" c=\"" << idx3 << "\"";
@@ -1405,20 +1433,20 @@ void yafrayFileRender_t::writeObject(Object* obj, const vector<VlakRen*> &VLR_li
if (uvc) {
ostr << " u_a=\"" << uvc->uv[ui1][0] << "\" v_a=\"" << 1-uvc->uv[ui1][1] << "\""
- << " u_b=\"" << uvc->uv[ui2][0] << "\" v_b=\"" << 1-uvc->uv[ui2][1] << "\""
- << " u_c=\"" << uvc->uv[ui3][0] << "\" v_c=\"" << 1-uvc->uv[ui3][1] << "\"";
+ << " u_b=\"" << uvc->uv[ui2][0] << "\" v_b=\"" << 1-uvc->uv[ui2][1] << "\""
+ << " u_c=\"" << uvc->uv[ui3][0] << "\" v_c=\"" << 1-uvc->uv[ui3][1] << "\"";
}
if ((EXPORT_VCOL) && (vlr->vcol)) {
// vertex colors
unsigned char* pt = reinterpret_cast<unsigned char*>(&vlr->vcol[ui1]);
ostr << " vcol_a_r=\"" << (float)pt[3]/255.f << "\" vcol_a_g=\"" << (float)pt[2]/255.f
- << "\" vcol_a_b=\"" << (float)pt[1]/255.f << "\"";
+ << "\" vcol_a_b=\"" << (float)pt[1]/255.f << "\"";
pt = reinterpret_cast<unsigned char*>(&vlr->vcol[ui2]);
ostr << " vcol_b_r=\"" << (float)pt[3]/255.f << "\" vcol_b_g=\"" << (float)pt[2]/255.f
- << "\" vcol_b_b=\"" << (float)pt[1]/255.f << "\"";
+ << "\" vcol_b_b=\"" << (float)pt[1]/255.f << "\"";
pt = reinterpret_cast<unsigned char*>(&vlr->vcol[ui3]);
ostr << " vcol_c_r=\"" << (float)pt[3]/255.f << "\" vcol_c_g=\"" << (float)pt[2]/255.f
- << "\" vcol_c_b=\"" << (float)pt[1]/255.f << "\"";
+ << "\" vcol_c_b=\"" << (float)pt[1]/255.f << "\"";
}
ostr << " shader_name=\"" << fmatname << "\" />\n";
diff --git a/source/blender/yafray/intern/export_Plugin.cpp b/source/blender/yafray/intern/export_Plugin.cpp
index a82101b24be..8392e32833e 100644
--- a/source/blender/yafray/intern/export_Plugin.cpp
+++ b/source/blender/yafray/intern/export_Plugin.cpp
@@ -966,7 +966,8 @@ void yafrayPluginRender_t::writeMaterialsAndModulators()
// object mode is also set as global, but the object matrix
// was specified above with <modulator..>
params["texco"] = yafray::parameter_t("global");
- else if (mtex->texco & TEXCO_ORCO)
+ else if ((mtex->texco & TEXCO_ORCO) || (mtex->texco & TEXCO_STRAND))
+ // orco flag now used for 'strand'-mapping as well, see mesh code
params["texco"] = yafray::parameter_t("orco");
else if (mtex->texco & TEXCO_WINDOW)
params["texco"] = yafray::parameter_t("window");
@@ -1138,7 +1139,7 @@ void yafrayPluginRender_t::genVcol(vector<yafray::CFLOAT> &vcol, VlakRen *vlr, b
void yafrayPluginRender_t::genFace(vector<int> &faces,vector<string> &shaders,vector<int> &faceshader,
vector<yafray::GFLOAT> &uvcoords,vector<yafray::CFLOAT> &vcol,
map<VertRen*, int> &vert_idx,VlakRen *vlr,
- bool has_orco,bool has_uv)
+ int has_orco,bool has_uv)
{
Material* fmat = vlr->mat;
bool EXPORT_VCOL = ((fmat->mode & (MA_VERTEXCOL|MA_VERTEXCOLP))!=0);
@@ -1184,7 +1185,7 @@ void yafrayPluginRender_t::genFace(vector<int> &faces,vector<string> &shaders,ve
void yafrayPluginRender_t::genCompleFace(vector<int> &faces,/*vector<string> &shaders,*/vector<int> &faceshader,
vector<yafray::GFLOAT> &uvcoords,vector<yafray::CFLOAT> &vcol,
map<VertRen*, int> &vert_idx,VlakRen *vlr,
- bool has_orco,bool has_uv)
+ int has_orco,bool has_uv)
{
Material* fmat = vlr->mat;
bool EXPORT_VCOL = ((fmat->mode & (MA_VERTEXCOL|MA_VERTEXCOLP))!=0);
@@ -1206,7 +1207,7 @@ void yafrayPluginRender_t::genCompleFace(vector<int> &faces,/*vector<string> &sh
}
void yafrayPluginRender_t::genVertices(vector<yafray::point3d_t> &verts, int &vidx,
- map<VertRen*, int> &vert_idx, VlakRen* vlr, bool has_orco, Object* obj)
+ map<VertRen*, int> &vert_idx, VlakRen* vlr, int has_orco, Object* obj)
{
VertRen* ver;
float tvec[3]; // for back2world transform
@@ -1224,7 +1225,11 @@ void yafrayPluginRender_t::genVertices(vector<yafray::point3d_t> &verts, int &vi
MTC_cp3Float(ver->co, tvec);
MTC_Mat4MulVecfl(imat, tvec);
verts.push_back(yafray::point3d_t(tvec[0], tvec[1], tvec[2]));
- if (has_orco) verts.push_back(yafray::point3d_t(ver->orco[0], ver->orco[1], ver->orco[2]));
+ // has_orco now an int, if 1 -> strand mapping, if 2 -> normal orco mapping
+ if (has_orco==1)
+ verts.push_back(yafray::point3d_t(ver->accum));
+ else if (has_orco==2)
+ verts.push_back(yafray::point3d_t(ver->orco[0], ver->orco[1], ver->orco[2]));
}
if (vert_idx.find(vlr->v2)==vert_idx.end())
{
@@ -1233,7 +1238,11 @@ void yafrayPluginRender_t::genVertices(vector<yafray::point3d_t> &verts, int &vi
MTC_cp3Float(ver->co, tvec);
MTC_Mat4MulVecfl(imat, tvec);
verts.push_back(yafray::point3d_t(tvec[0], tvec[1], tvec[2]));
- if (has_orco) verts.push_back(yafray::point3d_t(ver->orco[0], ver->orco[1], ver->orco[2]));
+ // has_orco now an int, if 1 -> strand mapping, if 2 -> normal orco mapping
+ if (has_orco==1)
+ verts.push_back(yafray::point3d_t(ver->accum));
+ else if (has_orco==2)
+ verts.push_back(yafray::point3d_t(ver->orco[0], ver->orco[1], ver->orco[2]));
}
if (vert_idx.find(vlr->v3)==vert_idx.end())
{
@@ -1242,7 +1251,11 @@ void yafrayPluginRender_t::genVertices(vector<yafray::point3d_t> &verts, int &vi
MTC_cp3Float(ver->co, tvec);
MTC_Mat4MulVecfl(imat, tvec);
verts.push_back(yafray::point3d_t(tvec[0], tvec[1], tvec[2]));
- if (has_orco) verts.push_back(yafray::point3d_t(ver->orco[0], ver->orco[1], ver->orco[2]));
+ // has_orco now an int, if 1 -> strand mapping, if 2 -> normal orco mapping
+ if (has_orco==1)
+ verts.push_back(yafray::point3d_t(ver->accum));
+ else if (has_orco==2)
+ verts.push_back(yafray::point3d_t(ver->orco[0], ver->orco[1], ver->orco[2]));
}
if ((vlr->v4) && (vert_idx.find(vlr->v4)==vert_idx.end()))
{
@@ -1251,7 +1264,11 @@ void yafrayPluginRender_t::genVertices(vector<yafray::point3d_t> &verts, int &vi
MTC_cp3Float(ver->co, tvec);
MTC_Mat4MulVecfl(imat, tvec);
verts.push_back(yafray::point3d_t(tvec[0], tvec[1], tvec[2]));
- if (has_orco) verts.push_back(yafray::point3d_t(ver->orco[0], ver->orco[1], ver->orco[2]));
+ // has_orco now an int, if 1 -> strand mapping, if 2 -> normal orco mapping
+ if (has_orco==1)
+ verts.push_back(yafray::point3d_t(ver->accum));
+ else if (has_orco==2)
+ verts.push_back(yafray::point3d_t(ver->orco[0], ver->orco[1], ver->orco[2]));
}
}
@@ -1284,7 +1301,11 @@ void yafrayPluginRender_t::writeObject(Object* obj, const vector<VlakRen*> &VLR_
// Test the rendermaterial texco flag instead.
// update2: bug #3193 it seems it has changed again with the introduction of static 'hair' particles,
// now it uses the vert pointer again as an extra test to make sure there are orco coords available
- bool has_orco = (((face0mat->texco & TEXCO_ORCO)!=0) && (face0->v1->orco!=NULL));
+ int has_orco = 0;
+ if (face0mat->texco & TEXCO_STRAND)
+ has_orco = 1;
+ else
+ has_orco = (((face0mat->texco & TEXCO_ORCO)!=0) && (face0->v1->orco!=NULL)) ? 2 : 0;
bool no_auto = true; //in case non-mesh, or mesh has no autosmooth
float sm_angle = 0.1f;
@@ -1883,8 +1904,9 @@ bool blenderYafrayOutput_t::putPixel(int x, int y, const yafray::color_t &c,
float* zbuf = rres.rectz + px;
if (zbuf) zbuf[x] = depth;
- out = (out+1) & 4095;
- if (out==0) {
+ out++;
+ // draw on completion of bucket & end of pass
+ if (((out & 4095)==0) || ((out % (re->rectx*re->recty))==0)) {
re->result->renlay = render_get_active_layer(re, re->result);
/* XXX second arg is rcti *rect, allows to indicate sub-rect in image to draw */
re->display_draw(re->result, NULL);
diff --git a/source/blender/yafray/intern/export_Plugin.h b/source/blender/yafray/intern/export_Plugin.h
index 14b24599e81..28e71596d50 100644
--- a/source/blender/yafray/intern/export_Plugin.h
+++ b/source/blender/yafray/intern/export_Plugin.h
@@ -53,13 +53,13 @@ class yafrayPluginRender_t : public yafrayRender_t
void genFace(std::vector<int> &faces,std::vector<std::string> &shaders,std::vector<int> &faceshader,
std::vector<yafray::GFLOAT> &uvcoords,std::vector<yafray::CFLOAT> &vcol,
std::map<VertRen*, int> &vert_idx,VlakRen *vlr,
- bool has_orco,bool has_uv);
+ int has_orco,bool has_uv);
void genCompleFace(std::vector<int> &faces,/*std::vector<std::string> &shaders,*/std::vector<int> &faceshader,
std::vector<yafray::GFLOAT> &uvcoords,std::vector<yafray::CFLOAT> &vcol,
std::map<VertRen*, int> &vert_idx,VlakRen *vlr,
- bool has_orco,bool has_uv);
+ int has_orco,bool has_uv);
void genVertices(std::vector<yafray::point3d_t> &verts, int &vidx,
- std::map<VertRen*, int> &vert_idx, VlakRen* vlr, bool has_orco, Object* obj);
+ std::map<VertRen*, int> &vert_idx, VlakRen* vlr, int has_orco, Object* obj);
};
class blenderYafrayOutput_t : public yafray::colorOutput_t
diff --git a/source/blender/yafray/intern/yafexternal.h b/source/blender/yafray/intern/yafexternal.h
index 7353748a1ad..7130bd55466 100644
--- a/source/blender/yafray/intern/yafexternal.h
+++ b/source/blender/yafray/intern/yafexternal.h
@@ -17,6 +17,7 @@ class point3d_t
{
public:
point3d_t() { x = y = z = 0; }
+ point3d_t(PFLOAT ix) { x = y = z = ix; }
point3d_t(PFLOAT ix, PFLOAT iy, PFLOAT iz=0) { x=ix; y=iy; z=iz; }
point3d_t(const point3d_t &s) { x=s.x; y=s.y; z=s.z; }
void set(PFLOAT ix, PFLOAT iy, PFLOAT iz=0) { x=ix; y=iy; z=iz; }