cgkit-commits Mailing List for Python Computer Graphics Kit
Brought to you by:
mbaas
You can subscribe to this list here.
| 2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(54) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
(40) |
Feb
(69) |
Mar
(43) |
Apr
(81) |
May
(92) |
Jun
(56) |
Jul
(35) |
Aug
(59) |
Sep
(41) |
Oct
(26) |
Nov
(15) |
Dec
(12) |
| 2006 |
Jan
(20) |
Feb
(23) |
Mar
(47) |
Apr
(87) |
May
(43) |
Jun
(7) |
Jul
(20) |
Aug
(5) |
Sep
(29) |
Oct
(83) |
Nov
(34) |
Dec
(16) |
| 2007 |
Jan
(11) |
Feb
|
Mar
|
Apr
|
May
(4) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2008 |
Jan
(3) |
Feb
(24) |
Mar
(2) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(4) |
Sep
(8) |
Oct
(2) |
Nov
(1) |
Dec
|
| 2009 |
Jan
(8) |
Feb
(22) |
Mar
(5) |
Apr
(10) |
May
(9) |
Jun
(8) |
Jul
(2) |
Aug
(13) |
Sep
(10) |
Oct
|
Nov
|
Dec
(1) |
| 2010 |
Jan
(3) |
Feb
(1) |
Mar
(4) |
Apr
(2) |
May
(3) |
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
(7) |
Dec
|
| 2012 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(1) |
Nov
(4) |
Dec
(5) |
| 2013 |
Jan
|
Feb
(5) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
1
(4) |
2
|
3
|
4
|
5
|
6
|
7
|
|
8
|
9
|
10
(1) |
11
|
12
|
13
|
14
|
|
15
|
16
|
17
|
18
|
19
|
20
|
21
|
|
22
|
23
|
24
|
25
|
26
|
27
|
28
|
|
29
|
30
|
31
|
|
|
|
|
|
From: <mb...@us...> - 2009-03-10 21:04:49
|
Revision: 299
http://cgkit.svn.sourceforge.net/cgkit/?rev=299&view=rev
Author: mbaas
Date: 2009-03-10 21:04:40 +0000 (Tue, 10 Mar 2009)
Log Message:
-----------
Bugfix: The Scene object didn't call the object constructor.
Modified Paths:
--------------
cgkit/trunk/cgkit/scene.py
Modified: cgkit/trunk/cgkit/scene.py
===================================================================
--- cgkit/trunk/cgkit/scene.py 2009-03-01 11:11:30 UTC (rev 298)
+++ cgkit/trunk/cgkit/scene.py 2009-03-10 21:04:40 UTC (rev 299)
@@ -50,6 +50,8 @@
"""%Scene class."""
def __init__(self):
+ object.__init__(self)
+
# Handedness ('r' or 'l')
self._handedness = "r"
# Normalized up direction
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mb...@us...> - 2009-03-01 11:11:34
|
Revision: 298
http://cgkit.svn.sourceforge.net/cgkit/?rev=298&view=rev
Author: mbaas
Date: 2009-03-01 11:11:30 +0000 (Sun, 01 Mar 2009)
Log Message:
-----------
Update
Modified Paths:
--------------
cgkit/trunk/changelog.txt
Modified: cgkit/trunk/changelog.txt
===================================================================
--- cgkit/trunk/changelog.txt 2009-03-01 11:10:48 UTC (rev 297)
+++ cgkit/trunk/changelog.txt 2009-03-01 11:11:30 UTC (rev 298)
@@ -10,6 +10,11 @@
Bug fixes/enhancements:
+- ri/cri: Added the following calls:
+ RiArchiveBegin(), RiArchiveEnd(), RiCamera(), RiDisplayChannel(),
+ RiIfBegin(), RiElseIf(), RiElse(), RiIfEnd(),
+ RiMakeBrickMap(), RiResource(), RiResourceBegin(), RiResourceEnd(),
+ RiScopedCoordinateSystem(), RiShader(), RiSystem().
- cri: numpy integer arrays were not properly supported on 64-bit systems
- mayaascii: Bugfix #2119263: The setAttr command wasn't recognizing the
channelBox option (+ some other bugfixes).
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mb...@us...> - 2009-03-01 11:10:51
|
Revision: 297
http://cgkit.svn.sourceforge.net/cgkit/?rev=297&view=rev
Author: mbaas
Date: 2009-03-01 11:10:48 +0000 (Sun, 01 Mar 2009)
Log Message:
-----------
Added RenderMan calls that are newer than the 3.2 spec.
Modified Paths:
--------------
cgkit/trunk/cgkit/_cri.py
cgkit/trunk/cgkit/cri.py
cgkit/trunk/cgkit/ri.py
cgkit/trunk/doc/tex/ri.tex
Modified: cgkit/trunk/cgkit/_cri.py
===================================================================
--- cgkit/trunk/cgkit/_cri.py 2009-03-01 11:09:15 UTC (rev 296)
+++ cgkit/trunk/cgkit/_cri.py 2009-03-01 11:10:48 UTC (rev 297)
@@ -455,7 +455,87 @@
ri.RiSincFilter.argtypes = [c_float, c_float, c_float, c_float]
ri.RiSincFilter.restype = c_float
+ # Optional calls from the 3.4 API:
+ if hasattr(ri, "RiArchiveBegin"):
+ ri.RiArchiveBegin.argtypes = [RtToken]
+ ri.RiArchiveBegin.restype = c_void_p
+ else:
+ ri.RiArchiveBegin = _undefinedFunctionSubstitute
+
+ if hasattr(ri, "RiArchiveEnd"):
+ ri.RiArchiveEnd.argtypes = []
+ else:
+ ri.RiArchiveEnd = _undefinedFunctionSubstitute
+
+ if hasattr(ri, "RiCamera"):
+ ri.RiCamera.argtypes = [RtToken]
+ else:
+ ri.RiCamera = _undefinedFunctionSubstitute
+
+ if hasattr(ri, "RiDisplayChannel"):
+ ri.RiDisplayChannel.argtypes = [RtToken]
+ else:
+ ri.RiDisplayChannel = _undefinedFunctionSubstitute
+
+ if hasattr(ri, "RiElse"):
+ ri.RiElse.argtypes = []
+ else:
+ ri.RiElse = _undefinedFunctionSubstitute
+
+ if hasattr(ri, "RiElseIf"):
+ ri.RiElseIf.argtypes = [RtToken]
+ else:
+ ri.RiElseIf = _undefinedFunctionSubstitute
+
+ if hasattr(ri, "RiIfBegin"):
+ ri.RiIfBegin.argtypes = [RtToken]
+ else:
+ ri.RiIfBegin = _undefinedFunctionSubstitute
+
+ if hasattr(ri, "RiIfEnd"):
+ ri.RiIfEnd.argtypes = []
+ else:
+ ri.RiIfEnd = _undefinedFunctionSubstitute
+
+ if hasattr(ri, "RiMakeBrickMap"):
+ ri.RiMakeBrickMap.argtypes = [RtInt, POINTER(c_char_p), c_char_p]
+ else:
+ ri.RiMakeBrickMap = _undefinedFunctionSubstitute
+
+ if hasattr(ri, "RiResource"):
+ ri.RiResource.argtypes = [RtToken, RtToken]
+ else:
+ ri.RiResource = _undefinedFunctionSubstitute
+
+ if hasattr(ri, "RiResourceBegin"):
+ ri.RiResourceBegin.argtypes = []
+ else:
+ ri.RiResourceBegin = _undefinedFunctionSubstitute
+
+ if hasattr(ri, "RiResourceEnd"):
+ ri.RiResourceEnd.argtypes = []
+ else:
+ ri.RiResourceEnd = _undefinedFunctionSubstitute
+
+ if hasattr(ri, "RiScopedCoordinateSystem"):
+ ri.RiScopedCoordinateSystem.argtypes = [RtToken]
+ else:
+ ri.RiScopedCoordinateSystem = _undefinedFunctionSubstitute
+
+ if hasattr(ri, "RiShader"):
+ ri.RiShader.argtypes = [RtToken, RtToken]
+ else:
+ ri.RiShader = _undefinedFunctionSubstitute
+
+ if hasattr(ri, "RiSystem"):
+ ri.RiSystem.argtypes = [c_char_p]
+ else:
+ ri.RiSystem = _undefinedFunctionSubstitute
+
+def _undefinedFunctionSubstitute(*args, **kwargs):
+ raise NotImplementedError("This function call is not implemented by this implementation of the RenderMan interface")
+
def _getLastError(ri):
"""Getter function for the RiLastError variable.
"""
Modified: cgkit/trunk/cgkit/cri.py
===================================================================
--- cgkit/trunk/cgkit/cri.py 2009-03-01 11:09:15 UTC (rev 296)
+++ cgkit/trunk/cgkit/cri.py 2009-03-01 11:10:48 UTC (rev 297)
@@ -218,6 +218,26 @@
RiLastError = property(_getRiLastError, _setRiLastError)
LastError = property(_getRiLastError, _setRiLastError)
+ def RiArchiveBegin(self, archivename, *paramlist, **keyparams):
+ """Begin an inline archive.
+
+ Example: RiArchiveBegin("myarchive")
+ ...
+ RiArchiveEnd()
+ RiReadArchive("myarchive")
+ """
+ return self._ri.RiArchiveBegin(archivename, *self._createCParamList(paramlist, keyparams))
+
+ def RiArchiveEnd(self):
+ """Terminate an inline archive.
+
+ Example: RiArchiveBegin("myarchive")
+ ...
+ RiArchiveEnd()
+ RiReadArchive("myarchive")
+ """
+ self._ri.RiArchiveEnd()
+
def RiArchiveRecord(self, type, format, *args):
"""Output a user data record.
@@ -327,6 +347,13 @@
bound = self._toCArray(self._ri.RtFloat, bound)
self._ri.RiBound(bound)
+ def RiCamera(self, name, *paramlist, **keyparams):
+ """Mark the current camera description.
+
+ Example: RiCamera("rightcamera")
+ """
+ self._ri.RiCamera(name, *self._createCParamList(paramlist, keyparams))
+
def RiClipping(self, near, far):
"""Sets the near and the far clipping plane along the direction of view.
@@ -533,6 +560,13 @@
"""
self._ri.RiDetailRange(minvisible, lowertransition, uppertransition, maxvisible)
+ def RiDisplayChannel(self, channel, *paramlist, **keyparams):
+ """Defines a new display channel.
+
+ Example: RiDisplayChannel("color aovCi", "string opacity", "aovOi")
+ """
+ self._ri.RiDisplayChannel(channel, *self._createCParamList(paramlist, keyparams))
+
def RiDisk(self, height, radius, thetamax, *paramlist, **keyparams):
"""Create a disk (parallel to the XY plane).
@@ -558,7 +592,18 @@
RiDisplay("myimage.tif", RI_FRAMEBUFFER, RI_RGB)
"""
self._ri.RiDisplay(name, type, mode, *self._createCParamList(paramlist, keyparams))
+
+ def RiElse(self):
+ """Add an else block to a conditional block.
+ """
+
+ self._ri.RiElse()
+ def RiElseIf(self, expression, *paramlist, **keyparams):
+ """Add an else-if block to a conditional block.
+ """
+ self._ri.RiElseIf(expression, *self._createCParamList(paramlist, keyparams))
+
def RiEnd(self):
"""Terminates the main block.
"""
@@ -672,6 +717,16 @@
"""
self._ri.RiIdentity()
+ def RiIfBegin(self, expression, *paramlist, **keyparams):
+ """Begin a conditional block.
+ """
+ self._ri.RiIfBegin(expression, *self._createCParamList(paramlist, keyparams))
+
+ def RiIfEnd(self):
+ """Terminate a conditional block.
+ """
+ self._ri.RiIfEnd()
+
def RiIlluminate(self, light, onoff):
"""Activate or deactive a light source.
@@ -704,6 +759,15 @@
"""
return self._ri.RiLightSource(name, *self._createCParamList(paramlist, keyparams))
+ def RiMakeBrickMap(self, ptcnames, bkmname, *paramlist, **keyparams):
+ """Create a brick map file from a list of point cloud file names.
+
+ Example: RiMakeBrickMap(["sphere.ptc", "box.ptc"], "spherebox.bkm", "float maxerror", 0.002)
+ """
+ n = len(ptcnames)
+ names = (n*ctypes.c_char_p)(*ptcnames)
+ self._ri.RiMakeBrickMap(n, names, bkmname, *self._createCParamList(paramlist, keyparams))
+
def RiMakeCubeFaceEnvironment(self, px,nx,py,ny,pz,nz, texname, fov, filterfunc, swidth, twidth, *paramlist, **keyparams):
"""Convert six image files into an environment map.
@@ -1116,6 +1180,21 @@
Example: RiRelativeDetail(0.7)"""
self._ri.RiRelativeDetail(relativedetail)
+ def RiResource(self, handle, type, *paramlist, **keyparams):
+ """Create or operate on a named resource of a particular type.
+ """
+ self._ri.RiResource(handle, type, *self._createCParamList(paramlist, keyparams))
+
+ def RiResourceBegin(self):
+ """Push the current set of resources.
+ """
+ self._ri.RiResourceBegin()
+
+ def RiResourceEnd(self):
+ """Pop the current set of resources.
+ """
+ self._ri.RiResourceEnd()
+
def RiReverseOrientation(self):
"""Causes the current orientation to be toggled.
@@ -1142,6 +1221,13 @@
scale = self._toCArray(self._ri.RtFloat, scale)
self._ri.RiScale(*tuple(scale))
+ def RiScopedCoordinateSystem(self, spacename):
+ """Mark the current coordinate system with a name but store it on a separate stack.
+
+ Example: RiScopedCoordinateSystem("lamptop")
+ """
+ self._ri.RiScopedCoordinateSystem(spacename)
+
def RiScreenWindow(self, left, right, bottom, top):
"""Specify the extents of the output image on the image plane.
@@ -1149,6 +1235,13 @@
"""
self._ri.RiScreenWindow(left, right, bottom, top)
+ def RiShader(self, name, handle, *paramlist, **keyparams):
+ """Set the current coshader.
+
+ Example: RiShader("plastic", "plastic_layer", Kd=0.7, Ks=0.3)
+ """
+ self._ri.RiShader(name, handle, *self._createCParamList(paramlist, keyparams))
+
def RiShadingInterpolation(self, type):
"""Specify how shading samples are interpolated.
@@ -1255,6 +1348,11 @@
Example: RiSurface("plastic", Kd=0.7, Ks=0.3)"""
self._ri.RiSurface(name, *self._createCParamList(paramlist, keyparams))
+ def RiSystem(self, cmd):
+ """Execute an arbitrary command in the same environment as the current rendering pass.
+ """
+ self._ri.RiSystem(cmd)
+
def RiTextureCoordinates(self, s1, t1, s2, t2, s3, t3, s4, t4):
"""Set the current set of texture coordinates.
Modified: cgkit/trunk/cgkit/ri.py
===================================================================
--- cgkit/trunk/cgkit/ri.py 2009-03-01 11:09:15 UTC (rev 296)
+++ cgkit/trunk/cgkit/ri.py 2009-03-01 11:10:48 UTC (rev 297)
@@ -280,7 +280,8 @@
The version number is automatically placed into the stream before
any "real" Ri calls are made. Output from RiArchiveRecord() will
- be placed before the version number.
+ be placed before the version number. (Note: The version line is disabled
+ for now).
"""
def __init__(self, outstream):
@@ -299,7 +300,9 @@
def write(self, data):
"""Write data into the stream."""
if self.output_version:
- self.out.write('version 3.03\n')
+ # The binding contains newer calls, so this version number
+ # might not be accurate anyway.
+# self.out.write('version 3.03\n')
self.output_version = 0
self.out.write(data)
@@ -1029,6 +1032,15 @@
_ribout.write('ShadingInterpolation "'+type+'"\n')
+# RiShader
+def RiShader(name, handle, *paramlist, **keyparams):
+ """Set the current coshader.
+
+ Example: RiShader("plastic", "plastic_layer", Kd=0.7, Ks=0.3)"""
+
+ _ribout.write('Shader "'+name+'"'+' "'+handle+'"'+ \
+ _paramlist2string(paramlist, keyparams)+"\n")
+
# RiSurface
def RiSurface(name, *paramlist, **keyparams):
"""Set the current surface shader.
@@ -1128,6 +1140,14 @@
_ribout.write('Display "'+name+'" "'+type+'" "'+mode+'"'+ \
_paramlist2string(paramlist, keyparams)+"\n")
+# RiDisplayChannel
+def RiDisplayChannel(channel, *paramlist, **keyparams):
+ """Defines a new display channel.
+
+ Example: RiDisplayChannel("color aovCi", "string opacity", "aovOi")
+ """
+ _ribout.write('DisplayChannel "%s"%s\n'%(channel, _paramlist2string(paramlist, keyparams)))
+
# RiFormat
def RiFormat(xres, yres, aspect):
"""Set the resolution of the output image and the aspect ratio of a pixel.
@@ -1171,6 +1191,14 @@
_ribout.write('Projection "'+name+'"'+ \
_paramlist2string(paramlist, keyparams)+"\n")
+# RiCamera
+def RiCamera(name, *paramlist, **keyparams):
+ """Mark the current camera description.
+
+ Example: RiCamera("rightcamera")
+ """
+ _ribout.write('Camera "%s"%s\n'%(name, _paramlist2string(paramlist, keyparams)))
+
# RiScreenWindow
def RiScreenWindow(left, right, bottom, top):
"""Specify the extents of the output image on the image plane.
@@ -1624,11 +1652,34 @@
In this implementation the callback function is not used and can
be left out.
- RiExample: RiReadArchive("teapot.rib")"""
+ Example: RiReadArchive("teapot.rib")"""
_ribout.write('ReadArchive "'+filename+'"\n')
+# RiArchiveBegin
+def RiArchiveBegin(archivename, *paramlist, **keyparams):
+ """Begin an inline archive.
+
+ Example: RiArchiveBegin("myarchive")
+ ...
+ RiArchiveEnd()
+ RiReadArchive("myarchive")
+ """
+ _ribout.write('ArchiveBegin "%s"%s\n'%(archivename, _paramlist2string((), keyparams)))
+ return archivename
+# RiArchiveEnd
+def RiArchiveEnd():
+ """Terminate an inline archive.
+
+ Example: RiArchiveBegin("myarchive")
+ ...
+ RiArchiveEnd()
+ RiReadArchive("myarchive")
+ """
+ _ribout.write('ArchiveEnd\n')
+
+
def RiProcDelayedReadArchive(): return "DelayedReadArchive"
def RiProcRunProgram(): return "RunProgram"
def RiProcDynamicLoad(): return "DynamicLoad"
@@ -1858,6 +1909,15 @@
_ribout.write('MakeShadow "'+picname+'" "'+shadowname+'"'+_paramlist2string(paramlist, keyparams)+'\n')
+# RiMakeBrickMap
+def RiMakeBrickMap(ptcnames, bkmname, *paramlist, **keyparams):
+ """Create a brick map file from a list of point cloud file names.
+
+ Example: RiMakeBrickMap(["sphere.ptc", "box.ptc"], "spherebox.bkm", "float maxerror", 0.002)
+ """
+ names = " ".join(map(lambda name: '"%s"'%name, ptcnames))
+ _ribout.write('MakeBrickMap [%s] "%s"%s\n'%(names, bkmname, _paramlist2string(paramlist, keyparams)))
+
# RiDetail
def RiDetail(bound):
"""Set the current bounding box.
@@ -1905,9 +1965,16 @@
Example: RiCoordinateSystem("lamptop")
"""
-
_ribout.write('CoordinateSystem "'+spacename+'"\n')
+# RiScopedCoordinateSystem
+def RiScopedCoordinateSystem(spacename):
+ """Mark the current coordinate system with a name but store it on a separate stack.
+
+ Example: RiScopedCoordinateSystem("lamptop")
+ """
+ _ribout.write('ScopedCoordinateSystem "'+spacename+'"\n')
+
# RiTransformPoints
def RiTransformPoints(fromspace, tospace, points):
"""Transform a set of points from one space to another.
@@ -1949,6 +2016,59 @@
return _current_context
+# RiSystem
+def RiSystem(cmd):
+ """Execute an arbitrary command in the same environment as the current rendering pass.
+ """
+ # Escape quotes
+ cmd = cmd.replace('"', r'\"')
+ _ribout.write('System "%s"\n'%cmd)
+
+# RiIfBegin
+def RiIfBegin(expression, *paramlist, **keyparams):
+ """Begin a conditional block.
+ """
+ _ribout.write('IfBegin "%s"%s\n'%(expression, _paramlist2string(paramlist, keyparams)))
+
+# RiElseIf
+def RiElseIf(expression, *paramlist, **keyparams):
+ """Add an else-if block to a conditional block.
+ """
+
+ _ribout.write('ElseIf "%s"%s\n'%(expression, _paramlist2string(paramlist, keyparams)))
+
+# RiElse
+def RiElse():
+ """Add an else block to a conditional block.
+ """
+
+ _ribout.write('Else\n')
+
+# RiIfEnd
+def RiIfEnd():
+ """Terminate a conditional block.
+ """
+
+ _ribout.write('IfEnd\n')
+
+# RiResource
+def RiResource(handle, type, *paramlist, **keyparams):
+ """Create or operate on a named resource of a particular type.
+ """
+ _ribout.write('Resource "%s" "%s"%s\n'%(handle, type, _paramlist2string(paramlist, keyparams)))
+
+# RiResourceBegin
+def RiResourceBegin():
+ """Push the current set of resources.
+ """
+ _ribout.write('ResourceBegin\n')
+
+# RiResourceEnd
+def RiResourceEnd():
+ """Pop the current set of resources.
+ """
+ _ribout.write('ResourceEnd\n')
+
##################### Global variabels (internal) ####################
_contexts = {}
Modified: cgkit/trunk/doc/tex/ri.tex
===================================================================
--- cgkit/trunk/doc/tex/ri.tex 2009-03-01 11:09:15 UTC (rev 296)
+++ cgkit/trunk/doc/tex/ri.tex 2009-03-01 11:10:48 UTC (rev 297)
@@ -25,9 +25,8 @@
This document is not an introduction to the RenderMan interface
itself, it just explains the usage of this particular Python
binding. The binding was written to be compliant to v3.2 of Pixar's
-RenderMan Interface specification. However, it also supports some
-newer features such as string handles for light sources or object
-instances.
+RenderMan Interface specification. However, it also supports features
+that were introduced after v3.2.
There is another RenderMan module called \refmodule[cgkit.cri]{cri} that
interfaces a renderer directly. Almost everything that is said in this section
@@ -334,7 +333,8 @@
If this option is set to 0 directly after \function{RiBegin()} is
called, then no \code{"version"} call will be generated in the RIB stream
(default is 1).\\
-New in version 1.1.
+New in version 1.1.\\
+(as of cgkit 2.0.0alpha9, the \code{version} call has been disabled)
\end{funcdesc}
%-----------
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mb...@us...> - 2009-03-01 11:09:20
|
Revision: 296
http://cgkit.svn.sourceforge.net/cgkit/?rev=296&view=rev
Author: mbaas
Date: 2009-03-01 11:09:15 +0000 (Sun, 01 Mar 2009)
Log Message:
-----------
Fixed some typos
Modified Paths:
--------------
cgkit/trunk/cgkit/pointcloud.py
cgkit/trunk/doc/tex/pointcloud.tex
Modified: cgkit/trunk/cgkit/pointcloud.py
===================================================================
--- cgkit/trunk/cgkit/pointcloud.py 2009-03-01 11:08:26 UTC (rev 295)
+++ cgkit/trunk/cgkit/pointcloud.py 2009-03-01 11:09:15 UTC (rev 296)
@@ -266,7 +266,7 @@
are 3-tuples of floats, radius is a single float and dataDict a
dictionary with the extra variables that are attached to the point.
If no more point is available an EOFError exception is thrown.
- An IOErrror handle is thrown when an error occurs during reading or
+ An IOErrror exception is thrown when an error occurs during reading or
when the file has already been closed.
"""
if self._handle is None:
@@ -284,7 +284,7 @@
exec self._dataCollectionCode
return tuple(self._pos), tuple(self._normal), self._radius.value, dataDict
- def readDataPoints(self, numPoints, buffer=None):
+ def readDataPoints(self, numPoints, buffer):
"""Read a sequence of data points.
numPoints is the number of points to read. buffer is either a single
@@ -347,10 +347,10 @@
def iterBatches(self, batchSize=1000, combinedBuffer=False, numpyArray=False):
"""Iterate over point batches.
- Reads batchSize points at once and yields one or more buffer
+ Reads batchSize points at once and yields one or more buffers
containing the data.
combinedBuffer determines whether all data is written into one single
- buffer or if there is an individual buffer for the point, norma, radius
+ buffer or if there is an individual buffer for the point, normal, radius
and data.
numpyArray determines whether the buffers are created as numpy arrays
or ctypes arrays.
@@ -445,6 +445,8 @@
self._PtcWriteDataPoint = ptclib.PtcWriteDataPoint
self._PtcFinishPointCloudFile = ptclib.PtcFinishPointCloudFile
+ self.name = fileName
+
xres,yres,aspect = format
w2e = self._matrixToCTypes(world2eye)
@@ -518,7 +520,7 @@
point and normal are vectors (any 3-sequence of floats) and radius
a float. data is a dict that contains the extra variables that
must have been declared in the constructor. Undeclared values are
- ignored, missing declared valued are set to 0.
+ ignored, missing declared values are set to 0.
"""
if self._handle is None:
raise IOError("The point cloud file has already been closed.")
@@ -531,7 +533,7 @@
if res==0:
raise IOError("Failed to write point cloud data point")
- def writeDataPoints(self, numPoints, buffer=None):
+ def writeDataPoints(self, numPoints, buffer):
"""Write a sequence of data points.
numPoints is the number of points to write. buffer is either a single
@@ -607,7 +609,7 @@
fileName is the name of the point cloud file. mode is either "r"
for reading a file or "w" for writing a new point cloud file.
libName is the library name that implements the point cloud API.
- When mode is "r", the following additional keyword arguments must
+ When mode is "w", the following additional keyword arguments must
be present:
- vars: A list of tuples (type, name) that defines what additional variables to write
Modified: cgkit/trunk/doc/tex/pointcloud.tex
===================================================================
--- cgkit/trunk/doc/tex/pointcloud.tex 2009-03-01 11:08:26 UTC (rev 295)
+++ cgkit/trunk/doc/tex/pointcloud.tex 2009-03-01 11:09:15 UTC (rev 296)
@@ -109,7 +109,7 @@
an entire sequence of points at once.
\end{methoddesc}
-\begin{methoddesc}{readDataPoints}{numPoints, buffer=None}
+\begin{methoddesc}{readDataPoints}{numPoints, buffer}
Read a sequence of data points.
\var{numPoints} is the number of points to read. \var{buffer} is either a single
buffer that will receive all values or a tuple (\var{pointbuf}, \var{normalbuf},
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mb...@us...> - 2009-03-01 11:08:29
|
Revision: 295
http://cgkit.svn.sourceforge.net/cgkit/?rev=295&view=rev
Author: mbaas
Date: 2009-03-01 11:08:26 +0000 (Sun, 01 Mar 2009)
Log Message:
-----------
Minor updates to the doc strings.
Modified Paths:
--------------
cgkit/trunk/cgkit/slparams.py
Modified: cgkit/trunk/cgkit/slparams.py
===================================================================
--- cgkit/trunk/cgkit/slparams.py 2009-02-28 17:46:47 UTC (rev 294)
+++ cgkit/trunk/cgkit/slparams.py 2009-03-01 11:08:26 UTC (rev 295)
@@ -252,7 +252,8 @@
- type: The type of the shader (surface, displacement, etc.)
- name: The name of the shader
- params: The shader parameters (see below)
- - meta: The shader meta data
+ - meta: The shader meta data. How exactly meta data is specified depends
+ on the renderer you are using.
The parameters are given as a list of shader parameter objects
describing each parameter. A shader parameter object has the
@@ -263,7 +264,7 @@
- type: The parameter type
- size: The array length or None if the parameter is not an array
- name: The name of the parameter
- - spacE: The space in which a point-like type was defined
+ - space: The space in which a point-like type was defined
- default: The default value (always given as a string)
For backwards compatibility, the shader info object behaves like a
@@ -419,8 +420,8 @@
def convertdefault(paramtuple):
"""Converts the default value of a shader parameter into a Python type.
- paramtuple must be a 7-tuple as returned by slparams(). The
- function returns a Python object that corresponds to the default
+ paramtuple must be a 7-tuple (or parameter object) as returned by slparams().
+ The function returns a Python object that corresponds to the default
value of the parameter. If the default value can't be converted
then None is returned. Only the functions that are present in the
sl module are evaluated. If a default value calls a user defined
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|