OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2010, Google Inc. | 2 * Copyright 2010, Google Inc. |
3 * All rights reserved. | 3 * All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 16 matching lines...) Expand all Loading... |
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
30 */ | 30 */ |
31 | 31 |
32 | 32 |
33 /** | 33 /** |
34 * A DrawElement causes an Element to be Drawn with a particular material. | 34 * A DrawElement causes an Element to be Drawn with a particular material. |
35 * You can override other Effect parameters by adding corresponding params to | 35 * You can override other Effect parameters by adding corresponding params to |
36 * the DrawElement. | 36 * the DrawElement. |
37 * | 37 * |
38 * @param {!o3d.Material} opt_material The material used to render this element. | 38 * @param {!o3d.Material} opt_material The material used to render this element. |
39 * @constructor | 39 * @constructor |
40 */ | 40 */ |
41 o3d.DrawElement = function(opt_material) { | 41 o3d.DrawElement = function(opt_material) { |
42 o3d.ParamObject.call(this); | 42 o3d.ParamObject.call(this); |
43 | 43 |
44 /** | 44 /** |
45 * The Material for this DrawElement. If it is null the material of | 45 * The Material for this DrawElement. If it is null the material of |
46 * owner will be used. | 46 * owner will be used. |
47 * @type {o3d.Material} | 47 * @type {o3d.Material} |
48 */ | 48 */ |
49 this.material = opt_material || null; | 49 this.material = opt_material || null; |
50 | 50 |
51 /** | 51 /** |
52 * The current owner of this Draw Element. Set to null to stop being owned. | 52 * The current owner of this Draw Element. Set to null to stop being owned. |
53 * | 53 * |
54 * Note: DrawElements are referenced by the Pack they are created in | 54 * Note: DrawElements are referenced by the Pack they are created in |
55 * and their owner. If the DrawElement is removed from its Pack then | 55 * and their owner. If the DrawElement is removed from its Pack then |
56 * setting the owner to null will free the DrawElement. Or, visa | 56 * setting the owner to null will free the DrawElement. Or, visa |
57 * versa, if you set the DrawElement's owner to null then removing | 57 * versa, if you set the DrawElement's owner to null then removing |
58 * it from its Pack will free the DrawElement. | 58 * it from its Pack will free the DrawElement. |
59 * @type {o3d.Element} | 59 * @type {o3d.Element} |
60 */ | 60 */ |
61 this.owner_ = null; | 61 this.owner_ = null; |
62 }; | 62 }; |
63 o3d.inherit('DrawElement', 'ParamObject'); | 63 o3d.inherit('DrawElement', 'ParamObject'); |
64 | 64 |
65 o3d.ParamObject.setUpO3DParam_(o3d.DrawElement, 'material', 'ParamMaterial'); | 65 o3d.ParamObject.setUpO3DParam_(o3d.DrawElement, 'material', 'ParamMaterial'); |
66 | 66 |
OLD | NEW |