mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-25 02:10:53 +00:00
Changed: Minor changes
--HG-- branch : develop
This commit is contained in:
parent
9ee32071d8
commit
14f48d821a
2 changed files with 14 additions and 14 deletions
|
@ -95,13 +95,13 @@ namespace NLQT
|
||||||
|
|
||||||
void CObjectViewerWidget::showEvent ( QShowEvent * event )
|
void CObjectViewerWidget::showEvent ( QShowEvent * event )
|
||||||
{
|
{
|
||||||
if (!_mainTimer->isActive())
|
if (!_mainTimer->isActive())
|
||||||
{
|
{
|
||||||
_mainTimer->start(25);
|
_mainTimer->start(25);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CObjectViewerWidget::setNelContext(NLMISC::INelContext &nelContext)
|
void CObjectViewerWidget::setNelContext(NLMISC::INelContext &nelContext)
|
||||||
{
|
{
|
||||||
_LibContext = new CLibraryContext(nelContext);
|
_LibContext = new CLibraryContext(nelContext);
|
||||||
}
|
}
|
||||||
|
@ -268,7 +268,7 @@ namespace NLQT
|
||||||
// ...
|
// ...
|
||||||
|
|
||||||
// 09. Update Animations (playlists)
|
// 09. Update Animations (playlists)
|
||||||
// - Needs to be either before or after entities, not sure,
|
// - Needs to be either before or after entities, not sure,
|
||||||
// there was a problem with wrong order a while ago!!!
|
// there was a problem with wrong order a while ago!!!
|
||||||
|
|
||||||
|
|
||||||
|
@ -291,7 +291,7 @@ namespace NLQT
|
||||||
|
|
||||||
if (_isGraphicsInitialized && !getDriver()->isLost())
|
if (_isGraphicsInitialized && !getDriver()->isLost())
|
||||||
{
|
{
|
||||||
// 01. Render Driver (background color)
|
// 01. Render Driver (background color)
|
||||||
renderDriver(); // clear all buffers
|
renderDriver(); // clear all buffers
|
||||||
|
|
||||||
// 02. Render Sky (sky scene)
|
// 02. Render Sky (sky scene)
|
||||||
|
@ -436,14 +436,14 @@ namespace NLQT
|
||||||
bool CObjectViewerWidget::loadMesh(const std::string &meshFileName, const std::string &skelFileName)
|
bool CObjectViewerWidget::loadMesh(const std::string &meshFileName, const std::string &skelFileName)
|
||||||
{
|
{
|
||||||
std::string fileName = CFile::getFilenameWithoutExtension(meshFileName);
|
std::string fileName = CFile::getFilenameWithoutExtension(meshFileName);
|
||||||
if ( _Entities.count(fileName) != 0)
|
if ( _Entities.count(fileName) != 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
CPath::addSearchPath(CFile::getPath(meshFileName), false, false);
|
CPath::addSearchPath(CFile::getPath(meshFileName), false, false);
|
||||||
|
|
||||||
// create instance of the mesh character
|
// create instance of the mesh character
|
||||||
UInstance Entity = _Scene->createInstance(meshFileName);
|
UInstance Entity = _Scene->createInstance(meshFileName);
|
||||||
|
|
||||||
CAABBox bbox;
|
CAABBox bbox;
|
||||||
Entity.getShapeAABBox(bbox);
|
Entity.getShapeAABBox(bbox);
|
||||||
setCamera(_Scene, bbox , Entity, true);
|
setCamera(_Scene, bbox , Entity, true);
|
||||||
|
@ -464,7 +464,7 @@ namespace NLQT
|
||||||
entity._FileNameShape = meshFileName;
|
entity._FileNameShape = meshFileName;
|
||||||
entity._FileNameSkeleton = skelFileName;
|
entity._FileNameSkeleton = skelFileName;
|
||||||
entity._Instance = Entity;
|
entity._Instance = Entity;
|
||||||
if (!Skeleton.empty())
|
if (!Skeleton.empty())
|
||||||
{
|
{
|
||||||
entity._Skeleton = Skeleton;
|
entity._Skeleton = Skeleton;
|
||||||
entity._Skeleton.bindSkin (entity._Instance);
|
entity._Skeleton.bindSkin (entity._Instance);
|
||||||
|
|
|
@ -33,7 +33,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#include "entity.h"
|
#include "entity.h"
|
||||||
#include "interfaces.h"
|
#include "interfaces.h"
|
||||||
|
|
||||||
namespace NL3D
|
namespace NL3D
|
||||||
{
|
{
|
||||||
class UDriver;
|
class UDriver;
|
||||||
class UScene;
|
class UScene;
|
||||||
|
@ -50,14 +50,14 @@ class QIcon;
|
||||||
namespace NLQT
|
namespace NLQT
|
||||||
@brief namespace NLQT
|
@brief namespace NLQT
|
||||||
*/
|
*/
|
||||||
namespace NLQT
|
namespace NLQT
|
||||||
{
|
{
|
||||||
class CObjectViewerWidget:
|
class CObjectViewerWidget:
|
||||||
public QWidget,
|
public QWidget,
|
||||||
public IObjectViewer
|
public IObjectViewer
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_INTERFACES(NLQT::IObjectViewer)
|
Q_INTERFACES(NLQT::IObjectViewer)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/// Default constructor.
|
/// Default constructor.
|
||||||
|
@ -113,7 +113,7 @@ namespace NLQT
|
||||||
/// @param w - width window.
|
/// @param w - width window.
|
||||||
/// @param h - height window.
|
/// @param h - height window.
|
||||||
void setSizeViewport(uint16 w, uint16 h);
|
void setSizeViewport(uint16 w, uint16 h);
|
||||||
|
|
||||||
void setBloomEffect(bool enabled) { _BloomEffect = enabled; }
|
void setBloomEffect(bool enabled) { _BloomEffect = enabled; }
|
||||||
|
|
||||||
/// Select instance from the scene
|
/// Select instance from the scene
|
||||||
|
@ -184,7 +184,7 @@ namespace NLQT
|
||||||
void updateRender();
|
void updateRender();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
/// Update the animation time for Particle System animation.
|
/// Update the animation time for Particle System animation.
|
||||||
/// @param deltaTime - set the manual animation time.
|
/// @param deltaTime - set the manual animation time.
|
||||||
void updateAnimatePS(uint64 deltaTime = 0);
|
void updateAnimatePS(uint64 deltaTime = 0);
|
||||||
|
|
Loading…
Reference in a new issue