Skip to content

Commit

Permalink
added enable and disable colors in of3dModel
Browse files Browse the repository at this point in the history
  • Loading branch information
NickHardeman committed Oct 1, 2012
1 parent 792d586 commit cdbde04
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
16 changes: 12 additions & 4 deletions libs/openFrameworks/3d/of3dPrimitives.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,6 @@ ofMesh of3dModel::getMeshForIndexes(int meshIndex, int startIndex, int endIndex,
}


//----------------------------------------------------------
//ofVec3f of3dModel::getScale() {
// return _scale;
//}
//----------------------------------------------------------
bool of3dModel::hasScaling() {
ofVec3f scale = getScale();
Expand Down Expand Up @@ -200,6 +196,12 @@ void of3dModel::enableTextures() {
}
}
//----------------------------------------------------------
void of3dModel::enableColors() {
for(int i = 0; i < getNumMeshes(); i++) {
getMesh(i).enableColors();
}
}
//----------------------------------------------------------
void of3dModel::disableNormals() {
for(int i = 0; i < getNumMeshes(); i++) {
getMesh(i).disableNormals();
Expand All @@ -211,6 +213,12 @@ void of3dModel::disableTextures() {
getMesh(i).disableTextures();
}
}
//----------------------------------------------------------
void of3dModel::disableColors() {
for(int i = 0; i < getNumMeshes(); i++) {
getMesh(i).disableColors();
}
}


// SETTERS //
Expand Down
2 changes: 2 additions & 0 deletions libs/openFrameworks/3d/of3dPrimitives.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,11 @@ class of3dModel : public ofNode {

void enableNormals();
void enableTextures();
void enableColors();

void disableNormals();
void disableTextures();
void disableColors();

void setResolution( int resX, int resY, int resZ );

Expand Down

0 comments on commit cdbde04

Please sign in to comment.