/// Enters a new xml element, which increases the indentation
void PushTag() { startstr.append( " "); }
/// Leaves an element, decreasing the indentation
- void PopTag() { ai_assert( startstr.length() > 1); startstr.erase( startstr.length() - 2); }
+ void PopTag() {
+ ai_assert( startstr.length() > 1);
+ startstr.erase( startstr.length() - 2);
+ }
/// Creates a mesh ID for the given mesh
std::string GetMeshId( size_t pIndex) const {
size_t ZipFile::Read(void* pvBuffer, size_t pSize, size_t pCount) {
const size_t size = pSize * pCount;
- assert(size <= m_Size);
+ ai_assert(size <= m_Size);
std::memcpy(pvBuffer, m_Buffer, size);
ai_assert( m_mapping_counts.size() == m_mapping_offsets.size() );
count = m_mapping_counts[ in_index ];
-// ai_assert( count != 0 );
ai_assert( m_mapping_offsets[ in_index ] + count <= m_mappings.size() );
return &m_mappings[ m_mapping_offsets[ in_index ] ];
// Forward declarations
class Element;
-
/** Represents a dynamic property. Type info added by deriving classes,
* see #TypedProperty.
Example:
@verbatim
P: "ShininessExponent", "double", "Number", "",0.5
@endvebatim
-
*/
class Property
{
}
};
-
template<typename T>
class TypedProperty : public Property
{
// ------------------------------------------------------------------------------------------------
template <typename T>
-inline T PropertyGet(const PropertyTable& in, const std::string& name,
- const T& defaultValue)
-{
+inline
+T PropertyGet(const PropertyTable& in, const std::string& name, const T& defaultValue) {
const Property* const prop = in.Get(name);
- if(!prop) {
+ if( nullptr == prop) {
return defaultValue;
}
// strong typing, no need to be lenient
const TypedProperty<T>* const tprop = prop->As< TypedProperty<T> >();
- if(!tprop) {
+ if( nullptr == tprop) {
return defaultValue;
}
return tprop->Value();
}
-
// ------------------------------------------------------------------------------------------------
template <typename T>
-inline T PropertyGet(const PropertyTable& in, const std::string& name,
- bool& result)
-{
+inline
+T PropertyGet(const PropertyTable& in, const std::string& name, bool& result) {
const Property* const prop = in.Get(name);
- if(!prop) {
+ if( nullptr == prop) {
result = false;
return T();
}
// strong typing, no need to be lenient
const TypedProperty<T>* const tprop = prop->As< TypedProperty<T> >();
- if(!tprop) {
+ if( nullptr == tprop) {
result = false;
return T();
}
return tprop->Value();
}
-
} //! FBX
} //! Assimp
return std::string(begin(),end());
}
-public:
bool IsBinary() const {
return column == BINARY_MARKER;
}
void HMPImporter::ReadFirstSkin(unsigned int iNumSkins, const unsigned char* szCursor,
const unsigned char** szCursorOut)
{
- ai_assert(0 != iNumSkins && NULL != szCursor);
+ ai_assert( 0 != iNumSkins );
+ ai_assert( nullptr != szCursor);
// read the type of the skin ...
// sometimes we need to skip 12 bytes here, I don't know why ...
IntersectsBoundaryProfile(p, p + IfcVector3(0.6, -0.6, 0.0), boundary, true, intersected_boundary, true);
votes += intersected_boundary.size() % 2;
-// ai_assert(votes == 3 || votes == 0);
return votes > 1;
}
const ParamRange range = GetParametricRange();
if (IsClosed()) {
return true;
- //ai_assert(range.first != std::numeric_limits<IfcFloat>::infinity() && range.second != std::numeric_limits<IfcFloat>::infinity());
- //u = range.first + std::fmod(u-range.first,range.second-range.first);
}
const IfcFloat epsilon = 1e-5;
return u - range.first > -epsilon && range.second - u > -epsilon;
vmax -= vmin;
// If this happens then the projection must have been wrong.
- assert(vmax.Length());
+ ai_assert(vmax.Length());
ClipperLib::ExPolygons clipped;
ClipperLib::Polygons holes_union;
std::vector<IfcVector3> tmpvec;
for(ClipperLib::Polygon& opening : holes_union) {
- assert(ClipperLib::Orientation(opening));
+ ai_assert(ClipperLib::Orientation(opening));
tmpvec.clear();
static_cast<IfcFloat>( tri->GetPoint(i)->y )
);
- assert(v.x <= 1.0 && v.x >= 0.0 && v.y <= 1.0 && v.y >= 0.0);
+ ai_assert(v.x <= 1.0 && v.x >= 0.0 && v.y <= 1.0 && v.y >= 0.0);
const IfcVector3 v3 = minv * IfcVector3(vmin.x + v.x * vmax.x, vmin.y + v.y * vmax.y,coord) ;
curmesh.verts.push_back(v3);
const unsigned char* szCurrent,
const unsigned char** szCurrentOut)
{
- ai_assert(NULL != szCurrent && NULL != szCurrentOut);
+ ai_assert( nullptr != szCurrent );
+ ai_assert( nullptr != szCurrentOut);
+
const MDL::Header_MDL7 *pcHeader = (const MDL::Header_MDL7*)mBuffer;
// if we have no bones we can simply skip all frames,
// add bone child nodes
void SMDImporter::AddBoneChildren(aiNode* pcNode, uint32_t iParent)
{
- ai_assert(NULL != pcNode && 0 == pcNode->mNumChildren && NULL == pcNode->mChildren);
+ ai_assert( NULL != pcNode );
+ ai_assert( 0 == pcNode->mNumChildren );
+ ai_assert( NULL == pcNode->mChildren);
// first count ...
for (unsigned int i = 0; i < asBones.size();++i)
void PushTag() { startstr.append( " "); }
/// Leaves an element, decreasing the indentation
- void PopTag() { ai_assert( startstr.length() > 1); startstr.erase( startstr.length() - 2); }
+ void PopTag() {
+ ai_assert( startstr.length() > 1);
+ startstr.erase( startstr.length() - 2);
+ }
public:
/// Stringstream to write all output into
void CGLView::Matrix_NodeToRoot(const aiNode* pNode, aiMatrix4x4& pOutMatrix)
{
-const aiNode* node_cur;
-std::list<aiMatrix4x4> mat_list;
+ const aiNode* node_cur;
+ std::list<aiMatrix4x4> mat_list;
pOutMatrix = aiMatrix4x4();
// starting walk from current element to root