Skip to content

Commit ba24cda

Browse files
committed
update advanced example.
1 parent 2941501 commit ba24cda

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

examples/3d/ofxAssimpAdvancedExample/src/ofApp.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ void ofApp::setup(){
1818
gui.add(cubeMapExposure.set("CubeMapExposure", 0.25, 0.0, 1.0));
1919
gui.add(mBDrawCubeMap.set("DrawCubeMap", false ));
2020

21-
ofx::assimp::ImportSettings tsettings;
21+
ofxAssimp::ImportSettings tsettings;
2222
tsettings.filePath = "ofLogoHollow.fbx";
2323
// we don't have any animations in this model
2424
tsettings.importAnimations = false;
@@ -56,12 +56,12 @@ void ofApp::setup(){
5656
tsettings.importAnimations = true;
5757
tsettings.excludeNodesContainingStrings = {"_Goal"};
5858
tsettings.convertToLeftHanded = false;
59-
srcFoxModel = make_shared<ofx::assimp::Model>();
60-
if( srcFoxModel->load(tsettings) ) {
59+
srcFoxScene = make_shared<ofxAssimp::Scene>();
60+
if( srcFoxScene->load(tsettings) ) {
6161
int numFoxes = 16;
6262
for( int i = 0; i < numFoxes; i++ ) {
63-
auto fox = make_shared<ofx::assimp::Model>();
64-
if( fox->setup(srcFoxModel->getSrcScene())) {
63+
auto fox = make_shared<ofxAssimp::Scene>();
64+
if( fox->setup(srcFoxScene->getSrcScene())) {
6565
fox->addAnimation( 0, "idle", 2, 300, OF_LOOP_NORMAL );
6666
fox->addAnimation( 0, "idleBark", 310, 350 );
6767
fox->addAnimation( 0, "jump", 852, 890 );
@@ -173,7 +173,7 @@ void ofApp::update(){
173173
fox->setPosition( fx-80.0, 20.0, 320.0f + sinf(glm::pi<float>() * fpct) * 100.0f );
174174
}
175175

176-
auto wizardLeftHand = wizardModel.getNodeAsType<ofx::assimp::Bone>("*:hand right");
176+
auto wizardLeftHand = wizardModel.getNodeAsType<ofxAssimp::Bone>("*:hand right");
177177
if(wizardLeftHand) {
178178
auto lpos = wizardLeftHand->getGlobalOrientation() * wizardHandOffset.get();
179179
light.setPosition(wizardLeftHand->getGlobalPosition()+lpos);

examples/3d/ofxAssimpAdvancedExample/src/ofApp.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#pragma once
22
#include "ofMain.h"
3-
#include "ofxAssimpModel.h"
3+
#include "ofxAssimp.h"
44
#include "ofxGui.h"
55

66
class ofApp : public ofBaseApp{
@@ -27,11 +27,11 @@ class ofApp : public ofBaseApp{
2727

2828
ofEasyCam cam;
2929
ofLight light;
30-
ofx::assimp::Model wizardModel;
30+
ofxAssimp::Scene wizardModel;
3131

32-
ofx::assimp::Model logoModel;
33-
shared_ptr<ofx::assimp::Model> srcFoxModel;
34-
vector< shared_ptr<ofx::assimp::Model> > foxes;
32+
ofxAssimp::Scene logoModel;
33+
shared_ptr<ofxAssimp::Scene> srcFoxScene;
34+
vector< shared_ptr<ofxAssimp::Scene> > foxes;
3535

3636
shared_ptr<ofMaterial> logoMaterial;
3737

0 commit comments

Comments
 (0)