//----------------------------------------------------------------------------- // Torque Game Engine // Copyright (C) GarageGames.com, Inc. //----------------------------------------------------------------------------- #ifdef _MSC_VER #pragma warning(disable : 4786 4018) #endif #include "appNode.h" #include "DTSUtil.h" namespace DTS { AppNode::AppNode() { mName = NULL; mParentName = NULL; } AppNode::~AppNode() { S32 i; for (i=0; i=0) return mMeshes[idx]; return NULL; } S32 AppNode::getNumChildNodes() { if (mChildNodes.size() == 0) buildChildList(); return mChildNodes.size(); } AppNode * AppNode::getChildNode(S32 idx) { if (mChildNodes.size() == 0) buildChildList(); if (idx=0) return mChildNodes[idx]; return NULL; } bool AppNode::isBillboard() { return !_strnicmp(getName(),"BB::",4) || !_strnicmp(getName(),"BB_",3) || !_strnicmp(getName(),"BBZ::",5) || !_strnicmp(getName(),"BBZ_",4); } bool AppNode::isBillboardZAxis() { return !_strnicmp(getName(),"BBZ::",5) || !_strnicmp(getName(),"BBZ_",4); } bool AppNode::isDummy() { // naming convention should work well enough... // ...but can override this method if one wants more return !_strnicmp(getName(), "dummy", 5); } bool AppNode::isBounds() { // naming convention should work well enough... // ...but can override this method if one wants more return !_stricmp(getName(), "bounds"); } bool AppNode::isRoot() { // we assume root node isn't added, so this is never true // but allow for possibility (by overriding this method) // so that isParentRoot still works. return false; } }; // namespace DTS