Fixed arrange for objects with 3D rotations
This commit is contained in:
parent
270341300f
commit
e3d44b07fe
@ -122,7 +122,7 @@ sub add_instance {
|
|||||||
|
|
||||||
my $new_instance = $self->_add_instance;
|
my $new_instance = $self->_add_instance;
|
||||||
|
|
||||||
$new_instance->set_rotation($args{rotation})
|
$new_instance->set_rotations($args{rotation})
|
||||||
if defined $args{rotation};
|
if defined $args{rotation};
|
||||||
$new_instance->set_scaling_factor($args{scaling_factor})
|
$new_instance->set_scaling_factor($args{scaling_factor})
|
||||||
if defined $args{scaling_factor};
|
if defined $args{scaling_factor};
|
||||||
|
@ -687,8 +687,7 @@ void applyResult(
|
|||||||
|
|
||||||
// write the transformation data into the model instance
|
// write the transformation data into the model instance
|
||||||
#if ENABLE_MODELINSTANCE_3D_ROTATION
|
#if ENABLE_MODELINSTANCE_3D_ROTATION
|
||||||
// CHECK_ME -> Is the following correct ?
|
inst_ptr->set_rotation(Z, rot);
|
||||||
inst_ptr->set_rotation(Vec3d(0.0, 0.0, rot));
|
|
||||||
#else
|
#else
|
||||||
inst_ptr->rotation = rot;
|
inst_ptr->rotation = rot;
|
||||||
#endif // ENABLE_MODELINSTANCE_3D_ROTATION
|
#endif // ENABLE_MODELINSTANCE_3D_ROTATION
|
||||||
|
@ -365,8 +365,8 @@ ModelMaterial::attributes()
|
|||||||
%code%{ RETVAL = THIS->get_object(); %};
|
%code%{ RETVAL = THIS->get_object(); %};
|
||||||
|
|
||||||
#if ENABLE_MODELINSTANCE_3D_ROTATION
|
#if ENABLE_MODELINSTANCE_3D_ROTATION
|
||||||
double rotation()
|
Vec3d* rotation()
|
||||||
%code%{ RETVAL = THIS->get_rotation(Z); %};
|
%code%{ RETVAL = new Vec3d(THIS->get_rotation(X), THIS->get_rotation(Y), THIS->get_rotation(Z)); %};
|
||||||
#else
|
#else
|
||||||
double rotation()
|
double rotation()
|
||||||
%code%{ RETVAL = THIS->rotation; %};
|
%code%{ RETVAL = THIS->rotation; %};
|
||||||
|
Loading…
Reference in New Issue
Block a user