[DEV] basic display of 2 basic cube
This commit is contained in:
parent
9913bf8b28
commit
59a2162deb
@ -80,7 +80,7 @@ void appl::Windows::init() {
|
||||
ewol::widget::Windows::init();
|
||||
setTitle("example ege : MeshCreator");
|
||||
|
||||
//getObjectManager().periodicCall.bind(shared_from_this(), &appl::Windows::onCallbackPeriodicUpdateCamera);
|
||||
getObjectManager().periodicCall.bind(shared_from_this(), &appl::Windows::onCallbackPeriodicUpdateCamera);
|
||||
|
||||
m_env = ege::Environement::create();
|
||||
// Create basic Camera
|
||||
@ -101,12 +101,12 @@ void appl::Windows::init() {
|
||||
if (myMesh != nullptr) {
|
||||
m_env->addStaticMeshToDraw(myMesh);
|
||||
}
|
||||
myMesh = createGrid(10, vec3(0,0,0), 5);
|
||||
myMesh = ege::resource::Mesh::createGrid(10, vec3(0,0,0), 5);
|
||||
if (myMesh != nullptr) {
|
||||
m_env->addStaticMeshToDraw(myMesh);
|
||||
}
|
||||
if (true) {
|
||||
myMesh = ege::resource::Mesh::create("---");
|
||||
myMesh = createMars();
|
||||
if (myMesh != nullptr) {
|
||||
std::shared_ptr<ege::ElementBase> element = std::make_shared<ege::ElementBase>(m_env);
|
||||
//std::shared_ptr<ege::ElementPhysic> element = std::make_shared<ege::ElementPhysic>(m_env);
|
||||
|
@ -93,7 +93,16 @@ void appl::Windows::init() {
|
||||
}
|
||||
myMesh = ege::resource::Mesh::createCube(3);
|
||||
if (myMesh != nullptr) {
|
||||
m_env->addStaticMeshToDraw(myMesh);
|
||||
std::shared_ptr<ege::ElementBase> element = std::make_shared<ege::ElementBase>(m_env);
|
||||
//std::shared_ptr<ege::ElementPhysic> element = std::make_shared<ege::ElementPhysic>(m_env);
|
||||
element->setPosition(vec3(50,0,0));
|
||||
element->setMesh(myMesh);
|
||||
m_env->addElement(element);
|
||||
element = std::make_shared<ege::ElementBase>(m_env);
|
||||
//std::shared_ptr<ege::ElementPhysic> element = std::make_shared<ege::ElementPhysic>(m_env);
|
||||
element->setPosition(vec3(-50,0,0));
|
||||
element->setMesh(myMesh);
|
||||
m_env->addElement(element);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user