CARLA
Public Member Functions | Public Attributes | List of all members
Simplify::SimplificationObject Class Reference

#include <Simplify.h>

+ Collaboration diagram for Simplify::SimplificationObject:

Public Member Functions

double calculate_error (int id_v1, int id_v2, vec3f &p_result)
 
void compact_mesh ()
 
bool flipped (vec3f p, int i0, int i1, Vertex &v0, Vertex &v1, 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 i0, 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< Refrefs
 
std::vector< Triangletriangles
 
std::vector< Vertexvertices
 

Detailed Description

Definition at line 410 of file Simplify.h.

Member Function Documentation

◆ calculate_error()

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

Definition at line 893 of file Simplify.h.

References SymetricMatrix::det(), min(), vec3f::x, vec3f::y, and vec3f::z.

+ Here is the call graph for this function:

◆ compact_mesh()

void Simplify::SimplificationObject::compact_mesh ( )
inline

Definition at line 855 of file Simplify.h.

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

◆ flipped()

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

Definition at line 648 of file Simplify.h.

References vec3f::cross(), Simplify::Triangle::deleted, vec3f::dot(), loopk, Simplify::Triangle::n, vec3f::normalize(), Simplify::Vertex::tcount, Simplify::Vertex::tstart, and Simplify::Triangle::v.

+ Here is the call graph for this function:

◆ load_obj()

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

◆ simplify_mesh()

void Simplify::SimplificationObject::simplify_mesh ( int  target_count,
double  agressiveness = 7,
bool  verbose = false 
)
inline

Definition at line 430 of file Simplify.h.

References Simplify::Triangle::attr, Simplify::Vertex::border, Simplify::Triangle::deleted, Simplify::Triangle::dirty, Simplify::Triangle::err, loopi, loopj, Simplify::Vertex::p, Simplify::Vertex::q, Simplify::Vertex::tcount, Simplify::TEXCOORD, Simplify::Vertex::tstart, and Simplify::Triangle::v.

Referenced by carla::geom::Simplification::Simplificate().

+ Here is the caller graph for this function:

◆ simplify_mesh_lossless()

void Simplify::SimplificationObject::simplify_mesh_lossless ( bool  verbose = false)
inline

◆ trimwhitespace()

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

Definition at line 931 of file Simplify.h.

◆ update_mesh()

void Simplify::SimplificationObject::update_mesh ( int  iteration)
inline

Definition at line 731 of file Simplify.h.

References vec3f::cross(), vec3f::dot(), Simplify::Triangle::err, loopi, loopj, loopk, min(), Simplify::Triangle::n, vec3f::normalize(), Simplify::Vertex::tcount, Simplify::Vertex::tstart, Simplify::Triangle::v, vec3f::x, vec3f::y, and vec3f::z.

+ Here is the call graph for this function:

◆ update_triangles()

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

Definition at line 704 of file Simplify.h.

References Simplify::Triangle::deleted, Simplify::Triangle::dirty, Simplify::Triangle::err, loopk, min(), Simplify::Vertex::tcount, Simplify::Ref::tid, Simplify::Vertex::tstart, Simplify::Ref::tvertex, and Simplify::Triangle::v.

+ Here is the call graph for this function:

◆ update_uvs()

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

Definition at line 685 of file Simplify.h.

References Simplify::Triangle::deleted, interpolate(), loopk, Simplify::Vertex::tcount, Simplify::Ref::tid, Simplify::Vertex::tstart, Simplify::Ref::tvertex, Simplify::Triangle::uvs, and Simplify::Triangle::v.

+ Here is the call graph for this function:

◆ vertex_error()

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

Definition at line 886 of file Simplify.h.

◆ write_obj()

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

Definition at line 1112 of file Simplify.h.

References loopi, Simplify::TEXCOORD, vector3::x, and vector3::y.

Member Data Documentation

◆ materials

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

Definition at line 417 of file Simplify.h.

◆ mtllib

std::string Simplify::SimplificationObject::mtllib

Definition at line 416 of file Simplify.h.

◆ refs

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

Definition at line 415 of file Simplify.h.

◆ triangles

std::vector<Triangle> Simplify::SimplificationObject::triangles

Definition at line 413 of file Simplify.h.

Referenced by carla::geom::Simplification::Simplificate().

◆ vertices

std::vector<Vertex> Simplify::SimplificationObject::vertices

Definition at line 414 of file Simplify.h.

Referenced by carla::geom::Simplification::Simplificate().


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