Merge branch 'master' into master

This commit is contained in:
Kim Kulling
2021-10-19 09:31:19 +02:00
committed by GitHub
65 changed files with 117 additions and 236 deletions
+1 -1
View File
@@ -259,7 +259,7 @@ namespace Discreet3DS {
// Specifies the file name of a texture
CHUNK_MAPFILE = 0xA300,
// Specifies whether a materail requires two-sided rendering
// Specifies whether a material requires two-sided rendering
CHUNK_MAT_TWO_SIDE = 0xA081,
// ********************************************************************
+4 -2
View File
@@ -101,9 +101,11 @@ private:
std::vector<OpcPackageRelationship*> mRelations;
};
#endif // ASSIMP_BUILD_NO_3MF_EXPORTER
#endif // ASSIMP_BUILD_NO_EXPORT
} // Namespace D3MF
} // Namespace Assimp
#endif // ASSIMP_BUILD_NO_3MF_EXPORTER
#endif // ASSIMP_BUILD_NO_EXPORT
@@ -690,7 +690,7 @@ void AMFImporter::Postprocess_BuildConstellation(AMFConstellation &pConstellatio
if (ne->Type == AMFNodeElementBase::ENET_Metadata) continue;
if (ne->Type != AMFNodeElementBase::ENET_Instance) throw DeadlyImportError("Only <instance> nodes can be in <constellation>.");
// create alias for conveniance
// create alias for convenience
AMFInstance &als = *((AMFInstance *)ne);
// find referenced object
if (!Find_ConvertedNode(als.ObjectID, nodeArray, &found_node)) Throw_ID_NotFound(als.ObjectID);
+1 -1
View File
@@ -681,7 +681,7 @@ void ASEImporter::BuildNodes(std::vector<BaseNode *> &nodes) {
}
}
// Are there ane orphaned nodes?
// Are there any orphaned nodes?
if (!aiList.empty()) {
std::vector<aiNode *> apcNodes;
apcNodes.reserve(aiList.size() + pcScene->mRootNode->mNumChildren);
+3 -1
View File
@@ -48,11 +48,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <assimp/defs.h>
#ifndef ASSIMP_BUILD_NO_EXPORT
// nothing really needed here - reserved for future use like properties
namespace Assimp {
void ASSIMP_API ExportSceneAssbin(const char* pFile, IOSystem* pIOSystem, const aiScene* pScene, const ExportProperties* /*pProperties*/);
}
#endif
#endif // AI_ASSBINEXPORTER_H_INC
+11 -12
View File
@@ -43,13 +43,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "AssbinFileWriter.h"
#include "Common/assbin_chunks.h"
#include "PostProcessing/ProcessHelper.h"
#include <assimp/Exceptional.h>
#include <assimp/version.h>
#include <assimp/Exporter.hpp>
#include <assimp/IOStream.hpp>
#ifdef ASSIMP_BUILD_NO_OWN_ZLIB
@@ -58,7 +56,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "../contrib/zlib/zlib.h"
#endif
#include <time.h>
#include <ctime>
#if _MSC_VER
#pragma warning(push)
@@ -277,7 +275,7 @@ public:
// empty
}
virtual ~AssbinChunkWriter() {
~AssbinChunkWriter() override {
if (container) {
container->Write(&magic, sizeof(uint32_t), 1);
container->Write(&cursor, sizeof(uint32_t), 1);
@@ -288,26 +286,27 @@ public:
void *GetBufferPointer() { return buffer; }
// -------------------------------------------------------------------
virtual size_t Read(void * /*pvBuffer*/, size_t /*pSize*/, size_t /*pCount*/) {
size_t Read(void * /*pvBuffer*/, size_t /*pSize*/, size_t /*pCount*/) override {
return 0;
}
virtual aiReturn Seek(size_t /*pOffset*/, aiOrigin /*pOrigin*/) {
aiReturn Seek(size_t /*pOffset*/, aiOrigin /*pOrigin*/) override {
return aiReturn_FAILURE;
}
virtual size_t Tell() const {
size_t Tell() const override {
return cursor;
}
virtual void Flush() {
void Flush() override {
// not implemented
}
virtual size_t FileSize() const {
size_t FileSize() const override {
return cursor;
}
// -------------------------------------------------------------------
virtual size_t Write(const void *pvBuffer, size_t pSize, size_t pCount) {
size_t Write(const void *pvBuffer, size_t pSize, size_t pCount) override {
pSize *= pCount;
if (cursor + pSize > cur_size) {
Grow(cursor + pSize);
+1 -1
View File
@@ -406,7 +406,7 @@ void AssbinImporter::ReadBinaryMesh(IOStream *stream, aiMesh *mesh) {
f.mIndices = new unsigned int[f.mNumIndices];
for (unsigned int a = 0; a < f.mNumIndices; ++a) {
// Check if unsigned short ( 16 bit ) are big enought for the indices
// Check if unsigned short ( 16 bit ) are big enough for the indices
if (fitsIntoUI16(mesh->mNumVertices)) {
f.mIndices[a] = Read<uint16_t>(stream);
} else {
+1 -1
View File
@@ -168,7 +168,7 @@ static void WriteNode(const aiNode *node, IOStream *io, unsigned int depth) {
}
// -----------------------------------------------------------------------------------
// Some chuncks of text will need to be encoded for XML
// Some chunks of text will need to be encoded for XML
// http://stackoverflow.com/questions/5665231/most-efficient-way-to-escape-xml-html-in-c-string#5665377
static std::string encodeXML(const std::string &data) {
std::string buffer;
+1 -1
View File
@@ -178,7 +178,7 @@ void BVHLoader::ReadHierarchy(aiScene *pScene) {
}
// ------------------------------------------------------------------------------------------------
// Reads a node and recursively its childs and returns the created node;
// Reads a node and recursively its children and returns the created node;
aiNode *BVHLoader::ReadNode() {
// first token is name
std::string nodeName = GetNextToken();
+1 -1
View File
@@ -112,7 +112,7 @@ protected:
/** Reads the hierarchy */
void ReadHierarchy(aiScene *pScene);
/** Reads a node and recursively its childs and returns the created node. */
/** Reads a node and recursively its children and returns the created node. */
aiNode *ReadNode();
/** Reads an end node and returns the created node. */
+1 -1
View File
@@ -476,7 +476,7 @@ public:
* in BlenderScene.cpp and is machine-generated.
* Converters are used to quickly handle objects whose
* exact data type is a runtime-property and not yet
* known at compile time (consier Object::data).*/
* known at compile time (consider Object::data).*/
void RegisterConverters();
// --------------------------------------------------------
+3 -3
View File
@@ -586,7 +586,7 @@ void COBImporter::ReadUnit_Ascii(Scene &out, LineSplitter &splitter, const Chunk
return;
}
// parent chunks preceede their childs, so we should have the
// parent chunks preceede their children, so we should have the
// corresponding chunk already.
for (std::shared_ptr<Node> &nd : out.nodes) {
if (nd->id == nfo.parent_id) {
@@ -668,7 +668,7 @@ void COBImporter::ReadCame_Ascii(Scene &out, LineSplitter &splitter, const Chunk
ReadBasicNodeInfo_Ascii(msh, ++splitter, nfo);
// skip the next line, we don't know this differenciation between a
// skip the next line, we don't know this differentiation between a
// standard camera and a panoramic camera.
++splitter;
}
@@ -1169,7 +1169,7 @@ void COBImporter::ReadUnit_Binary(COB::Scene &out, StreamReaderLE &reader, const
const chunk_guard cn(nfo, reader);
// parent chunks preceede their childs, so we should have the
// parent chunks preceede their children, so we should have the
// corresponding chunk already.
for (std::shared_ptr<Node> &nd : out.nodes) {
if (nd->id == nfo.parent_id) {
+1 -1
View File
@@ -1595,7 +1595,7 @@ void FBXConverter::ConvertCluster(std::vector<aiBone *> &local_mesh_bones, const
bone_map.insert(std::pair<const std::string, aiBone *>(deformer_name, bone));
}
ASSIMP_LOG_DEBUG("bone research: Indicies size: ", out_indices.size());
ASSIMP_LOG_DEBUG("bone research: Indices size: ", out_indices.size());
// lookup must be populated in case something goes wrong
// this also allocates bones to mesh instance outside
+1 -1
View File
@@ -693,7 +693,7 @@ private:
typedef std::vector<int64_t> KeyTimeList;
typedef std::vector<float> KeyValueList;
/** Represents a FBX animation curve (i.e. a 1-dimensional set of keyframes and values therefor) */
/** Represents a FBX animation curve (i.e. a 1-dimensional set of keyframes and values therefore) */
class AnimationCurve : public Object {
public:
AnimationCurve(uint64_t id, const Element& element, const std::string& name, const Document& doc);
+2 -2
View File
@@ -1709,7 +1709,7 @@ void FBXExporter::WriteObjects ()
//p.AddP70string("UVSet", ""); // TODO: how should this work?
p.AddP70bool("UseMaterial", 1);
tnode.AddChild(p);
// can't easily detrmine which texture path will be correct,
// can't easily determine which texture path will be correct,
// so just store what we have in every field.
// these being incorrect is a common problem with FBX anyway.
tnode.AddChild("FileName", texture_path);
@@ -1915,7 +1915,7 @@ void FBXExporter::WriteObjects ()
// mark all parent nodes as skeleton as well,
// up until we find the root node,
// or else the node containing the mesh,
// or else the parent of a node containig the mesh.
// or else the parent of a node containing the mesh.
for (
const aiNode* parent = n->mParent;
parent && parent != mScene->mRootNode;
+1 -1
View File
@@ -132,7 +132,7 @@ void IRRImporter::SetupProperties(const Importer *pImp) {
}
// ------------------------------------------------------------------------------------------------
// Build a mesh tha consists of a single squad (a side of a skybox)
// Build a mesh that consists of a single squad (a side of a skybox)
aiMesh *IRRImporter::BuildSingleQuadMesh(const SkyboxVertex &v1,
const SkyboxVertex &v2,
const SkyboxVertex &v3,
+1 -1
View File
@@ -76,7 +76,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* Currently supports static meshes, vertex colors, materials, textures
*
* For animation, it would require the following conversions:
* - aiNode (bones) -> m3d_t.bone (with parent id, position vector and oriantation quaternion)
* - aiNode (bones) -> m3d_t.bone (with parent id, position vector and orientation quaternion)
* - aiMesh.aiBone -> m3d_t.skin (per vertex, with bone id, weight pairs)
* - aiAnimation -> m3d_action (frame with timestamp and list of bone id, position, orientation
* triplets, instead of per bone timestamp + lists)
+3 -3
View File
@@ -296,7 +296,7 @@ void M3DImporter::importMaterials(const M3DWrapper &m3d) {
}
// texture map properties
if (m->prop[j].type >= 128 && aiTxProps[k].pKey &&
// extra check, should never happen, do we have the refered texture?
// extra check, should never happen, do we have the referred texture?
m->prop[j].value.textureid < m3d->numtexture &&
m3d->texture[m->prop[j].value.textureid].name) {
name.Set(std::string(std::string(m3d->texture[m->prop[j].value.textureid].name) + ".png"));
@@ -474,7 +474,7 @@ void M3DImporter::importMeshes(const M3DWrapper &m3d) {
mScene->mMeshes = new aiMesh *[mScene->mNumMeshes];
std::copy(meshes->begin(), meshes->end(), mScene->mMeshes);
// create mesh indeces in root node
// create mesh indices in root node
mScene->mRootNode->mNumMeshes = static_cast<unsigned int>(meshes->size());
mScene->mRootNode->mMeshes = new unsigned int[meshes->size()];
for (i = 0; i < meshes->size(); i++) {
@@ -688,7 +688,7 @@ void M3DImporter::calculateOffsetMatrix(aiNode *pNode, aiMatrix4x4 *m) {
// ------------------------------------------------------------------------------------------------
// because M3D has a global mesh, global vertex ids and stores materialid on the face, we need
// temporary lists to collect data for an aiMesh, which requires local arrays and local indeces
// temporary lists to collect data for an aiMesh, which requires local arrays and local indices
// this function fills up an aiMesh with those temporary lists
void M3DImporter::populateMesh(const M3DWrapper &m3d, aiMesh *pMesh, std::vector<aiFace> *faces, std::vector<aiVector3D> *vertices,
std::vector<aiVector3D> *normals, std::vector<aiVector3D> *texcoords, std::vector<aiColor4D> *colors,
+5 -5
View File
@@ -59,7 +59,7 @@ extern "C" {
#ifndef M3D_DOUBLE
typedef float M3D_FLOAT;
#ifndef M3D_EPSILON
/* carefully choosen for IEEE 754 don't change */
/* carefully chosen for IEEE 754 don't change */
#define M3D_EPSILON ((M3D_FLOAT)1e-7)
#endif
#else
@@ -121,7 +121,7 @@ typedef uint16_t M3D_INDEX;
* TMAP texture map chunk (optional)
* VRTS vertex data chunk (optional if it's a material library)
* BONE bind-pose skeleton, bone hierarchy chunk (optional)
* n x m3db_t contains propably more, but at least one bone
* n x m3db_t contains probably more, but at least one bone
* n x m3ds_t skin group records
* MTRL* material chunk(s), can be more (optional)
* n x m3dp_t each material contains propapbly more, but at least one property
@@ -1109,7 +1109,7 @@ void _m3d_inv(M3D_FLOAT *m) {
r[15] = det * (m[0] * (m[5] * m[10] - m[6] * m[9]) + m[1] * (m[6] * m[8] - m[4] * m[10]) + m[2] * (m[4] * m[9] - m[5] * m[8]));
memcpy(m, &r, sizeof(r));
}
/* compose a coloumn major 4 x 4 matrix from vec3 position and vec4 orientation/rotation quaternion */
/* compose a column major 4 x 4 matrix from vec3 position and vec4 orientation/rotation quaternion */
void _m3d_mat(M3D_FLOAT *r, m3dv_t *p, m3dv_t *q) {
if (q->x == (M3D_FLOAT)0.0 && q->y == (M3D_FLOAT)0.0 && q->z >= (M3D_FLOAT)0.7071065 && q->z <= (M3D_FLOAT)0.7071075 &&
q->w == (M3D_FLOAT)0.0) {
@@ -4033,7 +4033,7 @@ unsigned char *m3d_save(m3d_t *model, int quality, int flags, unsigned int *size
out[len] = 0;
} else
{
/* stricly only use LF (newline) in binary */
/* strictly only use LF (newline) in binary */
sd = _m3d_safestr(model->desc, 3);
if (!sd) goto memerr;
/* header */
@@ -4608,7 +4608,7 @@ unsigned char *m3d_save(m3d_t *model, int quality, int flags, unsigned int *size
h = (m3dhdr_t *)z;
}
}
/* add file header at the begining */
/* add file header at the beginning */
len += 8;
out = (unsigned char *)M3D_MALLOC(len);
if (!out) goto memerr;
+1 -1
View File
@@ -271,7 +271,7 @@ inline void LatLngNormalToVec3(uint16_t p_iNormal, ai_real* p_afOut)
// -------------------------------------------------------------------------------
/** @brief Pack a Q3 normal into 16bit latitute/longitude representation
/** @brief Pack a Q3 normal into 16bit latitude/longitude representation
* @param p_vIn Input vector
* @param p_iOut Output normal
*
+1 -1
View File
@@ -59,7 +59,7 @@ using namespace Assimp;
using namespace Assimp::MD5;
// ------------------------------------------------------------------------------------------------
// Parse the segment structure fo a MD5 file
// Parse the segment structure for an MD5 file
MD5Parser::MD5Parser(char *_buffer, unsigned int _fileSize) {
ai_assert(nullptr != _buffer);
ai_assert(0 != _fileSize);
+2 -2
View File
@@ -387,7 +387,7 @@ void MDLImporter::CreateTexture_3DGS_MDL5(const unsigned char *szData,
// this should not occur - at least the docs say it shouldn't.
// however, one can easily try out what MED does if you have
// a model with a DDS texture and export it to MDL5 ...
// yeah, it embedds the DDS file.
// yeah, it embeds the DDS file.
if (6 == iType) {
// this is a compressed texture in DDS format
*piSkip = pcNew->mWidth;
@@ -524,7 +524,7 @@ void MDLImporter::ParseSkinLump_3DGS_MDL7(
}
// sometimes there are MDL7 files which have a monochrome
// texture instead of material colors ... posssible they have
// texture instead of material colors ... possible they have
// been converted to MDL7 from other formats, such as MDL5
aiColor4D clrTexture;
if (pcNew)
+2 -2
View File
@@ -195,7 +195,7 @@ namespace pmd
public:
uint16_t ik_bone_index;
uint16_t target_bone_index;
uint16_t interations;
uint16_t iterations;
float angle_limit;
std::vector<uint16_t> ik_child_bone_index;
@@ -205,7 +205,7 @@ namespace pmd
stream->read((char *) &target_bone_index, sizeof(uint16_t));
uint8_t ik_chain_length;
stream->read((char*) &ik_chain_length, sizeof(uint8_t));
stream->read((char *) &interations, sizeof(uint16_t));
stream->read((char *) &iterations, sizeof(uint16_t));
stream->read((char *) &angle_limit, sizeof(float));
ik_child_bone_index.resize(ik_chain_length);
for (int i = 0; i < ik_chain_length; i++)
+1 -1
View File
@@ -358,7 +358,7 @@ namespace vmd
light_frames[i].Write(stream);
}
// self shadow datas
// self shadow data
const int self_shadow_num = 0;
stream->write(reinterpret_cast<const char*>(&self_shadow_num), sizeof(int));
+1 -1
View File
@@ -233,7 +233,7 @@ void OFFImporter::InternReadFile( const std::string& pFile, aiScene* pScene, IOS
sz = fast_atoreal_move<ai_real>(sz, *vec[dim]);
}
// if has homogenous coordinate, divide others by this one
// if has homogeneous coordinate, divide others by this one
if (hasHomogenous) {
SkipSpaces(&sz);
ai_real w = 1.;
+1 -1
View File
@@ -233,7 +233,7 @@ struct Mesh {
// ------------------------------------------------------------------------------------------------
//! \struct Model
//! \brief Data structure to store all obj-specific model datas
//! \brief Data structure to store all obj-specific model data
// ------------------------------------------------------------------------------------------------
struct Model {
using GroupMap = std::map<std::string, std::vector<unsigned int> *>;
+1 -1
View File
@@ -555,7 +555,7 @@ public:
should be 0 after this reset. */
void Reset();
/// Covert to Assimp mesh.
/// Convert to Assimp mesh.
aiMesh *ConvertToAssimpMesh(Mesh *parent);
/// Vertex data.
+2 -2
View File
@@ -351,8 +351,8 @@ void OpenGEXImporter::handleNodes(DDLNode *node, aiScene *pScene) {
return;
}
DDLNode::DllNodeList childs = node->getChildNodeList();
for (DDLNode::DllNodeList::iterator it = childs.begin(); it != childs.end(); ++it) {
DDLNode::DllNodeList children = node->getChildNodeList();
for (DDLNode::DllNodeList::iterator it = children.begin(); it != children.end(); ++it) {
Grammar::TokenType tokenType(Grammar::matchTokenType((*it)->getType().c_str()));
switch (tokenType) {
case Grammar::MetricToken:
+1 -1
View File
@@ -95,7 +95,7 @@ struct sQ3BSPVertex {
vec3f vPosition; ///< Position of vertex
vec2f vTexCoord; ///< (u,v) Texturecoordinate of detailtexture
vec2f vLightmap; ///< (u,v) Texturecoordinate of lightmap
vec3f vNormal; ///< vertex normale
vec3f vNormal; ///< vertex normal
unsigned char bColor[ 4 ]; ///< Color in RGBA
};
+1 -1
View File
@@ -868,7 +868,7 @@ void SMDImporter::ParseNodeInfo(const char* szCurrent, const char** szCurrentOut
bool bQuota = true;
if ('\"' != *szCurrent) {
LogWarning("Bone name is expcted to be enclosed in "
LogWarning("Bone name is expected to be enclosed in "
"double quotation marks. ");
bQuota = false;
} else {
+1 -1
View File
@@ -219,7 +219,7 @@ aiNode* XFileImporter::CreateNodes( aiScene* pScene, aiNode* pParent, const XFil
// convert meshes from the source node
CreateMeshes( pScene, node, pNode->mMeshes);
// handle childs
// handle children
if( !pNode->mChildren.empty() ) {
node->mNumChildren = (unsigned int)pNode->mChildren.size();
node->mChildren = new aiNode* [node->mNumChildren];
+3 -3
View File
@@ -279,7 +279,7 @@ void X3DExporter::Export_Mesh(const size_t pIdxMesh, const size_t pTabLevel) {
const char *NodeName_Shape = "Shape";
list<SAttribute> attr_list;
aiMesh &mesh = *mScene->mMeshes[pIdxMesh]; // create alias for conveniance.
aiMesh &mesh = *mScene->mMeshes[pIdxMesh]; // create alias for convenience.
// Check if mesh already defined early.
if (mDEF_Map_Mesh.find(pIdxMesh) != mDEF_Map_Mesh.end()) {
@@ -375,7 +375,7 @@ void X3DExporter::Export_Material(const size_t pIdxMaterial, const size_t pTabLe
const char *NodeName_A = "Appearance";
list<SAttribute> attr_list;
aiMaterial &material = *mScene->mMaterials[pIdxMaterial]; // create alias for conveniance.
aiMaterial &material = *mScene->mMaterials[pIdxMaterial]; // create alias for convenience.
// Check if material already defined early.
if (mDEF_Map_Material.find(pIdxMaterial) != mDEF_Map_Material.end()) {
@@ -586,7 +586,7 @@ bool X3DExporter::CheckAndExport_Light(const aiNode &pNode, const size_t pTabLev
if (!found) return false;
// Light source is found.
const aiLight &light = *mScene->mLights[idx_light]; // Alias for conveniance.
const aiLight &light = *mScene->mLights[idx_light]; // Alias for convenience.
aiMatrix4x4 trafo_mat = Matrix_GlobalToCurrent(pNode).Inverse();
+1 -1
View File
@@ -207,7 +207,7 @@ void BaseImporter::GetExtensionList(std::set<std::string> &extensions) {
if (!r) {
continue;
}
// We need to make sure that we didn't accidentially identify the end of another token as our token,
// We need to make sure that we didn't accidentally identify the end of another token as our token,
// e.g. in a previous version the "gltf " present in some gltf files was detected as "f "
if (noAlphaBeforeTokens && (r != buffer && isalpha(static_cast<unsigned char>(r[-1])))) {
continue;
+1
View File
@@ -46,6 +46,7 @@ directly (unless you are adding new loaders), instead use the
corresponding preprocessor flag to selectively disable formats.
*/
#include <assimp/anim.h>
#include <assimp/BaseImporter.h>
#include <vector>
#include <cstdlib>
+2 -2
View File
@@ -52,7 +52,7 @@ using namespace Assimp;
// ------------------------------------------------------------------------------------------------
SGSpatialSort::SGSpatialSort()
{
// define the reference plane. We choose some arbitrary vector away from all basic axises
// define the reference plane. We choose some arbitrary vector away from all basic axes
// in the hope that no model spreads all its vertices along this plane.
mPlaneNormal.Set( 0.8523f, 0.34321f, 0.5736f);
mPlaneNormal.Normalize();
@@ -121,7 +121,7 @@ void SGSpatialSort::FindPositions( const aiVector3D& pPosition,
index++;
// Mow start iterating from there until the first position lays outside of the distance range.
// Add all positions inside the distance range within the given radius to the result aray
// Add all positions inside the distance range within the given radius to the result array
float squareEpsilon = pRadius * pRadius;
std::vector<Entry>::const_iterator it = mPositions.begin() + index;
+2 -2
View File
@@ -55,7 +55,7 @@ const aiVector3D PlaneInit(0.8523f, 0.34321f, 0.5736f);
// ------------------------------------------------------------------------------------------------
// Constructs a spatially sorted representation from the given position array.
// define the reference plane. We choose some arbitrary vector away from all basic axises
// define the reference plane. We choose some arbitrary vector away from all basic axes
// in the hope that no model spreads all its vertices along this plane.
SpatialSort::SpatialSort(const aiVector3D *pPositions, unsigned int pNumPositions, unsigned int pElementOffset) :
mPlaneNormal(PlaneInit) {
@@ -148,7 +148,7 @@ void SpatialSort::FindPositions(const aiVector3D &pPosition,
index++;
// Mow start iterating from there until the first position lays outside of the distance range.
// Add all positions inside the distance range within the given radius to the result aray
// Add all positions inside the distance range within the given radius to the result array
std::vector<Entry>::const_iterator it = mPositions.begin() + index;
const ai_real pSquared = pRadius * pRadius;
while (it->mDistance < maxDist) {
+1 -1
View File
@@ -614,7 +614,7 @@ void PbrtExporter::WriteMaterial(int m) {
eta != 1);
mOutput << "# - Constants: diffuse " << constantDiffuse << " specular " << constantSpecular <<
" transprency " << constantTransparency << " opacity " << constantOpacity <<
" transparency " << constantTransparency << " opacity " << constantOpacity <<
" shininess " << constantShininess << " shininess strength " << constantShininessStrength <<
" eta " << constantEta << "\n";
+1 -1
View File
@@ -67,7 +67,7 @@ bool RemoveVCProcess::IsActive(unsigned int pFlags) const {
}
// ------------------------------------------------------------------------------------------------
// Small helper function to delete all elements in a T** aray using delete
// Small helper function to delete all elements in a T** array using delete
template <typename T>
inline void ArrayDelete(T **&in, unsigned int &num) {
for (unsigned int i = 0; i < num; ++i)
+1 -1
View File
@@ -118,7 +118,7 @@ void ScaleProcess::Execute( aiScene* pScene ) {
{
aiMesh *mesh = pScene->mMeshes[meshID];
// Reconstruct mesh vertexes to the new unit system
// Reconstruct mesh vertices to the new unit system
for( unsigned int vertexID = 0; vertexID < mesh->mNumVertices; vertexID++)
{
aiVector3D& vertex = mesh->mVertices[vertexID];
+1 -1
View File
@@ -129,7 +129,7 @@ void SplitLargeMeshesProcess_Triangle::UpdateNode(aiNode* pcNode,
pcNode->mMeshes[b] = aiEntries[b];
}
// recusively update all other nodes
// recursively update all other nodes
for (unsigned int i = 0; i < pcNode->mNumChildren;++i) {
UpdateNode ( pcNode->mChildren[i], avList );
}
+2 -2
View File
@@ -178,7 +178,7 @@ void TextureTransformStep::PreProcessUVTransform(STransformVecInfo& info)
}
else if (aiTextureMapMode_Clamp == info.mapV || aiTextureMapMode_Decal == info.mapV) {
// Clamp - translations beyond 1,1 are senseless
::ai_snprintf(szTemp,512,"[c] UV V offset %f canbe clamped to 1.0f",info.mTranslation.y);
::ai_snprintf(szTemp,512,"[c] UV V offset %f can be clamped to 1.0f",info.mTranslation.y);
out = 1.f;
}
@@ -539,7 +539,7 @@ void TextureTransformStep::Execute( aiScene* pScene)
m5.a3 += trl.x; m5.b3 += trl.y;
matrix = m2 * m4 * matrix * m3 * m5;
for (src = dest; src != end; ++src) { /* manual homogenious divide */
for (src = dest; src != end; ++src) { /* manual homogeneous divide */
src->z = 1.f;
*src = matrix * *src;
src->x /= src->z;