Text archives Help
- From: bigler@sci.utah.edu
- To: manta@sci.utah.edu
- Subject: [MANTA] r1271 - in trunk: Core/Color Interface Model/Readers/glm fox/disco_demo/scenes
- Date: Wed, 24 Jan 2007 16:07:01 -0700 (MST)
Author: bigler
Date: Wed Jan 24 16:07:00 2007
New Revision: 1271
Modified:
trunk/Core/Color/RegularColorMap.h
trunk/Interface/RayPacket.h
trunk/Model/Readers/glm/glm.cc
trunk/fox/disco_demo/scenes/disco_stack.cc
Log:
Core/Color/RegularColorMap.h
Include files that seemed to missing on some comilers.
Interface/RayPacket.h
setHitPosition should return void.
Reorder member variables to quiet GCC warning.
Model/Readers/glm/glm.cc
Use default names for groups and materials. Made consistent through
the file. This fixes a bug when an obj file has a group name before
a usemtl declaration.
fox/disco_demo/scenes/disco_stack.cc
Updated to use the Factory stuff. Compilation only tested.
Modified: trunk/Core/Color/RegularColorMap.h
==============================================================================
--- trunk/Core/Color/RegularColorMap.h (original)
+++ trunk/Core/Color/RegularColorMap.h Wed Jan 24 16:07:00 2007
@@ -4,6 +4,8 @@
#include <Core/Geometry/ScalarTransform1D.h>
#include <SCIRun/Core/Containers/Array1.h>
+#include <MantaTypes.h>
+#include <Core/Color/ColorSpace.h>
namespace Manta
{
Modified: trunk/Interface/RayPacket.h
==============================================================================
--- trunk/Interface/RayPacket.h (original)
+++ trunk/Interface/RayPacket.h Wed Jan 24 16:07:00 2007
@@ -746,7 +746,7 @@
{
return Vector(data->hitPosition[0][which],
data->hitPosition[1][which], data->hitPosition[2][which]);
}
- Vector setHitPosition(int which, const Vector& hit) const
+ void setHitPosition(int which, const Vector& hit) const
{
for(int i=0;i<3;i++)
data->hitPosition[i][which] = hit[i];
@@ -799,10 +799,10 @@
public:
RayPacketData* data;
+ PacketShape shape;
int rayBegin;
int rayEnd;
int depth;
- PacketShape shape;
int flags;
};
Modified: trunk/Model/Readers/glm/glm.cc
==============================================================================
--- trunk/Model/Readers/glm/glm.cc (original)
+++ trunk/Model/Readers/glm/glm.cc Wed Jan 24 16:07:00 2007
@@ -24,6 +24,9 @@
/* defines */
#define T(x) model->triangles[(x)]
+static const char* default_group_name = "No Group";
+static const char* default_material_name = "No Material";
+
namespace Glm {
/* enums */
@@ -530,8 +533,8 @@
GLMgroup* group; /* current group */
- char* current_group_base_name = strdup("default");
- char* current_material_name = 0;
+ char* current_group_base_name = strdup(default_group_name);
+ char* current_material_name = strdup(default_material_name);
int v, n, t;
char buf[128];
@@ -730,8 +733,8 @@
numvertices = numnormals = numtexcoords = 1;
numtriangles = 0;
material = 0;
- grpname = strdup("default");
- mtlname = 0;
+ grpname = strdup(default_group_name);
+ mtlname = strdup(default_material_name);
while(fscanf(file, "%s", buf) != EOF) {
switch(buf[0]) {
case '#': /* comment */
Modified: trunk/fox/disco_demo/scenes/disco_stack.cc
==============================================================================
--- trunk/fox/disco_demo/scenes/disco_stack.cc (original)
+++ trunk/fox/disco_demo/scenes/disco_stack.cc Wed Jan 24 16:07:00 2007
@@ -32,6 +32,7 @@
#include <Core/Util/Args.h>
#include <Interface/Context.h>
#include <Interface/MantaInterface.h>
+#include <Engine/Factory/Factory.h>
#include <disco_demo/Engine/ImageTraversers/DiscoImageTraverser.h>
#include <disco_demo/Engine/Renderers/DiscoRayTracer.h>
@@ -60,6 +61,7 @@
int tilex = 8;
int tiley = 8;
int kernel_width = 3;
+
/////////////////////////////////////////////////////////////////////////////
// Parse command line args.
@@ -89,9 +91,11 @@
// Obtain pointer to manta.
MantaInterface *manta_interface = context.manta_interface;
+ Factory* factory = new Factory( manta_interface );
+
// Defaults.
- manta_interface->selectLoadBalancer ( "workqueue" );
- manta_interface->selectShadowAlgorithm( "noshadows" );
+ factory->selectLoadBalancer ( "workqueue" );
+ factory->selectShadowAlgorithm( "noshadows" );
/////////////////////////////////////////////////////////////////////////////
// Create the disco shaders.
- [MANTA] r1271 - in trunk: Core/Color Interface Model/Readers/glm fox/disco_demo/scenes, bigler, 01/24/2007
Archive powered by MHonArc 2.6.16.