Commit 82ab040b authored by MURRAY David's avatar MURRAY David
Browse files

format

parent 00300f6d
......@@ -120,7 +120,7 @@ void OptixGeometryHandler::importMrfScene(
uint material_id = (*shape_it)->materialIndex();
std::vector<optix::Material> optix_materials = material_handler.getMaterialFromMRF(material_id);
optix::Matrix4x4 transform = optix::Matrix4x4((*shape_it)->worldToObjectTransform().ptr());
optix::Matrix4x4 transform = optix::Matrix4x4((*shape_it)->worldToObjectTransform().ptr());
if (optix_materials.size() == 1)
......
......@@ -94,8 +94,8 @@ struct MRF_OPTIX_EXPORT Mesh
bool has_tangents;
float *tangents;
int32_t num_triangles; // Number of triangles
int32_t *tri_indices; // Indices into positions, normals, texcoords
int32_t num_triangles; // Number of triangles
int32_t * tri_indices; // Indices into positions, normals, texcoords
uint32_t *mat_indices; // Indices into mat_params (len num_triangles)
float bbox_min[3]; // Scene BBox
......@@ -130,9 +130,9 @@ public:
void loadMeshFromMRF(
mrf::geom::Mesh const & mrf_mesh,
OptiXMesh & optix_mesh,
const optix::Matrix4x4 &load_xform,
mrf::geom::Mesh const & mrf_mesh,
OptiXMesh & optix_mesh,
const optix::Matrix4x4 & load_xform,
std::vector<optix::Material> optix_materials);
void setupMeshLoaderInputs(optix::Context context, OptixMeshBuffers &buffers, Mesh &mesh);
......
......@@ -240,10 +240,10 @@ void OptixLightHandler::updateLights(OptixMaterialHandler &material_handler)
// wavelengths);
#else
auto light_color = diffuse_emittance->getColor() * radiance;
/* material_handler.setCustomRadianceVariables(
_optix_quad_light_geometries[i]),
variable_values,
variable_names);*/
/* material_handler.setCustomRadianceVariables(
_optix_quad_light_geometries[i]),
variable_values,
variable_names);*/
_optix_quad_lights[i].emission = mrfToOptix(light_color);
#endif
......
......@@ -52,7 +52,7 @@ public:
std::vector<QuadLight> const & optixQuadLights() const;
std::vector<SphereLight> const &optixSphereLights() const;
mrf::materials::UMat *getUMatPointerQuadLight(int index) { return _optix_quad_light_materials[index]; }
mrf::materials::UMat *getUMatPointerSpereLight(int index) { return _optix_sphere_light_materials[index]; }
......
......@@ -932,9 +932,9 @@ void OptixRenderer::importMrfScene(std::string scene_file, std::string camera_fi
//then cuda compile options are ok, we create the materials
#ifdef MRF_RENDERING_MODE_SPECTRAL
_material_handler->createMaterials(_cuda_compile_options, _wavelengths);
#else
#else
_material_handler->createMaterials(_cuda_compile_options);
#endif
#endif
//then the lights
......
......@@ -231,8 +231,8 @@ public:
static constexpr char const *const COUNT_AT = "count";
static constexpr char const *const INDEX_AT = "index";
static constexpr char const *const COUNT_AT = "count";
static constexpr char const *const INDEX_AT = "index";
//LIGHTS
static constexpr char const *const LIGHTS_MK = "lights";
......
......@@ -1080,7 +1080,7 @@ SceneParser::addMesh(XMLElement *a_mesh_element, mrf::rendering::Scene &scene, i
if (tiny_mat && tiny_mat->t == tinyply::Type::UINT32)
{
assert(tiny_mat->count == tiny_faces->count);
const size_t numMatBytes = tiny_mat->buffer.size_bytes();
const size_t numMatBytes = tiny_mat->buffer.size_bytes();
const uint * ply_mat = reinterpret_cast<uint *>(tiny_mat->buffer.get());
enforced_materials.resize(tiny_mat->count);
......
......@@ -4,7 +4,7 @@ namespace mrf
{
namespace materials
{
MultiMaterial::MultiMaterial(std::string const &name, unsigned int nb_mat) : BRDF(name){}
MultiMaterial::MultiMaterial(std::string const &name, unsigned int nb_mat): BRDF(name) {}
MultiMaterial::~MultiMaterial() {}
}
} // namespace materials
} // namespace mrf
\ No newline at end of file
......@@ -26,7 +26,7 @@ protected:
std::vector<unsigned int> _mesh_indices;
std::vector<std::string> _names;
public:
public:
MultiMaterial(std::string const &name, unsigned int nb_mat);
~MultiMaterial();
......@@ -44,7 +44,6 @@ protected:
std::vector<unsigned int> &getAllMRFId() { return _mrf_indices; }
std::vector<unsigned int> &getAllMeshId() { return _mesh_indices; }
std::vector<std::string> & getAllNames() { return _names; }
};
} // namespace materials
} // namespace mrf
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment