Leviathan  0.8.0.0
Leviathan game engine
Leviathan::NewtonManager Class Reference

#include <NewtonManager.h>

Public Member Functions

DLLEXPORT NewtonManager ()
 
DLLEXPORT ~NewtonManager ()
 
DLLEXPORT std::shared_ptr< PhysicalWorldCreateWorld (GameWorld *owningworld)
 

Static Public Member Functions

static DLLEXPORT NewtonManagerGet ()
 

Static Protected Attributes

static NewtonManagerStaticaccess = NULL
 

Detailed Description

Definition at line 10 of file NewtonManager.h.

Constructor & Destructor Documentation

◆ NewtonManager()

DLLEXPORT Leviathan::NewtonManager::NewtonManager ( )

Definition at line 20 of file NewtonManager.cpp.

20  {
21  Staticaccess = this;
22 
23  // initialize newton library //
24  NewtonSetMemorySystem(AllocMemory, FreeMemory);
25 }
static NewtonManager * Staticaccess
Definition: NewtonManager.h:29
void * AllocMemory(int size)
void FreeMemory(void *ptr, int size)

◆ ~NewtonManager()

DLLEXPORT Leviathan::NewtonManager::~NewtonManager ( )

Definition at line 27 of file NewtonManager.cpp.

27  {
28  // reset static variable to get nice errors with pointers //
29  if(Staticaccess == this)
30  Staticaccess = NULL;
31 
32  // release newton library //
33 
34 
35 }
static NewtonManager * Staticaccess
Definition: NewtonManager.h:29

Member Function Documentation

◆ CreateWorld()

DLLEXPORT std::shared_ptr< PhysicalWorld > Leviathan::NewtonManager::CreateWorld ( GameWorld owningworld)

Definition at line 39 of file NewtonManager.cpp.

39  {
40  // we are probably initialized at this point so it should be safe to just call the constructor //
41  return std::shared_ptr<PhysicalWorld>(new PhysicalWorld(owningworld));
42 }

◆ Get()

static DLLEXPORT NewtonManager* Leviathan::NewtonManager::Get ( )
inlinestatic

Definition at line 19 of file NewtonManager.h.

19  {
20  return Staticaccess;
21  }
static NewtonManager * Staticaccess
Definition: NewtonManager.h:29

Member Data Documentation

◆ Staticaccess

NewtonManager * Leviathan::NewtonManager::Staticaccess = NULL
staticprotected

Definition at line 29 of file NewtonManager.h.


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