Fresco/Berlin/modules/Primitives PrimitiveKitImpl.cc,1.10,1.11

Tobias Hunger <[email protected]>
Newsgroups gmane.comp.video.fresco.cvs
Message-ID <[email protected]>
Update of /cvs/fresco/Fresco/Berlin/modules/Primitives
In directory purcel:/tmp/cvs-serv1225/Berlin/modules/Primitives

Modified Files:
	PrimitiveKitImpl.cc 
Log Message:
Initial checkin of a scene graph debugging framework.

To activate run the server with the -D option (and -l if you want to
see the log output of course). To get a dot-file of the current
scene graph send a USR1 signal to the server process. It will then 
dump the graph into /tmp/debug.dot. Use graphviz's dot-tool to turn that
file into a PS-drawing of the scene graph (cat /tmp/debug.dot | dot -Tps).

TODO: * add more information to the output (transformation, allocation, etc.)
      * make sure all graphics get registered. We have a couple of "unknowns"
        in the dump as of now.


Index: PrimitiveKitImpl.cc
===================================================================
RCS file: /cvs/fresco/Fresco/Berlin/modules/Primitives/PrimitiveKitImpl.cc,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- PrimitiveKitImpl.cc	18 Feb 2003 07:26:32 -0000	1.10
+++ PrimitiveKitImpl.cc	26 Feb 2003 00:19:07 -0000	1.11
@@ -44,12 +44,13 @@
     return create_and_set_body<Graphic>(
 	new Root(Alignment(0.5), Alignment(0.5),
 		 Alignment(0.5), Alignment(0.5),
-		 Alignment(0.5), Alignment(0.5)), g);
+		 Alignment(0.5), Alignment(0.5)), g, "PrimitiveKit/root");
 }
 
 Primitive::Geometry_ptr PrimitiveKitImpl::geometry(const Fresco::Mesh &mesh)
 {
-  return create<Primitive::Geometry>(new GeometryImpl(mesh));
+  return create<Primitive::Geometry>(new GeometryImpl(mesh),
+				     "PrimitiveKit/geometry");
 }
 
 Graphic_ptr PrimitiveKitImpl::cube()
@@ -107,7 +108,8 @@
 
 Graphic_ptr PrimitiveKitImpl::transformer(Graphic_ptr g)
 {
-  return create_and_set_body<Graphic>(new Transformer, g);
+  return create_and_set_body<Graphic>(new Transformer, g,
+				      "PrimitiveKit/transformer");
 }
 
 Graphic_ptr PrimitiveKitImpl::directional_light(Fresco::Graphic_ptr g,
@@ -115,7 +117,8 @@
 						CORBA::Float i,
 						const Fresco::Vertex &d)
 {
-  return create_and_set_body<Graphic>(new DirectionalLight(c, i, d), g);
+  return create_and_set_body<Graphic>(new DirectionalLight(c, i, d), g,
+				      "PrimitiveKit/directional_light");
 }
 
 Graphic_ptr PrimitiveKitImpl::point_light(Fresco::Graphic_ptr g,
@@ -123,7 +126,8 @@
 					  CORBA::Float i,
 					  const Fresco::Vertex &p)
 {
-  return create_and_set_body<Graphic>(new PointLight(c, i, p), g);
+  return create_and_set_body<Graphic>(new PointLight(c, i, p), g,
+				      "PrmitiveKit/point_light");
 }
 
 Graphic_ptr PrimitiveKitImpl::spot_light(Fresco::Graphic_ptr g,
@@ -134,7 +138,8 @@
 					 CORBA::Float r,
 					 CORBA::Float a)
 {
-  return create_and_set_body<Graphic>(new SpotLight(c, i, p, d, r, a), g);
+  return create_and_set_body<Graphic>(new SpotLight(c, i, p, d, r, a), g,
+				      "PrimitiveKit/spot_light");
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.