Skip to content

Commit

Permalink
Update add setCustomMesh() for fur add setNoise()
Browse files Browse the repository at this point in the history
  • Loading branch information
kashimAstro committed Nov 3, 2016
1 parent cc404d5 commit 112da54
Show file tree
Hide file tree
Showing 34 changed files with 161,390 additions and 14 deletions.
12 changes: 8 additions & 4 deletions example-furryprimitive-assimp/src/ofApp.cpp
Expand Up @@ -34,18 +34,19 @@ void ofApp::setup(){
}

void ofApp::changePrimitive(int & v){
if(v == 0) scale.set(ofVec3f(1,1,1.22));
if(v == 1) scale.set(ofVec3f(1,1,10));
if(v == 0) scale.set(ofVec3f(1,1,1.22));
if(v == 1) { scale.set(ofVec3f(1,1,10)); pcounter = 0; }
if(v == 2) scale.set(ofVec3f(1,1,8));
if(v == 3) scale.set(ofVec3f(0.32,0.2,10));
if(v == 4) scale.set(ofVec3f(1,1,1));
if(v > 4) pcounter = 0;

furryprimitive.primitive(v);
furryprimitive.setPrimitive(v);
}

//--------------------------------------------------------------
void ofApp::update(){
ofSetWindowTitle(ofToString(ofGetFrameRate()));
//ofSetWindowTitle(ofToString(ofGetFrameRate()));

furryprimitive.setTexture(texture[pcounter]);
furryprimitive.setRangeOrientation(rangeorien);
Expand All @@ -59,6 +60,7 @@ void ofApp::update(){
if(acounter>speedanim) acounter=0;
model.setPositionForAllAnimations(animationPosition);
mesh = model.getCurrentAnimatedMesh(0);
meshWire = furryprimitive.getMeshResized();
furryprimitive.update(mesh);
}

Expand All @@ -68,6 +70,8 @@ void ofApp::draw(){

ofEnableDepthTest();
camera.begin();
ofSetColor(0);
meshWire.drawWireframe();
if(wirefill)
furryprimitive.draw(OF_MESH_FILL);
else
Expand Down
2 changes: 1 addition & 1 deletion example-furryprimitive-assimp/src/ofApp.h
Expand Up @@ -24,7 +24,7 @@ class ofApp : public ofBaseApp{
void gotMessage(ofMessage msg);

FurryPrimitive furryprimitive;
ofVboMesh mesh;
ofVboMesh mesh,meshWire;
ofEasyCam camera;
ofxAssimpModelLoader model;
vector<ofImage> texture;
Expand Down
13 changes: 13 additions & 0 deletions example-furryprimitive-customfur/Makefile
@@ -0,0 +1,13 @@
# Attempt to load a config.make file.
# If none is found, project defaults in config.project.make will be used.
ifneq ($(wildcard config.make),)
include config.make
endif

# make sure the the OF_ROOT location is defined
ifndef OF_ROOT
OF_ROOT=$(realpath ../../..)
endif

# call the project makefile!
include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk
4 changes: 4 additions & 0 deletions example-furryprimitive-customfur/addons.make
@@ -0,0 +1,4 @@
ofxAssimpModelLoader
ofxFurry
ofxGui
ofxKinect
14 changes: 14 additions & 0 deletions example-furryprimitive-customfur/bin/data/dummy/dummy_obj.mtl
@@ -0,0 +1,14 @@
newmtl blinn3SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd dummy_wood.jpg
Ni 1.00
Ks 0.50 0.50 0.50
newmtl initialShadingGroup
illum 4
Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00

0 comments on commit 112da54

Please sign in to comment.