History

rename model:: -> graphics::

humbletim committed 8 years ago

Commit b91d5361 parent 08ccda971 files · +340 −340Browse files

Showing the changes to libraries/render-utils/src/Model.cpp (1 of 71 files). Show all

Unified · Split

libraries/render-utils/src/Model.cpp+7−7
@@ -46,7 +46,7 @@ float Model::FAKE_DIMENSION_PLACEHOLDER = -1.0f; · 45 unmodified lines
46#define HTTP_INVALID_COM "http://invalid.com"46#define HTTP_INVALID_COM "http://invalid.com"
47 47
48const int NUM_COLLISION_HULL_COLORS = 24;48const int NUM_COLLISION_HULL_COLORS = 24;
49std::vector<model::MaterialPointer> _collisionMaterials;49std::vector<graphics::MaterialPointer> _collisionMaterials;
50 50
51void initCollisionMaterials() {51void initCollisionMaterials() {
52 // generates bright colors in red, green, blue, yellow, magenta, and cyan spectrums52 // generates bright colors in red, green, blue, yellow, magenta, and cyan spectrums
@@ -72,8 +72,8 @@ void initCollisionMaterials() { · 19 unmodified lines
72 // so they don't tend to group together for large models72 // so they don't tend to group together for large models
73 for (int i = 0; i < sectionWidth; ++i) {73 for (int i = 0; i < sectionWidth; ++i) {
74 for (int j = 0; j < numComponents; ++j) {74 for (int j = 0; j < numComponents; ++j) {
75 model::MaterialPointer material;75 graphics::MaterialPointer material;
76 material = std::make_shared<model::Material>();76 material = std::make_shared<graphics::Material>();
77 int index = j * sectionWidth + i;77 int index = j * sectionWidth + i;
78 float red = component[index];78 float red = component[index];
79 float green = component[(index + greenPhase) % NUM_COLLISION_HULL_COLORS];79 float green = component[(index + greenPhase) % NUM_COLLISION_HULL_COLORS];
@@ -559,7 +559,7 @@ MeshProxyList Model::getMeshes() const { · 479 unmodified lines
559 offset.postTranslate(_offset);559 offset.postTranslate(_offset);
560 glm::mat4 offsetMat = offset.getMatrix();560 glm::mat4 offsetMat = offset.getMatrix();
561 561
562 for (std::shared_ptr<const model::Mesh> mesh : meshes) {562 for (std::shared_ptr<const graphics::Mesh> mesh : meshes) {
563 if (!mesh) {563 if (!mesh) {
564 continue;564 continue;
565 }565 }
@@ -1481,7 +1481,7 @@ void Model::createCollisionRenderItemSet() { · 915 unmodified lines
1481 // Create the render payloads1481 // Create the render payloads
1482 int numParts = (int)mesh->getNumParts();1482 int numParts = (int)mesh->getNumParts();
1483 for (int partIndex = 0; partIndex < numParts; partIndex++) {1483 for (int partIndex = 0; partIndex < numParts; partIndex++) {
1484 model::MaterialPointer& material = _collisionMaterials[partIndex % NUM_COLLISION_HULL_COLORS];1484 graphics::MaterialPointer& material = _collisionMaterials[partIndex % NUM_COLLISION_HULL_COLORS];
1485 auto payload = std::make_shared<MeshPartPayload>(mesh, partIndex, material);1485 auto payload = std::make_shared<MeshPartPayload>(mesh, partIndex, material);
1486 payload->updateTransform(identity, offset);1486 payload->updateTransform(identity, offset);
1487 _collisionRenderItems << payload;1487 _collisionRenderItems << payload;
@@ -1495,7 +1495,7 @@ bool Model::isRenderable() const { · 7 unmodified lines
1495 1495
1496class CollisionRenderGeometry : public Geometry {1496class CollisionRenderGeometry : public Geometry {
1497public:1497public:
1498 CollisionRenderGeometry(model::MeshPointer mesh) {1498 CollisionRenderGeometry(graphics::MeshPointer mesh) {
1499 _fbxGeometry = std::make_shared<FBXGeometry>();1499 _fbxGeometry = std::make_shared<FBXGeometry>();
1500 std::shared_ptr<GeometryMeshes> meshes = std::make_shared<GeometryMeshes>();1500 std::shared_ptr<GeometryMeshes> meshes = std::make_shared<GeometryMeshes>();
1501 meshes->push_back(mesh);1501 meshes->push_back(mesh);
@@ -1504,7 +1504,7 @@ public: · 2 unmodified lines
1504 }1504 }
1505};1505};
1506 1506
1507void Model::setCollisionMesh(model::MeshPointer mesh) {1507void Model::setCollisionMesh(graphics::MeshPointer mesh) {
1508 if (mesh) {1508 if (mesh) {
1509 _collisionGeometry = std::make_shared<CollisionRenderGeometry>(mesh);1509 _collisionGeometry = std::make_shared<CollisionRenderGeometry>(mesh);
1510 } else {1510 } else {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t