!B (Sandbox) (CE-21795) Importing models with multisubmaterials via fbx switches...
[CRYENGINE.git] / Code / Sandbox / Plugins / LodGeneratorPlugin / Util / Validator.h
blob7d3d756938a355fb2f7ce2b6f2971f82ac24d21f
1 #pragma once
3 namespace LODGenerator
5 class CComponent;
6 class CValidator
8 public:
9 CValidator();
10 ~CValidator();
12 bool component_is_valid(CComponent* comp);
13 double component_scaling(CComponent* comp);
14 void compute_fill_and_overlap_ratio(CComponent* comp);
15 double fill_ratio() const { return fill_ratio_; }
16 double overlap_ratio() const { return overlap_ratio_; }
18 double get_max_overlap_ratio() const { return max_overlap_ratio_; }
19 void set_max_overlap_ratio(double x) { max_overlap_ratio_ = x; }
20 double get_max_scaling() const { return max_scaling_; }
21 void set_max_scaling(double x) { max_scaling_ = x; }
22 double get_min_fill_ratio() const { return min_fill_ratio_; }
23 void set_min_fill_ratio(double x) { min_fill_ratio_ = x; }
25 protected:
26 void begin_rasterizer(CComponent* comp);
27 void end_rasterizer();
29 void rasterize_triangle(
30 const Vec2d& p1, const Vec2d& p2, const Vec2d& p3
32 void transform(const Vec2d& p, int& x, int& y);
34 private:
35 int graph_size_;
36 uint8* graph_mem_;
37 int* x_left_;
38 int* x_right_;
40 double user_x_min_;
41 double user_y_min_;
42 double user_width_;
43 double user_height_;
44 double user_size_;
46 double fill_ratio_;
47 double overlap_ratio_;
49 double max_overlap_ratio_;
50 double max_scaling_;
51 double min_fill_ratio_;