/
redgpu
/
bullet
Обзор
Документация
Войти
/
redgpu
/
bullet
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
2.87
examples/SharedMemory/PhysicsServerExampleBullet2.cpp
32 строки
901 B
erwincoumans
Prepare/allow for non-Bullet2-based physics command processor in pybullet/Bullet-C-API
31 май 2017, 05:54
31 май 2017, 05:54
83f9107
Код
Авторство
О чём код?
#include "PhysicsServerExampleBullet2.h" #include "PhysicsServerExample.h" #include "PhysicsServerCommandProcessor.h" #include "../CommonInterfaces/CommonExampleInterface.h" struct Bullet2CommandProcessorCreation : public CommandProcessorCreationInterface { virtual class CommandProcessorInterface* createCommandProcessor() { PhysicsServerCommandProcessor* proc = new PhysicsServerCommandProcessor; return proc; } virtual void deleteCommandProcessor(CommandProcessorInterface* proc) { delete proc; } }; static Bullet2CommandProcessorCreation sBullet2CommandCreator; CommonExampleInterface* PhysicsServerCreateFuncBullet2(struct CommonExampleOptions& options) { options.m_commandProcessorCreation = &sBullet2CommandCreator; CommonExampleInterface* example = PhysicsServerCreateFuncInternal(options); return example; } B3_STANDALONE_EXAMPLE(PhysicsServerCreateFuncBullet2)