DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, Radian );
DALI_CREATE_CUSTOM_DISPOSE_FUNCTION( Dali, Radian );
-DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, Quaternion );
-DALI_CREATE_CUSTOM_DISPOSE_FUNCTION( Dali, Quaternion );
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, Quaternion, Rotation );
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, Quaternion, Rotation );
DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, Matrix );
DALI_CREATE_CUSTOM_DISPOSE_FUNCTION( Dali, Matrix );
DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, Matrix3 );
%}
%typemap(cscode) Dali::Quaternion %{
- public static Quaternion operator+(Quaternion arg1, Quaternion arg2) {
+ public static Rotation operator+(Rotation arg1, Rotation arg2) {
return arg1.Add(arg2);
}
- public static Quaternion operator-(Quaternion arg1, Quaternion arg2) {
+ public static Rotation operator-(Rotation arg1, Rotation arg2) {
return arg1.Subtract(arg2);
}
- public static Quaternion operator-(Quaternion arg1) {
+ public static Rotation operator-(Rotation arg1) {
return arg1.Subtract();
}
- public static Quaternion operator*(Quaternion arg1, Quaternion arg2) {
+ public static Rotation operator*(Rotation arg1, Rotation arg2) {
return arg1.Multiply(arg2);
}
- public static Vector3 operator*(Quaternion arg1, Vector3 arg2) {
+ public static Vector3 operator*(Rotation arg1, Vector3 arg2) {
return arg1.Multiply(arg2);
}
- public static Quaternion operator*(Quaternion arg1, float arg2) {
+ public static Rotation operator*(Rotation arg1, float arg2) {
return arg1.Multiply(arg2);
}
- public static Quaternion operator/(Quaternion arg1, Quaternion arg2) {
+ public static Rotation operator/(Rotation arg1, Rotation arg2) {
return arg1.Divide(arg2);
}
- public static Quaternion operator/(Quaternion arg1, float arg2) {
+ public static Rotation operator/(Rotation arg1, float arg2) {
return arg1.Divide(arg2);
}
%}
%include events/videoview-event.i
%include alphafunction.i
+%include rotation.i
%include name-changed.i
%include property-value.i
%include dali-operator.i
--- /dev/null
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+%rename(Rotation) Dali::Quaternion;
+%rename(GetAxisAngle) Dali::Quaternion::ToAxisAngle;
+
+%ignore Dali::Quaternion::Quaternion( Radian pitch, Radian yaw, Radian roll );
+%ignore Dali::Quaternion::Quaternion(const Matrix& matrix);
+%ignore Dali::Quaternion::Quaternion( const Vector4& vector );
+%ignore Dali::Quaternion::Quaternion( const Vector3& v0, const Vector3& v1 );
+%ignore Dali::Quaternion::Quaternion( const Vector3& xAxis, const Vector3& yAxis, const Vector3& zAxis );
+%ignore Dali::Quaternion::Quaternion( float cosThetaBy2, float iBySineTheta, float jBySineTheta, float kBySineTheta );
+%ignore Dali::Quaternion::SetEuler( Radian pitch, Radian yaw, Radian roll );
+%ignore Dali::Quaternion::EulerAngles() const;
+%ignore Dali::Quaternion::AsVector() const;
+%ignore Dali::Quaternion::Rotate( const Vector4& vector ) const;
+%ignore Dali::Quaternion::Rotate( const Vector3& vector ) const;
+%ignore Dali::Quaternion::mVector;
+
+%csmethodmodifiers Dali::Quaternion::operator+ "private";
+%csmethodmodifiers Dali::Quaternion::operator- "private";
+%csmethodmodifiers Dali::Quaternion::operator* "private";
+%csmethodmodifiers Dali::Quaternion::operator/ "private";
+%csmethodmodifiers Dali::Quaternion::operator+= "private";
+%csmethodmodifiers Dali::Quaternion::operator-= "private";
+%csmethodmodifiers Dali::Quaternion::operator*= "private";
+%csmethodmodifiers Dali::Quaternion::operator/= "private";
+%csmethodmodifiers Dali::Quaternion::operator== "private";
+%csmethodmodifiers Dali::Quaternion::operator!= "private";
StartTime = 0,
EndTime = 500,
TargetProperty = "Orientation",
- Destination = new Quaternion( new Radian( new Degree( 180.0f ) ), Vect3.Xaxis)
+ Destination = new Rotation( new Radian( new Degree( 180.0f ) ), Vect3.Xaxis)
};
_animation.AnimateTo(_text);
_animation.StartTime = 500;
_animation.EndTime = 1000;
_animation.TargetProperty = "Orientation";
- _animation.Destination = new Quaternion( new Radian( new Degree( 0.0f ) ), Vect3.Xaxis );
+ _animation.Destination = new Rotation( new Radian( new Degree( 0.0f ) ), Vect3.Xaxis );
_animation.AnimateTo(_text);
_animation.StartTime = 1000;
_scrollBar.AnchorPoint = NDalic.AnchorPointTopLeft;
_scrollBar.SetResizePolicy(ResizePolicyType.FIT_TO_CHILDREN, DimensionType.WIDTH);
_scrollBar.SetResizePolicy(ResizePolicyType.FILL_TO_PARENT, DimensionType.HEIGHT);
- _scrollBar.Orientation = new Quaternion( new Radian( new Degree( 270.0f ) ), Vector3.ZAXIS );
+ _scrollBar.Orientation = new Rotation( new Radian( new Degree( 270.0f ) ), Vector3.ZAXIS );
_scrollBar.SetScrollDirection(ScrollBar.Direction.Horizontal);
_scrollView.Add(_scrollBar);
_animation = new Animation(1.0f); // 1 second of duration
- _animation.AnimateTo(new Property(_text, Actor.Property.ORIENTATION), new Property.Value(new Quaternion( new Radian( new Degree( 180.0f ) ), Vector3.XAXIS )), new AlphaFunction(AlphaFunction.BuiltinFunction.Linear), new TimePeriod(0.0f, 0.5f));
- _animation.AnimateTo(new Property(_text, Actor.Property.ORIENTATION), new Property.Value(new Quaternion( new Radian( new Degree( 0.0f ) ), Vector3.XAXIS )), new AlphaFunction(AlphaFunction.BuiltinFunction.Linear), new TimePeriod(0.5f, 0.5f));
+ _animation.AnimateTo(new Property(_text, Actor.Property.ORIENTATION), new Property.Value(new Rotation( new Radian( new Degree( 180.0f ) ), Vector3.XAXIS )), new AlphaFunction(AlphaFunction.BuiltinFunction.Linear), new TimePeriod(0.0f, 0.5f));
+ _animation.AnimateTo(new Property(_text, Actor.Property.ORIENTATION), new Property.Value(new Rotation( new Radian( new Degree( 0.0f ) ), Vector3.XAXIS )), new AlphaFunction(AlphaFunction.BuiltinFunction.Linear), new TimePeriod(0.5f, 0.5f));
// Connect the signal callback for animaiton finished signal
_animation.Finished += AnimationFinished;
["VECTOR4", "Vector4", "", "Vector4 temp = new Vector4(0.0f,0.0f,0.0f,0.0f);"],
["MATRIX3", "Matrix3", "", "Matrix3 temp = new Matrix3();"],
["MATRIX", "Matrix", "", "Matrix temp = new Matrix();" ],
- ["RECTANGLE", "Rectangle", "", "Rectangle temp = new Rectangle(0,0,0,0);"],
- ["ROTATION", "Quaternion", "", "Quaternion temp = new Quaternion();"],
+ ["RECTANGLE", "Rectangle", "", "Rectangle temp = new Rectangle(0,0,0,0);"],
+ ["ROTATION", "Rotation", "", "Rotation temp = new Rotation();"],
["STRING", "string", "out", "string temp;"],
["ARRAY", "Dali.Property.Array", "", "Dali.Property.Array temp = new Dali.Property.Array();"],
["MAP", "Dali.Property.Map", "", "Dali.Property.Map temp = new Dali.Property.Map();"],