Subversion Repositories gelsvn

Rev

Rev 443 | Rev 601 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 443 Rev 567
Line 42... Line 42...
42
		std::vector<int> tex_idx;
42
		std::vector<int> tex_idx;
43
 
43
 
44
		/// Vector of materials
44
		/// Vector of materials
45
		std::vector<Material> materials;
45
		std::vector<Material> materials;
46
 
46
 
-
 
47
    /// Vector of triangle face areas
-
 
48
    std::vector<float> face_areas;
-
 
49
 
-
 
50
    /// Tabulated cumulative distribution function for sampling triangles according to area
-
 
51
    std::vector<float> face_area_cdf;
-
 
52
 
-
 
53
    /// Total surface area of the triangle mesh
-
 
54
    float surface_area;
-
 
55
 
47
		// -------- FUNCTIONS -----------
56
		// -------- FUNCTIONS -----------
48
 
57
 
49
		/// Get an axis aligned bounding box for the model.
58
		/// Get an axis aligned bounding box for the model.
50
		bool get_bbox(CGLA::Vec3f& p0, CGLA::Vec3f& p7) const;
59
		bool get_bbox(CGLA::Vec3f& p0, CGLA::Vec3f& p7) const;
51
 
60
 
Line 62... Line 71...
62
		int find_material(const std::string&) const;
71
		int find_material(const std::string&) const;
63
 
72
 
64
		/// Compute normals for the mesh. Does not check if there are normals.
73
		/// Compute normals for the mesh. Does not check if there are normals.
65
		void compute_normals();
74
		void compute_normals();
66
 
75
 
-
 
76
    /// Compute areas for all faces and total surface area.
-
 
77
    void compute_areas();
-
 
78
 
67
    /// Apply a transformation matrix to the mesh
79
    /// Apply a transformation matrix to the mesh
68
    void transform(CGLA::Mat4x4f m);
80
    void transform(CGLA::Mat4x4f m);
69
	};
81
	};
70
 
82
 
71
 
83