| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2009, Google Inc. | 2 * Copyright 2009, 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 frustum space. | 128 frustum space. |
| 129 \return True if the box is in the frustum. | 129 \return True if the box is in the frustum. |
| 130 %] | 130 %] |
| 131 [const] bool InFrustum(Vectormath::Aos::Matrix4 matrix); | 131 [const] bool InFrustum(Vectormath::Aos::Matrix4 matrix); |
| 132 | 132 |
| 133 [verbatim=cpp_glue] %{ | 133 [verbatim=cpp_glue] %{ |
| 134 void userglue_setter_marshaled( | 134 void userglue_setter_marshaled( |
| 135 void* plugin_data, | 135 void* plugin_data, |
| 136 o3d::BoundingBox* _this, | 136 o3d::BoundingBox* _this, |
| 137 const std::vector<std::vector<float> >& values) { | 137 const std::vector<std::vector<float> >& values) { |
| 138 if (values.size() == 0) { | 138 if (values.empty()) { |
| 139 *_this = o3d::BoundingBox(); | 139 *_this = o3d::BoundingBox(); |
| 140 } else if (values.size() != 2) { | 140 } else if (values.size() != 2) { |
| 141 o3d::ServiceLocator* service_locator = | 141 o3d::ServiceLocator* service_locator = |
| 142 static_cast<glue::_o3d::PluginObject*>( | 142 static_cast<glue::_o3d::PluginObject*>( |
| 143 plugin_data)->service_locator(); | 143 plugin_data)->service_locator(); |
| 144 O3D_ERROR(service_locator) | 144 O3D_ERROR(service_locator) |
| 145 << "BoundingBox: expected 2 values, got " << values.size(); | 145 << "BoundingBox: expected 2 values, got " << values.size(); |
| 146 } else { | 146 } else { |
| 147 for (std::vector<float>::size_type i = 0; i < values.size(); ++i) { | 147 for (std::vector<float>::size_type i = 0; i < values.size(); ++i) { |
| 148 if (values[i].size() != 3) { | 148 if (values[i].size() != 3) { |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 A Param which stores a BoundingBox. | 202 A Param which stores a BoundingBox. |
| 203 %] | 203 %] |
| 204 [nocpp, include="core/cross/param.h"] class ParamBoundingBox : Param { | 204 [nocpp, include="core/cross/param.h"] class ParamBoundingBox : Param { |
| 205 %[ | 205 %[ |
| 206 The BoundingBox stored by the Param. | 206 The BoundingBox stored by the Param. |
| 207 %] | 207 %] |
| 208 [getter, setter] BoundingBox value_; | 208 [getter, setter] BoundingBox value_; |
| 209 }; | 209 }; |
| 210 | 210 |
| 211 } // namespace o3d | 211 } // namespace o3d |
| OLD | NEW |