/* * 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. */ [include="plugin/cross/marshaling_utils.h"] %{ %} namespace Vectormath { namespace Aos { [binding_model=by_value, marshaled, nocpp, include= "third_party/vectormath/files/vectormathlibrary/include/vectormath/scalar/cpp/vectormath_aos.h"] class Vector3 { [plugin_data, userglue_getter, userglue_setter, getter, setter, nodocs] float[] marshaled; [verbatim=cpp_glue] %{ void userglue_setter_marshaled( void* plugin_data, Vectormath::Aos::Vector3* self, const std::vector& dynamicValue) { *self = o3d::VectorToType( plugin_data, dynamicValue); } std::vector userglue_getter_marshaled( void* plugin_data, const Vectormath::Aos::Vector3& self) { return o3d::VectorFromType(self); } %} }; [binding_model=by_value, marshaled, nocpp, include= "third_party/vectormath/files/vectormathlibrary/include/vectormath/scalar/cpp/vectormath_aos.h"] class Point3 { [plugin_data, userglue_getter, userglue_setter, getter, setter, nodocs] float[] marshaled; [verbatim=cpp_glue] %{ void userglue_setter_marshaled( void* plugin_data, Vectormath::Aos::Point3* self, const std::vector& dynamicValue) { *self = o3d::VectorToType( plugin_data, dynamicValue); } std::vector userglue_getter_marshaled( void* plugin_data, const Vectormath::Aos::Point3& self) { return o3d::VectorFromType(self); } %} }; [binding_model=by_value, marshaled, nocpp, include= "third_party/vectormath/files/vectormathlibrary/include/vectormath/scalar/cpp/vectormath_aos.h"] class Vector4 { [plugin_data, userglue_getter, userglue_setter, getter, setter, nodocs] float[] marshaled; [verbatim=cpp_glue] %{ void userglue_setter_marshaled( void* plugin_data, Vectormath::Aos::Vector4* self, const std::vector& dynamicValue) { *self = o3d::VectorToType( plugin_data, dynamicValue); } std::vector userglue_getter_marshaled( void* plugin_data, const Vectormath::Aos::Vector4& self) { return o3d::VectorFromType(self); } %} }; [binding_model=by_value, marshaled, nocpp, include= "third_party/vectormath/files/vectormathlibrary/include/vectormath/scalar/cpp/vectormath_aos.h"] class Matrix3 { [plugin_data, userglue_getter, userglue_setter, getter, setter, nodocs] float[][] marshaled; [verbatim=cpp_glue] %{ void userglue_setter_marshaled( void* plugin_data, Vectormath::Aos::Matrix3* self, const std::vector >& dynamicValue) { *self = o3d::VectorOfVectorToType( plugin_data, dynamicValue); } std::vector > userglue_getter_marshaled( void* plugin_data, const Vectormath::Aos::Matrix3& self) { return o3d::VectorOfVectorFromType( self); } %} }; [binding_model=by_value, marshaled, nocpp, include= "third_party/vectormath/files/vectormathlibrary/include/vectormath/scalar/cpp/vectormath_aos.h"] class Matrix4 { [plugin_data, userglue_getter, userglue_setter, getter, setter, nodocs] float[][] marshaled; [verbatim=cpp_glue] %{ void userglue_setter_marshaled( void* plugin_data, Vectormath::Aos::Matrix4* self, const std::vector >& dynamicValue) { *self = o3d::VectorOfVectorToType( plugin_data, dynamicValue); } std::vector > userglue_getter_marshaled( void* plugin_data, const Vectormath::Aos::Matrix4& self) { return o3d::VectorOfVectorFromType( self); } %} }; [binding_model=by_value, marshaled, nocpp, include= "third_party/vectormath/files/vectormathlibrary/include/vectormath/scalar/cpp/vectormath_aos.h"] class Quat { [plugin_data, userglue_getter, userglue_setter, getter, setter, nodocs] float[] marshaled; [verbatim=cpp_glue] %{ void userglue_setter_marshaled( void* plugin_data, Vectormath::Aos::Quat* self, const std::vector& dynamicValue) { *self = o3d::VectorToType( plugin_data, dynamicValue); } std::vector userglue_getter_marshaled( void* plugin_data, const Vectormath::Aos::Quat& self) { return o3d::VectorFromType(self); } %} }; } }