Example #1
0
        protected override void DrawInternal()
        {
            Vector3 local_point  = this.GetContents <Vector3>();
            Vector3 parent_point = this.GetAuxContents <Vector3>("parent_point");

            Vector3 world_point = HandlesExtensions.DoPositionHandle(local_point + parent_point);

            this.SetContents(world_point - parent_point);
        }
Example #2
0
        protected override void DrawInternal()
        {
            Vector3   local_point           = this.GetContents <Vector3>();
            Matrix4x4 local_to_world_matrix = this.GetAuxContents <Matrix4x4>("local_to_world_matrix");

            Vector3   world_point           = HandlesExtensions.DoPositionHandle(local_to_world_matrix.MultiplyPoint(local_point));
            Matrix4x4 world_to_local_matrix = local_to_world_matrix.inverse;

            this.SetContents(
                world_to_local_matrix.MultiplyPoint(world_point)
                );
        }
Example #3
0
 protected override void DrawInternal()
 {
     this.SetContents(
         HandlesExtensions.DoPositionHandle(this.GetContents <Vector3>())
         );
 }