summaryrefslogtreecommitdiffstats
path: root/o3d
diff options
context:
space:
mode:
authorgman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-20 19:21:35 +0000
committergman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-20 19:21:35 +0000
commit756ac71a81a5be5e4e1b23c2734b5631848fe0fc (patch)
tree68fbc1816ae4233f2258edc08ae3a0588393a477 /o3d
parentd900c2c753c9eb478a0229a21b31983ce00cc5d7 (diff)
downloadchromium_src-756ac71a81a5be5e4e1b23c2734b5631848fe0fc.zip
chromium_src-756ac71a81a5be5e4e1b23c2734b5631848fe0fc.tar.gz
chromium_src-756ac71a81a5be5e4e1b23c2734b5631848fe0fc.tar.bz2
The compiled version of the o3djs libs WORK!
Sadly there is some really strange voodoo to make it work. util.js was using document.getElementsByTagName('script') and it was not returning all the scripts. Lots of dump() lines later the voodoo of calling document.getElementsByTagName('script').length (the length is important) in some place earlier in the code fixes the issue. Also, added the copyright to the compiled file Added parameter docs Review URL: http://codereview.chromium.org/159049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21085 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d')
-rwxr-xr-xo3d/documentation/build_docs.py72
-rw-r--r--o3d/documentation/jsdoc-toolkit-templates/class.tmpl47
-rw-r--r--o3d/documentation/jsdoc-toolkit-templates/publish.js37
-rw-r--r--o3d/plugin/idl/clear_buffer.idl10
-rw-r--r--o3d/plugin/idl/counter.idl8
-rw-r--r--o3d/plugin/idl/draw_context.idl4
-rw-r--r--o3d/plugin/idl/draw_element.idl3
-rw-r--r--o3d/plugin/idl/draw_pass.idl3
-rw-r--r--o3d/plugin/idl/element.idl8
-rw-r--r--o3d/plugin/idl/function.idl5
-rw-r--r--o3d/plugin/idl/material.idl4
-rw-r--r--o3d/plugin/idl/matrix4_axis_rotation.idl6
-rw-r--r--o3d/plugin/idl/matrix4_composition.idl5
-rw-r--r--o3d/plugin/idl/matrix4_scale.idl5
-rw-r--r--o3d/plugin/idl/matrix4_translation.idl5
-rw-r--r--o3d/plugin/idl/param_operation.idl54
-rw-r--r--o3d/plugin/idl/primitive.idl3
-rw-r--r--o3d/plugin/idl/render_node.idl8
-rw-r--r--o3d/plugin/idl/render_surface.idl7
-rw-r--r--o3d/plugin/idl/render_surface_set.idl4
-rw-r--r--o3d/plugin/idl/state_set.idl2
-rw-r--r--o3d/plugin/idl/texture.idl17
-rw-r--r--o3d/plugin/idl/transform.idl12
-rw-r--r--o3d/plugin/idl/tree_traversal.idl3
-rw-r--r--o3d/plugin/idl/viewport.idl3
-rw-r--r--o3d/samples/o3djs/base.js8
26 files changed, 314 insertions, 29 deletions
diff --git a/o3d/documentation/build_docs.py b/o3d/documentation/build_docs.py
index dd995de..cc531a6 100755
--- a/o3d/documentation/build_docs.py
+++ b/o3d/documentation/build_docs.py
@@ -45,6 +45,38 @@ import re
_java_exe = ''
_script_path = os.path.dirname(os.path.realpath(__file__))
+_js_copyright = """
+/*
+ * Copyright 2009, Google Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+"""
GlobalsDict = { }
@@ -202,9 +234,23 @@ def BuildO3DExternsFile(js_files_dir, extra_externs_file, externs_file):
filenames = (glob.glob(os.path.join(js_files_dir, '*.js')) +
[extra_externs_file])
for filename in filenames:
+ print "-----", filename
infile = open(filename, 'r')
- outfile.write(infile.read())
+ lines = infile.readlines()
infile.close()
+ filtered = []
+ skipping = False
+ # strip out @o3dparameter stuff
+ for line in lines:
+ if skipping:
+ if line.startswith('* @') or line.startswith(' */'):
+ skipping = False
+ if not skipping:
+ if line.startswith(' * @o3dparameter'):
+ skipping = True
+ if not skipping:
+ filtered.append(line)
+ outfile.write(''.join(filtered))
outfile.close()
@@ -218,36 +264,24 @@ def BuildCompiledO3DJS(o3djs_files,
MakePath('../../o3d-internal/jscomp/JSCompiler_deploy.jar'),
'--property_renaming', 'OFF',
'--variable_renaming', 'LOCAL',
- '--remove_dead_assignments', 'false',
- '--remove_dead_code', 'false',
- '--remove_unused_vars', 'false',
- '--remove_unused_prototype_props', 'false',
- #'--check_missing_return', 'true',
- #
- '--collapse_variable_declarations', 'false',
- '--disable_function_inline', 'true',
- '--noextract_prototype_member_decl', 'true',
- #'--disable_convert_to_dotted_properties', 'true',
- #'--inline_functions', 'false',
- # TODO(gman): Remove the flags below once the compiled js actually works.
- '--pretty_print',
- #'--print_input_delimiter', 'true',
- #'--strip_whitespace_and_comments_only', 'true',
- ##'--logging_level', '',
'--strict',
'--externs=%s' % externs_path,
('--externs=%s' % o3d_externs_js_path),
('--js_output_file=%s' % compiled_o3djs_outpath)] +
['-js=%s' % (x, ) for x in o3djs_files]);
- # strip out goog.exportSymbol and o3djs.require stuff
+ # strip out goog.exportSymbol and move o3djs.require to end
file = open(compiled_o3djs_outpath, 'r')
contents = file.read()
file.close()
contents = re.sub(r'goog.exportSymbol\([^\)]*\);\n', '', contents)
- contents = re.sub(r'o3djs.require\([^\)]*\);\n', '', contents)
+ requires = set(re.findall(r'o3djs.require\([^\)]*\);', contents))
+ contents = re.sub(r'o3djs.require\([^\)]*\);', '', contents)
file = open(compiled_o3djs_outpath, 'w')
+ file.write(_js_copyright)
file.write(contents)
+ file.write('\n')
+ file.write('\n'.join(requires))
file.close()
diff --git a/o3d/documentation/jsdoc-toolkit-templates/class.tmpl b/o3d/documentation/jsdoc-toolkit-templates/class.tmpl
index 1f30c40..2ebc03a 100644
--- a/o3d/documentation/jsdoc-toolkit-templates/class.tmpl
+++ b/o3d/documentation/jsdoc-toolkit-templates/class.tmpl
@@ -83,7 +83,6 @@ thisClass = data;
</table>
</if>
-
<!-- ========== METHOD SUMMARY =========== -->
<if test="thisClass.methods.length">
{! var ownMethods = data.methods.sort(makeSortby("name")); !}
@@ -105,7 +104,7 @@ thisClass = data;
</if>
</if>
-<!-- =========== FIELD SUMMARY =========== -->
+<!-- =========== PROPERTY SUMMARY =========== -->
{! var ownProperties = getPublicProperties(data).sort(makeSortby("name")); !}
<if test="ownProperties.length">
<h2>Public Properties</h2>
@@ -123,7 +122,22 @@ thisClass = data;
</table>
</if>
-<!-- =========== END FIELD SUMMARY =========== -->
+<!-- ========== PARAMETER SUMMARY =========== -->
+{! var ownParameters = getParameters(data); !}
+<if test="ownParameters.length">
+ <h2>Parameters</h2>
+ <table class="summary">
+ <for each="param" in="ownParameters">
+ <tr>
+ <td class="type">
+ {+linkifyTypeSpec(makeName('[Param Summary]', thisClass.alias, param.name), param.type)+}
+ </td>
+ <td><a class="el" href="#param_{+param.name+}">{+param.name+}</a></td>
+ <td>{+linkifySingleType(makeName('[Param Summary inherit]'), param.parent)+}</td>
+ </tr>
+ </for>
+ </table>
+</if>
<!-- ========== CONSTRUCTOR DETAIL ============== -->
<if test="shouldWriteConstructor(data)">
@@ -352,6 +366,33 @@ thisClass = data;
</for>
</if>
+<!-- =========== PARAMETER DETAIL ============== -->
+
+<if test="defined(ownParameters) && ownParameters.length">
+ <hr/>
+ <h2>Parameter Documentation</h2>
+ <for each="param" in="ownParameters">
+ <a class="anchor" name="param_{+param.name+}"></a>
+ <div class="memitem">
+ <div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">{+linkifyTypeSpec(makeName('[Param Detail]', thisClass.alias, param.name), param.type)+} {+param.name+}
+ {+ (param.parent == thisClass.alias) ? "" : ("[[]inherited from " + linkifySingleType(makeName('[Param Details inherit]'), param.parent) + "]") +}
+ </td>
+ </tr>
+ </table>
+ </div>
+
+ <div class="memdoc">
+ <p/>
+ {+sanitizeForEZT(param.desc)+}
+ </div>
+
+ </div>
+ </for>
+</if>
+
</div><!-- end contents -->
</div><!-- end doxygen-ref -->
diff --git a/o3d/documentation/jsdoc-toolkit-templates/publish.js b/o3d/documentation/jsdoc-toolkit-templates/publish.js
index 9070a1a..0899958 100644
--- a/o3d/documentation/jsdoc-toolkit-templates/publish.js
+++ b/o3d/documentation/jsdoc-toolkit-templates/publish.js
@@ -57,6 +57,7 @@ var g_outputMode;
var g_baseURL;
var g_topURL;
var g_templates = [];
+var g_o3dPropertyRE = /^(\w+)\s+(\w+)\s+/;
/**
* Called automatically by JsDoc Toolkit.
@@ -501,6 +502,40 @@ function getPropertyType(property) {
}
/**
+ * Gets the parameters for a class.
+ * Parameters are an o3d specific thing. We have to look for tags that
+ * start with @o3dparameter
+ * @param {!Symbol} symbol
+ */
+function getParameters(symbol) {
+ var params = [];
+ if (symbol.inheritsFrom.length) {
+ params = getParameters(getSymbol(symbol.inheritsFrom[0]));
+ }
+
+ var tags = symbol.comment.getTag('o3dparameter');
+ for (var ii = 0; ii < tags.length; ++ii) {
+ var tag = tags[ii];
+ var tagString = tag.toString();
+ var parts = tagString.match(g_o3dPropertyRE);
+ if (!parts) {
+ generateError('Malformed o3dparameter specification for ' + symbol.alias +
+ ' : "' + tag + '"');
+ } else {
+ var descString = tagString.substr(parts[0].length);
+ var param = {
+ name: parts[1],
+ type: 'o3d.' + parts[2],
+ desc: descString,
+ parent: symbol.alias,
+ };
+ params.push(param);
+ }
+ }
+ return params;
+}
+
+/**
* Converts [ to [[] for ezt files.
* Also converts '\n\n' to <br/></br>
* @param {string} str to sanitize.
@@ -906,7 +941,7 @@ function getSourcePath(symbol) {
*/
function getParentName(symbol) {
var parent = getSymbol(symbol.memberOf);
- return parent.isNamespace ? symbol.memberOf : parent.name;
+ return parent.isNamespace ? symbol.memberOf : parent.alias;
}
/**
diff --git a/o3d/plugin/idl/clear_buffer.idl b/o3d/plugin/idl/clear_buffer.idl
index 8a10453..78dc176 100644
--- a/o3d/plugin/idl/clear_buffer.idl
+++ b/o3d/plugin/idl/clear_buffer.idl
@@ -34,6 +34,16 @@ namespace o3d {
%[
A ClearBuffer is a render node that clears the color buffer, zbuffer and/or
stencil buffer of the current render target.
+
+ @o3dparameter clearColor ParamFloat4 The color to clear to.
+ @o3dparameter clearColorFloat ParamBoolean True to clear the color of the
+ current render target.
+ @o3dparameter clearColor ParamFloat The depth value to clear to (0.0 to 1.0).
+ @o3dparameter clearColorFloat ParamBoolean True to clear the depth of the
+ current render target.
+ @o3dparameter clearColor ParamInteger The stencil value to clear to.
+ @o3dparameter clearColorFloat ParamBoolean True to clear the stencil of the
+ current render target.
%]
[nocpp, include="core/cross/clear_buffer.h"] class ClearBuffer
diff --git a/o3d/plugin/idl/counter.idl b/o3d/plugin/idl/counter.idl
index 981df37..be594cb 100644
--- a/o3d/plugin/idl/counter.idl
+++ b/o3d/plugin/idl/counter.idl
@@ -39,6 +39,14 @@ typedef NumberArray[] NumberArrayArray;
counter. You can set where it starts counting from and where it stops counting
at, whether or not it is running or paused and how it loops or does not loop.
You can also give it callbacks to call at specific count values.
+
+ @o3dparameter running ParamBoolean Whether or not this counter is running.
+ @o3dparameter forward ParamBoolean The direction this counter is counting.
+ @o3dparameter start ParamFloat The start value for this counter.
+ @o3dparameter end ParamFloat The end value for this counter
+ @o3dparameter countMode ParamInteger The counting mode for this counter.
+ @o3dparameter count ParamFloat The current count for this counter.
+ @o3dparameter multiplier ParamFloat The time multiplier for this counter.
%]
[nocpp, include="core/cross/counter.h"] class Counter
: ParamObject {
diff --git a/o3d/plugin/idl/draw_context.idl b/o3d/plugin/idl/draw_context.idl
index cf1aae4..6add8a3 100644
--- a/o3d/plugin/idl/draw_context.idl
+++ b/o3d/plugin/idl/draw_context.idl
@@ -36,6 +36,10 @@ namespace o3d {
It contains two 4-by-4 matrix params, view and
projection. These correspond to the viewing and projection transformation
matrices.
+
+ @o3dparameter view ParamMatrix4 The view matrix for this DrawContext.
+ @o3dparameter projection ParamMatrix4 The projection matrix for this
+ DrawContext.
%]
[nocpp, include="core/cross/draw_context.h"] class DrawContext
diff --git a/o3d/plugin/idl/draw_element.idl b/o3d/plugin/idl/draw_element.idl
index d07800c..3178f86 100644
--- a/o3d/plugin/idl/draw_element.idl
+++ b/o3d/plugin/idl/draw_element.idl
@@ -39,6 +39,9 @@ namespace o3d {
\sa Element
\sa Material
\sa Effect
+
+ @o3dparameter material ParamMaterial The material used to render this
+ the Element that owns this DrawElement.
%]
[nocpp, include="core/cross/material.h"] class DrawElement
: ParamObject {
diff --git a/o3d/plugin/idl/draw_pass.idl b/o3d/plugin/idl/draw_pass.idl
index 6fd6eab..b331209 100644
--- a/o3d/plugin/idl/draw_pass.idl
+++ b/o3d/plugin/idl/draw_pass.idl
@@ -33,6 +33,9 @@ namespace o3d {
%[
A DrawPass renders a DrawList.
+
+ @o3dparameter drawList ParamDrawList The DrawList used by this DrawPass.
+ @o3dparameter sortMethod ParamInteger The method of sorting this DrawPass.
%]
[nocpp, include="core/cross/draw_pass.h"] class DrawPass
: RenderNode {
diff --git a/o3d/plugin/idl/element.idl b/o3d/plugin/idl/element.idl
index 27ec977..696272e 100644
--- a/o3d/plugin/idl/element.idl
+++ b/o3d/plugin/idl/element.idl
@@ -35,6 +35,14 @@ typedef DrawElement[] DrawElementArray;
%[
An Element manages DrawElements for classes inherited from Element.
+
+ @o3dparameter material ParamMaterial The Material used by this Element.
+ @o3dparameter boundingBox ParamBoundingBox The BoundingBox used by this
+ Element for culling.
+ @o3dparameter zSortPoint ParamFloat3 The point to sort by when rendering this
+ Element in a z ordered DrawPass.
+ @o3dparameter cull ParamBoolean Whether or not to attempt to cull this
+ element based on whether or not its bounding box is in the view frustum.
%]
[nocpp, include="core/cross/element.h"] class Element : ParamObject {
diff --git a/o3d/plugin/idl/function.idl b/o3d/plugin/idl/function.idl
index a13ea38..64bf1e7 100644
--- a/o3d/plugin/idl/function.idl
+++ b/o3d/plugin/idl/function.idl
@@ -63,6 +63,11 @@ class Function : NamedObject {
%[
A FunctionEval evaluates a Function through parameters.
+
+ @o3dparameter input ParamFloat The input to the function.
+ @o3dparameter functionObject ParamFunction The function to apply the input to.
+ @o3dparameter output ParamFloat The result of applying the input to the
+ function.
%]
[nocpp, include="core/cross/function.h"]
class FunctionEval : ParamObject {
diff --git a/o3d/plugin/idl/material.idl b/o3d/plugin/idl/material.idl
index 7c4374d..890f04f 100644
--- a/o3d/plugin/idl/material.idl
+++ b/o3d/plugin/idl/material.idl
@@ -37,6 +37,10 @@ namespace o3d {
The parameters needed on a Material will vary depending its Effect.
Note that a material MUST have its drawList set in order for objects using it
to render.
+
+ @o3dparameter state ParamState The State used by this material.
+ @o3dparameter effect ParamEffect The Effect used by this material.
+ @o3dparameter drawList ParamDrawList The the DrawList used by this material.
%]
[nocpp, include="core/cross/material.h"] class Material : ParamObject {
diff --git a/o3d/plugin/idl/matrix4_axis_rotation.idl b/o3d/plugin/idl/matrix4_axis_rotation.idl
index de364c4..207e086 100644
--- a/o3d/plugin/idl/matrix4_axis_rotation.idl
+++ b/o3d/plugin/idl/matrix4_axis_rotation.idl
@@ -35,6 +35,12 @@ namespace o3d {
This param operation applies a rotation to its input matrix. The
rotation is specified in terms of an angle and an axis of rotation.
It can be used, for example, to supply the local matrix of a transform.
+
+ @o3dparameter inputMatrix ParamMatrix4 The input matrix.
+ @o3dparameter axis ParamFloat3 The axis of rotation.
+ @o3dparameter angle ParamFloat The amount of rotation.
+ @o3dparameter outputMatrix ParamMatrix4 The result of rotating the input
+ matrix by the specified rotation.
%]
[nocpp, include="core/cross/matrix4_axis_rotation.h"]
class Matrix4AxisRotation : ParamObject {
diff --git a/o3d/plugin/idl/matrix4_composition.idl b/o3d/plugin/idl/matrix4_composition.idl
index 87bbfc6..35a5d22 100644
--- a/o3d/plugin/idl/matrix4_composition.idl
+++ b/o3d/plugin/idl/matrix4_composition.idl
@@ -35,6 +35,11 @@ namespace o3d {
This param operation composes (multiplies) a local matrix with an input
matrix. It can be used, for example, to supply the local matrix of a
transform.
+
+ @o3dparameter inputMatrix ParamMatrix4 The input matrix.
+ @o3dparameter localMatrix ParamMatrix4 The local matrix.
+ @o3dparameter outputMatrix ParamMatrix4 The result of multiplying the input
+ matrix by the local matrix.
%]
[nocpp, include="core/cross/matrix4_composition.h"]
class Matrix4Composition : ParamObject {
diff --git a/o3d/plugin/idl/matrix4_scale.idl b/o3d/plugin/idl/matrix4_scale.idl
index ec567ee..3b25089 100644
--- a/o3d/plugin/idl/matrix4_scale.idl
+++ b/o3d/plugin/idl/matrix4_scale.idl
@@ -34,6 +34,11 @@ namespace o3d {
%[
This param operation applies a scaling to its input matrix.
It can be used, for example, to supply the local matrix of a transform.
+
+ @o3dparameter inputMatrix ParamMatrix4 The input matrix.
+ @o3dparameter scale ParamFloat3 The scale.
+ @o3dparameter outputMatrix ParamMatrix4 The result of scaling the input matrix
+ by the translation.
%]
[nocpp, include="core/cross/matrix4_scale.h"]
class Matrix4Scale : ParamObject {
diff --git a/o3d/plugin/idl/matrix4_translation.idl b/o3d/plugin/idl/matrix4_translation.idl
index 29afdc3..7a1e812 100644
--- a/o3d/plugin/idl/matrix4_translation.idl
+++ b/o3d/plugin/idl/matrix4_translation.idl
@@ -34,6 +34,11 @@ namespace o3d {
%[
This param operation applies a translation to its input matrix.
It can be used, for example, to supply the local matrix of a transform.
+
+ @o3dparameter inputMatrix ParamMatrix4 The input matrix.
+ @o3dparameter translation ParamFloat3 The translation.
+ @o3dparameter outputMatrix ParamMatrix4 The result of translating
+ the input matrix by the translation.
%]
[nocpp, include="core/cross/matrix4_translation.h"]
class Matrix4Translation : ParamObject {
diff --git a/o3d/plugin/idl/param_operation.idl b/o3d/plugin/idl/param_operation.idl
index 9935f93..6c97be5 100644
--- a/o3d/plugin/idl/param_operation.idl
+++ b/o3d/plugin/idl/param_operation.idl
@@ -33,6 +33,11 @@ namespace o3d {
%[
A Param operation that takes 2 floats to produce a Float2.
+
+ @o3dparameter input0 ParamFloat The first float.
+ @o3dparameter input1 ParamFloat The second float.
+ @o3dparameter output ParamFloat2 The Float2 that is the combination of input0
+ and input1.
%]
[nocpp, include="core/cross/param_operation.h"]
class ParamOp2FloatsToFloat2 : ParamObject {
@@ -54,6 +59,12 @@ class ParamOp2FloatsToFloat2 : ParamObject {
%[
A Param operation that takes 3 floats to produce a Float3.
+
+ @o3dparameter input0 ParamFloat The first float.
+ @o3dparameter input1 ParamFloat The second float.
+ @o3dparameter input2 ParamFloat The third float.
+ @o3dparameter output ParamFloat3 The Float3 that is the combination of input0,
+ input1, and input2.
%]
[nocpp, include="core/cross/param_operation.h"]
class ParamOp3FloatsToFloat3 : ParamObject {
@@ -80,6 +91,13 @@ class ParamOp3FloatsToFloat3 : ParamObject {
%[
A Param operation that takes 4 floats to produce a Float4.
+
+ @o3dparameter input0 ParamFloat The first float.
+ @o3dparameter input1 ParamFloat The second float.
+ @o3dparameter input2 ParamFloat The third float.
+ @o3dparameter input3 ParamFloat The fourth float.
+ @o3dparameter output ParamFloat4 The Float4 that is the combination of input0,
+ input1, input2, and input3.
%]
[nocpp, include="core/cross/param_operation.h"]
class ParamOp4FloatsToFloat4 : ParamObject {
@@ -111,6 +129,31 @@ class ParamOp4FloatsToFloat4 : ParamObject {
%[
A Param operation that takes 16 floats to produce a Matrix4.
+
+ @o3dparameter input0 ParamFloat The 1st float.
+ @o3dparameter input1 ParamFloat The 2nd float.
+ @o3dparameter input2 ParamFloat The 3rd float.
+ @o3dparameter input3 ParamFloat The 4th float.
+ @o3dparameter input4 ParamFloat The 5th float.
+ @o3dparameter input5 ParamFloat The 6th float.
+ @o3dparameter input6 ParamFloat The 7th float.
+ @o3dparameter input7 ParamFloat The 8th float.
+ @o3dparameter input8 ParamFloat The 9th float.
+ @o3dparameter input9 ParamFloat The 10th float.
+ @o3dparameter input10 ParamFloat The 11th float.
+ @o3dparameter input11 ParamFloat The 12th float.
+ @o3dparameter input12 ParamFloat The 13th float.
+ @o3dparameter input13 ParamFloat The 14th float.
+ @o3dparameter input14 ParamFloat The 15th float.
+ @o3dparameter input15 ParamFloat The 16th float.
+ @o3dparameter output ParamMatrix4 The Matrix4 that is the combination of
+ the inputs in the following order
+ <pre>
+ [[input0, input1, input2, input3],
+ [input4, input5, input6, input7],
+ [input8, input9, input10, input11],
+ [input12, input13, input14, input15]]
+ </pre>
%]
[nocpp, include="core/cross/param_operation.h"]
class ParamOp16FloatsToMatrix4 : ParamObject {
@@ -206,6 +249,17 @@ class ParamOp16FloatsToMatrix4 : ParamObject {
and z axes, and three scaling factors. The resulting transformation scales
first, then then rotates around the z-axis, then the y-axis, then the x-axis,
then translates.
+
+ @o3dparameter translateX ParamFloat The x component of the translation.
+ @o3dparameter translateY ParamFloat The y component of the translation.
+ @o3dparameter translateZ ParamFloat The z component of the translation.
+ @o3dparameter rotateX ParamFloat The x component of the rotation.
+ @o3dparameter rotateY ParamFloat The y component of the rotation.
+ @o3dparameter rotateZ ParamFloat The z component of the rotation.
+ @o3dparameter scaleX ParamFloat The x component of the scale.
+ @o3dparameter scaleY ParamFloat The y component of the scale.
+ @o3dparameter scaleZ ParamFloat The z component of the scale.
+ @o3dparameter output ParamMatrix4 The matrix described by the components.
%]
[nocpp, include="core/cross/param_operation.h"]
class TRSToMatrix4 : ParamObject {
diff --git a/o3d/plugin/idl/primitive.idl b/o3d/plugin/idl/primitive.idl
index 4e0547c..2f83535 100644
--- a/o3d/plugin/idl/primitive.idl
+++ b/o3d/plugin/idl/primitive.idl
@@ -34,6 +34,9 @@ namespace o3d {
%[
A Primitive is a type of Element that is made from a list of points,
lines or triangles that use a single material.
+
+ @o3dparameter streamBank ParamStreamBank The StreamBank used by this
+ Primitive.
%]
[nocpp, include="core/cross/primitive.h"]
class Primitive : Element {
diff --git a/o3d/plugin/idl/render_node.idl b/o3d/plugin/idl/render_node.idl
index 65bf48e..ee8b8b8 100644
--- a/o3d/plugin/idl/render_node.idl
+++ b/o3d/plugin/idl/render_node.idl
@@ -32,9 +32,13 @@
namespace o3d {
%[
- RenderNode is the base of all RenderNodes in the render graph. All
- RenderNodes have o3d.priority, o3d.active parameters.
+ RenderNode is the base of all RenderNodes in the render graph.
RenderNodes are rendered in order of priority.
+
+ @o3dparameter priority ParamFloat The priority of this render node. Lower
+ priorities are rendered first.
+ @o3dparameter active ParamBoolean If true this node is processed. If false
+ it is not.
%]
[nocpp, include="core/cross/render_node.h"]
class RenderNode : ParamObject {
diff --git a/o3d/plugin/idl/render_surface.idl b/o3d/plugin/idl/render_surface.idl
index 682ac62..183341c 100644
--- a/o3d/plugin/idl/render_surface.idl
+++ b/o3d/plugin/idl/render_surface.idl
@@ -34,6 +34,13 @@ namespace o3d {
%[
A RenderSurfaceBase is the base for RenderSurface and
RenderDepthStencilSurface.
+
+ @o3dparameter width ParamInteger The width of this RenderSurface.
+ [Read Only]
+ @o3dparameter height ParamInteger The height of this RenderSurface.
+ [Read Only]
+ @o3dparameter texture ParamTexture The texture of this RenderSurface.
+ [Read Only]
%]
[nocpp, include="core/cross/render_surface.h"] class RenderSurfaceBase
: ParamObject {
diff --git a/o3d/plugin/idl/render_surface_set.idl b/o3d/plugin/idl/render_surface_set.idl
index e7e6585..bcfd858 100644
--- a/o3d/plugin/idl/render_surface_set.idl
+++ b/o3d/plugin/idl/render_surface_set.idl
@@ -40,6 +40,10 @@ namespace o3d {
1) If both a color and depth surface is bound, then they must be of matching
dimensions.
2) At least one of render_surface and render_depth_surface must non-null.
+
+ @o3dparameter renderSurface ParamRenderSurface The render surface to set.
+ @o3dparameter renderDepthStencilSurface ParamRenderDepthStencilSurface The
+ depth stencil render surface to set.
%]
[nocpp, include="core/cross/render_surface_set.h"]
class RenderSurfaceSet : RenderNode {
diff --git a/o3d/plugin/idl/state_set.idl b/o3d/plugin/idl/state_set.idl
index 050c6b8..3c767ed 100644
--- a/o3d/plugin/idl/state_set.idl
+++ b/o3d/plugin/idl/state_set.idl
@@ -35,6 +35,8 @@ namespace o3d {
A StateSet is a render node that sets render states of all of its
children. You can make this a parent of a part of the render graph to set
render states in a more global way.
+
+ @o3dparameter state ParamState The State the defines what states to set.
%]
[nocpp, include="core/cross/state_set.h"] class StateSet
: RenderNode {
diff --git a/o3d/plugin/idl/texture.idl b/o3d/plugin/idl/texture.idl
index 6207e9f..81d1a5c 100644
--- a/o3d/plugin/idl/texture.idl
+++ b/o3d/plugin/idl/texture.idl
@@ -76,6 +76,9 @@ namespace o3d {
return tex2D(texSampler0, input.texcoord).rrrr;
}
\endcode
+
+ @o3dparameter levels ParamInteger The number of mip levels in this texture.
+ [Read Only]
%]
enum Format {
UNKNOWN_FORMAT,
@@ -109,6 +112,11 @@ namespace o3d {
%[
A class for 2D textures that defines the interface for getting
the dimensions of the texture, its memory format and number of mipmap levels.
+
+ @o3dparameter width ParamInteger The width of this texture in pixels.
+ [Read Only]
+ @o3dparameter height ParamInteger The height of this texture in pixels.
+ [Read Only]
%]
[include="core/cross/texture.h"] class Texture2D : Texture {
%[
@@ -407,9 +415,12 @@ namespace o3d {
%[
-TextureCUBE is a class for textures used for cube mapping. A cube texture
-stores bitmaps for the 6 faces of a cube and is addressed via three texture
-coordinates.
+ TextureCUBE is a class for textures used for cube mapping. A cube texture
+ stores bitmaps for the 6 faces of a cube and is addressed via three texture
+ coordinates.
+
+ @o3dparameter edgeLength ParamInteger The length of any edge of this texture.
+ [Read Only]
%]
[include="core/cross/texture.h"] class TextureCUBE : Texture {
%[
diff --git a/o3d/plugin/idl/transform.idl b/o3d/plugin/idl/transform.idl
index da0887d..3e1653a 100644
--- a/o3d/plugin/idl/transform.idl
+++ b/o3d/plugin/idl/transform.idl
@@ -37,7 +37,17 @@ typedef Shape[] ShapeArray;
The Transform defines parent child relationship and a localMatrix..
A Transform can have one or no parents and
an arbitrary number of children.
-%]
+
+ @o3dparameter localMatrix ParamMatrix4 The local matrix for this transform.
+ @o3dparameter worldMatrix ParamMatrix4 The world matrix of this transform.
+ @o3dparameter visible ParamBoolean Whether or not this transform and all its
+ children are visible.
+ @o3dparameter boundingBox ParamBoundingBox The bounding box for this transform
+ and all its children.
+ @o3dparameter cull ParamBoolean Whether or not to attempt to cull this
+ transform and all its children based on whether or not its bounding box
+ is in the view frustum.
+ %]
[nocpp, include="core/cross/transform.h"] class Transform
: ParamObject {
%[
diff --git a/o3d/plugin/idl/tree_traversal.idl b/o3d/plugin/idl/tree_traversal.idl
index a536f21..e167c7a 100644
--- a/o3d/plugin/idl/tree_traversal.idl
+++ b/o3d/plugin/idl/tree_traversal.idl
@@ -37,6 +37,9 @@ namespace o3d {
transform graph from the transform it's pointing at and for each DrawElement
it finds who's matertial matches one of its registered DrawLists it adds that
DrawElement to that DrawList.
+
+ @o3dparameter transform ParamTransform The root transform to start traversing
+ by this TreeTraveral.
%]
[nocpp, include="core/cross/tree_traversal.h"] class TreeTraversal
: RenderNode {
diff --git a/o3d/plugin/idl/viewport.idl b/o3d/plugin/idl/viewport.idl
index 6e28be6..e9564a2 100644
--- a/o3d/plugin/idl/viewport.idl
+++ b/o3d/plugin/idl/viewport.idl
@@ -39,6 +39,9 @@ namespace o3d {
range is represented by an array in the format [min Z, max Z]. The depth range
provides the mapping of the clip space coordinates into normalized z buffer
coordinates.
+
+ @o3dparameter viewport ParamFloat4 The viewport setting.
+ @o3dparameter depthRange ParamFloat2 The depth range setting.
%]
[nocpp, include="core/cross/viewport.h"] class Viewport
: RenderNode {
diff --git a/o3d/samples/o3djs/base.js b/o3d/samples/o3djs/base.js
index ff86e42..9b93ba4 100644
--- a/o3d/samples/o3djs/base.js
+++ b/o3d/samples/o3djs/base.js
@@ -188,6 +188,14 @@ o3djs.getObjectByName = function(name, opt_obj) {
* @param {string} rule Rule to include, in the form o3djs.package.part.
*/
o3djs.require = function(rule) {
+ // TODO(gman): For some unknown reason, when we call
+ // o3djs.util.getScriptTagText_ it calls
+ // document.getElementsByTagName('script') and for some reason the scripts do
+ // not always show up. Calling it here seems to fix that as long as we
+ // actually ask for the length, at least in FF 3.5.1 It would be nice to
+ // figure out why.
+ var dummy = document.getElementsByTagName('script').length;
+
// if the object already exists we do not need do do anything
if (o3djs.getObjectByName(rule)) {
return;