CARLA
Loading...
Searching...
No Matches
Simplify::SimplificationObject Class Reference

#include <Simplify.h>

Public Member Functions

double calculate_error (int id_v1, int id_v2, vec3f &p_result)
void compact_mesh ()
bool flipped (vec3f p, int, int i1, Vertex &v0, Vertex &, std::vector< int > &deleted)
void load_obj (const char *filename, bool process_uv=false)
void simplify_mesh (int target_count, double agressiveness=7, bool verbose=false)
void simplify_mesh_lossless (bool verbose=false)
char * trimwhitespace (char *str)
void update_mesh (int iteration)
void update_triangles (int i0, Vertex &v, std::vector< int > &deleted, int &deleted_triangles)
void update_uvs (int, const Vertex &v, const vec3f &p, std::vector< int > &deleted)
double vertex_error (SymetricMatrix q, double x, double y, double z)
void write_obj (const char *filename)

Public Attributes

std::vector< std::string > materials
std::string mtllib
std::vector< Ref > refs
std::vector< Triangle > triangles
std::vector< Vertex > vertices

Detailed Description

Definition at line 401 of file Simplify.h.

Member Function Documentation

◆ calculate_error()

double Simplify::SimplificationObject::calculate_error ( int id_v1,
int id_v2,
vec3f & p_result )
inline

◆ compact_mesh()

void Simplify::SimplificationObject::compact_mesh ( )
inline

Definition at line 847 of file Simplify.h.

References loopi, loopj, triangles, Simplify::Triangle::v, and vertices.

Referenced by simplify_mesh(), and simplify_mesh_lossless().

◆ flipped()

bool Simplify::SimplificationObject::flipped ( vec3f p,
int ,
int i1,
Vertex & v0,
Vertex & ,
std::vector< int > & deleted )
inline

◆ load_obj()

void Simplify::SimplificationObject::load_obj ( const char * filename,
bool process_uv = false )
inline

◆ simplify_mesh()

◆ simplify_mesh_lossless()

◆ trimwhitespace()

char * Simplify::SimplificationObject::trimwhitespace ( char * str)
inline

Definition at line 923 of file Simplify.h.

Referenced by load_obj().

◆ update_mesh()

◆ update_triangles()

void Simplify::SimplificationObject::update_triangles ( int i0,
Vertex & v,
std::vector< int > & deleted,
int & deleted_triangles )
inline

◆ update_uvs()

void Simplify::SimplificationObject::update_uvs ( int ,
const Vertex & v,
const vec3f & p,
std::vector< int > & deleted )
inline

◆ vertex_error()

double Simplify::SimplificationObject::vertex_error ( SymetricMatrix q,
double x,
double y,
double z )
inline

Definition at line 878 of file Simplify.h.

Referenced by calculate_error().

◆ write_obj()

void Simplify::SimplificationObject::write_obj ( const char * filename)
inline

Definition at line 1106 of file Simplify.h.

References loopi, mtllib, Simplify::TEXCOORD, triangles, and vertices.

Member Data Documentation

◆ materials

std::vector<std::string> Simplify::SimplificationObject::materials

Definition at line 408 of file Simplify.h.

Referenced by load_obj().

◆ mtllib

std::string Simplify::SimplificationObject::mtllib

Definition at line 407 of file Simplify.h.

Referenced by load_obj(), and write_obj().

◆ refs

std::vector<Ref> Simplify::SimplificationObject::refs

◆ triangles

◆ vertices


The documentation for this class was generated from the following file: