PhysicsServerExampleBullet2.cpp 893 B

12345678910111213141516171819202122232425262728293031
  1. #include "PhysicsServerExampleBullet2.h"
  2. #include "PhysicsServerExample.h"
  3. #include "PhysicsServerCommandProcessor.h"
  4. #include "../CommonInterfaces/CommonExampleInterface.h"
  5. struct Bullet2CommandProcessorCreation : public CommandProcessorCreationInterface
  6. {
  7. virtual class CommandProcessorInterface* createCommandProcessor()
  8. {
  9. PhysicsServerCommandProcessor* proc = new PhysicsServerCommandProcessor;
  10. return proc;
  11. }
  12. virtual void deleteCommandProcessor(CommandProcessorInterface* proc)
  13. {
  14. delete proc;
  15. }
  16. };
  17. static Bullet2CommandProcessorCreation sBullet2CommandCreator;
  18. CommonExampleInterface* PhysicsServerCreateFuncBullet2(struct CommonExampleOptions& options)
  19. {
  20. options.m_commandProcessorCreation = &sBullet2CommandCreator;
  21. CommonExampleInterface* example = PhysicsServerCreateFuncInternal(options);
  22. return example;
  23. }
  24. B3_STANDALONE_EXAMPLE(PhysicsServerCreateFuncBullet2)