TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
G3D::Welder::Settings Class Reference

#include <Welder.h>

Public Member Functions

 Settings (float normalSmoothAngle=toRadians(70.0f))
 
 Settings (const Any &any)
 
Any toAny () const
 
void serialize (class BinaryOutput &b) const
 
void deserialize (class BinaryInput &b)
 

Public Attributes

float normalSmoothingAngle
 
float vertexWeldRadius
 
float textureWeldRadius
 
float normalWeldRadius
 

Constructor & Destructor Documentation

G3D::Welder::Settings::Settings ( float  normalSmoothAngle = toRadians(70.0f))
inline
33  :
34  normalSmoothingAngle(normalSmoothAngle),
35  vertexWeldRadius(0.001f),
36  textureWeldRadius(0.0001f),
37  normalWeldRadius(0.01f) {}
float vertexWeldRadius
Definition: Welder.h:27
float textureWeldRadius
Definition: Welder.h:29
float normalWeldRadius
Definition: Welder.h:31
float normalSmoothingAngle
Definition: Welder.h:24
G3D::Welder::Settings::Settings ( const Any any)
498  {
499  *this = Settings();
500  any.verifyName("Welder::Settings");
501  for (Any::AnyTable::Iterator it = any.table().begin(); it.isValid(); ++it) {
502  const std::string& key = toLower(it->key);
503  if (key == "normalsmoothingangle") {
504  normalSmoothingAngle = it->value;
505  } else if (key == "vertexweldradius") {
506  vertexWeldRadius = it->value;
507  } else if (key == "textureweldradius") {
508  textureWeldRadius = it->value;
509  } else if (key == "normalweldradius") {
510  normalWeldRadius = it->value;
511  } else {
512  any.verify(false, "Illegal key: " + it->key);
513  }
514  }
515 }
float vertexWeldRadius
Definition: Welder.h:27
bool any(float x)
Definition: g3dmath.h:424
float textureWeldRadius
Definition: Welder.h:29
float normalWeldRadius
Definition: Welder.h:31
std::string toLower(const std::string &x)
Definition: stringutils.cpp:223
float normalSmoothingAngle
Definition: Welder.h:24
Settings(float normalSmoothAngle=toRadians(70.0f))
Definition: Welder.h:33

+ Here is the call graph for this function:

Member Function Documentation

void G3D::Welder::Settings::deserialize ( class BinaryInput b)
476  {
477  normalSmoothingAngle = b.readFloat32();
478  vertexWeldRadius = b.readFloat32();
479  textureWeldRadius = b.readFloat32();
480  normalWeldRadius = b.readFloat32();
481 }
float vertexWeldRadius
Definition: Welder.h:27
float textureWeldRadius
Definition: Welder.h:29
float normalWeldRadius
Definition: Welder.h:31
float normalSmoothingAngle
Definition: Welder.h:24

+ Here is the call graph for this function:

void G3D::Welder::Settings::serialize ( class BinaryOutput b) const
468  {
469  b.writeFloat32(normalSmoothingAngle);
470  b.writeFloat32(vertexWeldRadius);
471  b.writeFloat32(textureWeldRadius);
472  b.writeFloat32(normalWeldRadius);
473 }
float vertexWeldRadius
Definition: Welder.h:27
float textureWeldRadius
Definition: Welder.h:29
float normalWeldRadius
Definition: Welder.h:31
float normalSmoothingAngle
Definition: Welder.h:24

+ Here is the call graph for this function:

Any G3D::Welder::Settings::toAny ( ) const
518  {
519  Any a(Any::TABLE, "Welder::Settings");
520  a["normalSmoothingAngle"] = normalSmoothingAngle;
521  a["vertexWeldRadius"] = vertexWeldRadius;
522  a["textureWeldRadius"] = textureWeldRadius;
523  a["normalWeldRadius"] = normalWeldRadius;
524  return a;
525 }
Definition: Any.h:187
float vertexWeldRadius
Definition: Welder.h:27
float textureWeldRadius
Definition: Welder.h:29
float normalWeldRadius
Definition: Welder.h:31
float normalSmoothingAngle
Definition: Welder.h:24

Member Data Documentation

float G3D::Welder::Settings::normalSmoothingAngle

Surfaces with normals that are within this angle of each other are considered to be curved. Default value is toRadians(70.0f).

float G3D::Welder::Settings::normalWeldRadius
float G3D::Welder::Settings::textureWeldRadius
float G3D::Welder::Settings::vertexWeldRadius

Default value is 0


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